From 8a3883e8321c4dcbd03e857ea2134438a882d990 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Thu, 27 Oct 2022 16:43:54 -0700 Subject: [PATCH 001/164] [Internal] Client Telemetry: Fixes tests leaking environment variables (#3517) * Adding log lines * More logs * Debugging further * Removing other builds * And more debugging * Wrong build parameters * Wrong category * Removing noise * Fixing test * Adding utils * Adding test with client telemetry enabled * Fixing leak in Client Telemetry Tests * Reenabling test * cpu monitor initialization * Adding name details * Undo another file --- .../ClientTelemetryTests.cs | 27 ++++----- .../PartitionKeyRangeCacheTests.cs | 14 ++++- .../SynchronizationContextTests.cs | 22 ++++++-- .../Utils/Util.cs | 56 +++++++++++++++++++ 4 files changed, 97 insertions(+), 22 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs index 93e0cd8837..961c5d25d1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs @@ -30,7 +30,6 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests [TestClass] public class ClientTelemetryTests : BaseCosmosClientHelper { - private const string telemetryEndpointUrl = "http://dummy.telemetry.endpoint/"; private const int scheduledInSeconds = 1; private static readonly object jsonObject = JsonConvert.DeserializeObject("{\"compute\":{\"azEnvironment\":\"AzurePublicCloud\",\"customData\":\"\",\"isHostCompatibilityLayerVm\":\"false\",\"licenseType\":\"\",\"location\":\"eastus\",\"name\":\"sourabh-testing\",\"offer\":\"UbuntuServer\",\"osProfile\":{\"adminUsername\":\"azureuser\",\"computerName\":\"sourabh-testing\"},\"osType\":\"Linux\",\"placementGroupId\":\"\",\"plan\":{\"name\":\"\",\"product\":\"\",\"publisher\":\"\"},\"platformFaultDomain\":\"0\",\"platformUpdateDomain\":\"0\",\"provider\":\"Microsoft.Compute\",\"publicKeys\":[{\"keyData\":\"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC5uCeOAm3ehmhI+2PbMoMl17Eo\r\nqfHKCycSaBJsv9qxlmBOuFheSJc1XknJleXUSsuTO016/d1PyWpevnqOZNRksWoa\r\nJvQ23sDTxcK+X2OP3QlCUeX4cMjPXqlL8z1UYzU4Bx3fFvf8fs67G3N72sxWBw5P\r\nZyuXyhBm0NCe/2NYMKgEDT4ma8XszO0ikbhoPKbMbgHAQk/ktWQHNcqYOPQKEWqp\r\nEK1R0rjS2nmtovfScP/ZGXcvOpJ1/NDBo4dh1K+OxOGM/4PSH/F448J5Zy4eAyEk\r\nscys+IpeIOTOlRUy/703SNIX0LEWlnYqbyL9c1ypcYLQqF76fKkDfzzFI/OWVlGw\r\nhj/S9uP8iMsR+fhGIbn6MAa7O4DWPWLuedSp7KDYyjY09gqNJsfuaAJN4LiC6bPy\r\nhknm0PVLK3ux7EUOt+cZrHCdIFWbdOtxiPNIl1tkv9kV5aE5Aj2gJm4MeB9uXYhS\r\nOuksboBc0wyUGrl9+XZJ1+NlZOf7IjVi86CieK8= generated-by-azure\r\n\",\"path\":\"/home/azureuser/.ssh/authorized_keys\"}],\"publisher\":\"Canonical\",\"resourceGroupName\":\"sourabh-telemetry-sdk\",\"resourceId\":\"/subscriptions/8fba6d4f-7c37-4d13-9063-fd58ad2b86e2/resourceGroups/sourabh-telemetry-sdk/providers/Microsoft.Compute/virtualMachines/sourabh-testing\",\"securityProfile\":{\"secureBootEnabled\":\"false\",\"virtualTpmEnabled\":\"false\"},\"sku\":\"18.04-LTS\",\"storageProfile\":{\"dataDisks\":[],\"imageReference\":{\"id\":\"\",\"offer\":\"UbuntuServer\",\"publisher\":\"Canonical\",\"sku\":\"18.04-LTS\",\"version\":\"latest\"},\"osDisk\":{\"caching\":\"ReadWrite\",\"createOption\":\"FromImage\",\"diffDiskSettings\":{\"option\":\"\"},\"diskSizeGB\":\"30\",\"encryptionSettings\":{\"enabled\":\"false\"},\"image\":{\"uri\":\"\"},\"managedDisk\":{\"id\":\"/subscriptions/8fba6d4f-7c37-4d13-9063-fd58ad2b86e2/resourceGroups/sourabh-telemetry-sdk/providers/Microsoft.Compute/disks/sourabh-testing_OsDisk_1_9a54abfc5ba149c6a106bd9e5b558c2a\",\"storageAccountType\":\"Premium_LRS\"},\"name\":\"sourabh-testing_OsDisk_1_9a54abfc5ba149c6a106bd9e5b558c2a\",\"osType\":\"Linux\",\"vhd\":{\"uri\":\"\"},\"writeAcceleratorEnabled\":\"false\"}},\"subscriptionId\":\"8fba6d4f-7c37-4d13-9063-fd58ad2b86e2\",\"tags\":\"azsecpack:nonprod;platformsettings.host_environment.service.platform_optedin_for_rootcerts:true\",\"tagsList\":[{\"name\":\"azsecpack\",\"value\":\"nonprod\"},{\"name\":\"platformsettings.host_environment.service.platform_optedin_for_rootcerts\",\"value\":\"true\"}],\"version\":\"18.04.202103250\",\"vmId\":\"d0cb93eb-214b-4c2b-bd3d-cc93e90d9efd\",\"vmScaleSetName\":\"\",\"vmSize\":\"Standard_D2s_v3\",\"zone\":\"1\"},\"network\":{\"interface\":[{\"ipv4\":{\"ipAddress\":[{\"privateIpAddress\":\"10.0.7.5\",\"publicIpAddress\":\"\"}],\"subnet\":[{\"address\":\"10.0.7.0\",\"prefix\":\"24\"}]},\"ipv6\":{\"ipAddress\":[]},\"macAddress\":\"000D3A8F8BA0\"}]}}"); @@ -46,12 +45,8 @@ public class ClientTelemetryTests : BaseCosmosClientHelper private HttpClientHandlerHelper httpHandlerForNonAzureInstance; [ClassInitialize] - public static void ClassInitialize(TestContext context) + public static void ClassInitialize(TestContext _) { - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, "true"); - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetrySchedulingInSeconds, "1"); - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, telemetryEndpointUrl); - SystemUsageMonitor oldSystemUsageMonitor = (SystemUsageMonitor)typeof(DiagnosticsHandlerHelper) .GetField("systemUsageMonitor", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(DiagnosticsHandlerHelper.Instance); oldSystemUsageMonitor.Stop(); @@ -62,6 +57,8 @@ public static void ClassInitialize(TestContext context) [TestInitialize] public void TestInitialize() { + Util.EnableClientTelemetryEnvironmentVariables(); + this.actualInfo = new List(); this.httpHandler = new HttpClientHandlerHelper @@ -134,16 +131,6 @@ public void TestInitialize() .WithApplicationPreferredRegions(this.preferredRegionList); } - [ClassCleanup] - public static void FinalCleanup() - { - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, null); - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetrySchedulingInSeconds, null); - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, null); - - ClientTelemetryTests.ResetSystemUsageMonitor(false); - } - private static void ResetSystemUsageMonitor(bool isTelemetryEnabled) { ClientTelemetryTests.systemUsageMonitor?.Stop(); @@ -186,6 +173,14 @@ public async Task Cleanup() azMetadataField.SetValue(null, null); await base.TestCleanup(); + + Util.DisableClientTelemetryEnvironmentVariables(); + } + + [ClassCleanup] + public static void FinalCleanup() + { + ClientTelemetryTests.ResetSystemUsageMonitor(false); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs index 504f06467f..1b7d554772 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs @@ -19,11 +19,21 @@ public class PartitionKeyRangeCacheTests { private bool loopBackgroundOperaitons = false; - [TestMethod] - public async Task VerifyPkRangeCacheRefreshOnSplitWithErrorsAsync() + [TestInitialize] + public void TestInitialize() + { + this.loopBackgroundOperaitons = false; + } + + [TestCleanup] + public void TestCleanup() { this.loopBackgroundOperaitons = false; + } + [TestMethod] + public async Task VerifyPkRangeCacheRefreshOnSplitWithErrorsAsync() + { int throwOnPkRefreshCount = 3; int pkRangeCalls = 0; bool causeSplitExceptionInRntbdCall = false; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SynchronizationContextTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SynchronizationContextTests.cs index 7721c41e7b..a8ae6ce1a4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SynchronizationContextTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SynchronizationContextTests.cs @@ -13,10 +13,17 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests [TestClass] public class SynchronizationContextTests { - [TestMethod] + [DataTestMethod] + [DataRow(false, DisplayName = "SynchronizationContextTests - Client Telemetry disabled")] + [DataRow(true, DisplayName = "SynchronizationContextTests - Client Telemetry enabled")] [Timeout(30000)] - public void VerifySynchronizationContextDoesNotLock() + public void VerifySynchronizationContextDoesNotLock(bool withClientTelemetry) { + if (withClientTelemetry) + { + Util.EnableClientTelemetryEnvironmentVariables(); + } + string databaseId = Guid.NewGuid().ToString(); SynchronizationContext prevContext = SynchronizationContext.Current; try @@ -29,7 +36,6 @@ public void VerifySynchronizationContextDoesNotLock() { Cosmos.Database database = client.CreateDatabaseAsync(databaseId).GetAwaiter().GetResult(); database = client.CreateDatabaseIfNotExistsAsync(databaseId).GetAwaiter().GetResult(); - database.ReadStreamAsync().ConfigureAwait(false).GetAwaiter().GetResult(); database.ReadAsync().ConfigureAwait(false).GetAwaiter().GetResult(); @@ -118,7 +124,7 @@ public void VerifySynchronizationContextDoesNotLock() double cost = container.GetItemLinqQueryable( allowSynchronousQueryExecution: true).Select(x => x.cost).Sum(); - + ItemResponse deleteResponse = container.DeleteItemAsync(partitionKey: new Cosmos.PartitionKey(testItem.pk), id: testItem.id).ConfigureAwait(false).GetAwaiter().GetResult(); Assert.IsNotNull(deleteResponse); } @@ -127,13 +133,21 @@ public void VerifySynchronizationContextDoesNotLock() finally { SynchronizationContext.SetSynchronizationContext(prevContext); + using (CosmosClient client = TestCommon.CreateCosmosClient()) { client.GetDatabase(databaseId).DeleteAsync().GetAwaiter().GetResult(); } + + if (withClientTelemetry) + { + Util.DisableClientTelemetryEnvironmentVariables(); + } } } + + public class TestSynchronizationContext : SynchronizationContext { private object locker = new object(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index b17a575223..4533b2b562 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -5,11 +5,15 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { using System; using System.Collections.Generic; + using System.Diagnostics; using System.Globalization; + using System.IO; using System.Linq; using System.Net; + using System.Text; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Services.Management.Tests; + using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Client; using Microsoft.Azure.Documents.Collections; @@ -514,5 +518,57 @@ internal static void LogRequestOptions(RequestOptions options, bool shouldLogOff options.OfferType, options.OfferThroughput); } + + internal static void EnableClientTelemetryEnvironmentVariables() + { + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, "true"); + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetrySchedulingInSeconds, "1"); + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, "http://dummy.telemetry.endpoint/"); + } + + internal static void DisableClientTelemetryEnvironmentVariables() + { + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, null); + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetrySchedulingInSeconds, null); + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, null); + } + + /// + /// Enables traces for local debugging + /// + internal static void EnableTracesForDebugging() + { + Type defaultTrace = Type.GetType("Microsoft.Azure.Cosmos.Core.Trace.DefaultTrace,Microsoft.Azure.Cosmos.Direct"); + TraceSource traceSource = (TraceSource)defaultTrace.GetProperty("TraceSource").GetValue(null); + traceSource.Switch.Level = SourceLevels.All; + traceSource.Listeners.Clear(); + traceSource.Listeners.Add(new DirectToConsoleTraceListener()); + } + + public class DirectToConsoleTraceListener : TextWriterTraceListener + { + public DirectToConsoleTraceListener() : base(new DirectToConsoleTextWriter()) + { + } + + public override void Close() + { + } + } + + public class DirectToConsoleTextWriter : TextWriter + { + public override Encoding Encoding => Console.Out.Encoding; + + public override void Write(string value) + { + Logger.LogLine(value); + } + + public override void WriteLine(string value) + { + Logger.LogLine(value); + } + } } } From 543294cd7e49c9322661422ea602bc911c434972 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Sat, 29 Oct 2022 14:08:48 -0700 Subject: [PATCH 002/164] Updated change log and bumped up the version. (#3526) --- Directory.Build.props | 6 +- .../contracts/API_3.31.1-preview.txt | 1526 +++++++++++++++++ .../contracts/API_3.31.1.txt | 1476 ++++++++++++++++ changelog.md | 6 + 4 files changed, 3011 insertions(+), 3 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.31.1-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.31.1.txt diff --git a/Directory.Build.props b/Directory.Build.props index a8ce493c15..d95c118656 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,10 +1,10 @@ - 3.31.0 - 3.31.0 + 3.31.1 + 3.31.1 preview - 3.29.2 + 3.29.4 2.0.0 2.0.0 preview diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.31.1-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.31.1-preview.txt new file mode 100644 index 0000000000..e299887d03 --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.31.1-preview.txt @@ -0,0 +1,1526 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode FullFidelity { get; } + public static ChangeFeedMode Incremental { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.31.1.txt b/Microsoft.Azure.Cosmos/contracts/API_3.31.1.txt new file mode 100644 index 0000000000..9227774985 --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.31.1.txt @@ -0,0 +1,1476 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index 4d8bce7541..186c764c81 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,12 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.31.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.1) - 2022-10-29 +### [3.31.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.1-preview) - 2022-10-29 + +#### Fixed +- Connection: Fixes health check to identify broken connections earlier. + ### [3.31.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.0) - 2022-10-03 ### [3.31.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.0-preview) - 2022-10-03 From abf3d93f88894aa495c70fcc7b4ca0c9d55c7e89 Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Mon, 31 Oct 2022 14:12:32 -0700 Subject: [PATCH 003/164] Query: Fixes performance regression on target partition on some ORDER BY queries with continuation (#3525) * Revert performance regression caused by https://github.com/Azure/azure-cosmos-dotnet-v3/pull/1289/ * Remove irrelevant comment * Add a test for validating formatted filters for the target partition --- ...OrderByCrossPartitionQueryPipelineStage.cs | 4 +- ...ByCrossPartitionQueryPipelineStageTests.cs | 57 +++++++++++++++++++ 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs index a660f29d0b..bbd3d7be4e 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs @@ -1027,9 +1027,7 @@ private static (string leftFilter, string targetFilter, string rightFilter) GetF } } - // For the target filter we can make an optimization to just return "true", - // since we already have the backend continuation token to resume with. - return (left.ToString(), TrueFilter, right.ToString()); + return (left.ToString(), target.ToString(), right.ToString()); } private static async Task monadicQueryByPage)>> FilterNextAsync( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/OrderByCrossPartitionQueryPipelineStageTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/OrderByCrossPartitionQueryPipelineStageTests.cs index 448f63f02c..52062c8afb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/OrderByCrossPartitionQueryPipelineStageTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/OrderByCrossPartitionQueryPipelineStageTests.cs @@ -278,6 +278,63 @@ public void MonadicCreate_MultipleOrderByContinuationToken() } } + [TestMethod] + public async Task TestFormattedFiltersForTargetPartitionWithContinuationTokenAsync() + { + QueryPage emptyPage = new QueryPage( + documents: new List(), + requestCharge: 0, + activityId: string.Empty, + responseLengthInBytes: 0, + cosmosQueryExecutionInfo: default, + disallowContinuationTokenMessage: default, + additionalHeaders: default, + state: default); + + string expectedQuerySpec = "SELECT * FROM c WHERE ( c._ts >= 1665482200 OR IS_STRING(c._ts) OR IS_ARRAY(c._ts) OR IS_OBJECT(c._ts) ) ORDER BY c._ts"; + Mock mockContainer = new Mock(MockBehavior.Strict); + mockContainer + .Setup( + c => c.MonadicQueryAsync( + It.Is(sqlQuerySpec => expectedQuerySpec.Equals(sqlQuerySpec.QueryText)), + It.IsAny>(), + It.IsAny(), + NoOpTrace.Singleton, + default)) + .ReturnsAsync(TryCatch.FromResult(emptyPage)); + + string continuationToken = @"[{""compositeToken"":{""token"":null,""range"":{""min"":""A"",""max"":""B""}},""orderByItems"":[{""item"":1665482200}],""rid"":""64kUAPYyHHk6XgIAAADACQ=="",""skipCount"":1,""filter"":""( c._ts >= 1665482198 OR IS_STRING(c._ts) OR IS_ARRAY(c._ts) OR IS_OBJECT(c._ts) )""}]"; + + IReadOnlyList targetRanges = new List() + { + new FeedRangeEpk(new Range(min: "A", max: "B", isMinInclusive: true, isMaxInclusive: false)), + new FeedRangeEpk(new Range(min: "B", max: "C", isMinInclusive: true, isMaxInclusive: false)) + }; + + TryCatch monadicCreate = OrderByCrossPartitionQueryPipelineStage.MonadicCreate( + documentContainer: mockContainer.Object, + sqlQuerySpec: new SqlQuerySpec("SELECT * FROM c WHERE {documentdb-formattableorderbyquery-filter} ORDER BY c._ts"), + targetRanges: targetRanges, + partitionKey: null, + orderByColumns: new List() + { + new OrderByColumn("c._ts", SortOrder.Ascending) + }, + queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 1), + maxConcurrency: 0, + cancellationToken: default, + continuationToken: CosmosElement.Parse(continuationToken)); + Assert.IsTrue(monadicCreate.Succeeded); + + IQueryPipelineStage queryPipelineStage = monadicCreate.Result; + for (int i = 0; i < targetRanges.Count; ++i) + { + Assert.IsTrue(await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)); + } + + Assert.IsFalse(await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)); + } + [TestMethod] public async Task TestDrainFully_StartFromBeginingAsync_NoDocuments() { From 84ef54516b5e14db1c1302b84d69fe325456205e Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 2 Nov 2022 19:44:30 +0530 Subject: [PATCH 004/164] [Internal] AI Integration: Adds SubStatusCode Information in attributes (#3533) * wip * regenerated baseline * add test * fix test Co-authored-by: Sourabh Jain --- .../CosmosExceptions/CosmosException.cs | 1 + .../OpenTelemetryAttributeKeys.cs | 1 + .../OpenTelemetry/OpenTelemetryAttributes.cs | 5 + .../OpenTelemetryCoreRecorder.cs | 1 + .../OpenTelemetry/OpenTelemetryResponse.cs | 12 +- .../OpenTelemetry/OpenTelemetryResponse{T}.cs | 10 +- ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 202 +++++++++--------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 46 ++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 14 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 ++--- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 14 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- .../Tracing/OpenTelemetryListener.cs | 44 +++- 17 files changed, 259 insertions(+), 205 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs index d789c97b03..f6544e3545 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs @@ -290,6 +290,7 @@ private string ToStringHelper( internal static void RecordOtelAttributes(CosmosException exception, DiagnosticScope scope) { scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, exception.StatusCode); + scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, exception.SubStatusCode); scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, exception.RequestCharge); scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(exception.Diagnostics?.GetContactedRegions())); diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs index 2ea3fb1cdc..033a8744b6 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs @@ -29,6 +29,7 @@ internal sealed class OpenTelemetryAttributeKeys public const string RequestContentLength = "db.cosmosdb.request_content_length_bytes"; public const string ResponseContentLength = "db.cosmosdb.response_content_length_bytes"; public const string StatusCode = "db.cosmosdb.status_code"; + public const string SubStatusCode = "db.cosmosdb.sub_status_code"; public const string RequestCharge = "db.cosmosdb.request_charge"; public const string Region = "db.cosmosdb.regions_contacted"; public const string RetryCount = "db.cosmosdb.retry_count"; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs index 26760f8de4..636ccd5714 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs @@ -70,5 +70,10 @@ internal OpenTelemetryAttributes(RequestMessage requestMessage, string container /// OperationType /// internal string OperationType { get; set; } + + /// + /// SubStatusCode + /// + internal int SubStatusCode { get; set; } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index f825fbf3b7..c70b14a550 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -82,6 +82,7 @@ public void Record(OpenTelemetryAttributes response) this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestContentLength, response.RequestContentLength); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ResponseContentLength, response.ResponseContentLength); this.scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, response.StatusCode); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, response.SubStatusCode); this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, response.RequestCharge); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ItemCount, response.ItemCount); this.scope.AddAttribute(OpenTelemetryAttributeKeys.OperationType, response.OperationType); diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs index 6df9b774cc..0547fda4bd 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs @@ -19,7 +19,8 @@ internal OpenTelemetryResponse(TransactionalBatchResponse responseMessage, strin itemCount: responseMessage.Headers?.ItemCount, databaseName: databaseName, containerName: containerName, - requestMessage: null) + requestMessage: null, + subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { } @@ -32,7 +33,8 @@ internal OpenTelemetryResponse(ResponseMessage responseMessage, string container itemCount: responseMessage.Headers?.ItemCount, databaseName: databaseName, containerName: containerName, - requestMessage: responseMessage.RequestMessage) + requestMessage: responseMessage.RequestMessage, + subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { } @@ -44,14 +46,16 @@ private OpenTelemetryResponse( string itemCount, string databaseName, string containerName, - RequestMessage requestMessage) + RequestMessage requestMessage, + int subStatusCode) : base(requestMessage, containerName, databaseName) { this.StatusCode = statusCode; this.RequestCharge = requestCharge; this.ResponseContentLength = responseContentLength ?? OpenTelemetryAttributes.NotAvailable; this.Diagnostics = diagnostics; - this.ItemCount = itemCount ?? OpenTelemetryAttributes.NotAvailable; + this.ItemCount = itemCount ?? OpenTelemetryAttributes.NotAvailable; + this.SubStatusCode = subStatusCode; } private static string GetPayloadSize(ResponseMessage response) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs index 6f0ab85081..68301f4f4e 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs @@ -18,7 +18,8 @@ internal OpenTelemetryResponse(FeedResponse responseMessage, string container itemCount: responseMessage.Headers?.ItemCount, databaseName: databaseName, containerName: containerName, - requestMessage: responseMessage.RequestMessage) + requestMessage: responseMessage.RequestMessage, + subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { } @@ -31,7 +32,8 @@ internal OpenTelemetryResponse(Response responseMessage, string containerName itemCount: responseMessage.Headers?.ItemCount, databaseName: databaseName, containerName: containerName, - requestMessage: responseMessage.RequestMessage) + requestMessage: responseMessage.RequestMessage, + subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { } @@ -43,7 +45,8 @@ private OpenTelemetryResponse( string itemCount, string databaseName, string containerName, - RequestMessage requestMessage) + RequestMessage requestMessage, + int subStatusCode) : base(requestMessage, containerName, databaseName) { this.StatusCode = statusCode; @@ -51,6 +54,7 @@ private OpenTelemetryResponse( this.ResponseContentLength = responseContentLength ?? OpenTelemetryAttributes.NotAvailable; this.Diagnostics = diagnostics; this.ItemCount = itemCount ?? OpenTelemetryAttributes.NotAvailable; + this.SubStatusCode = subStatusCode; } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 2c5242bbda..f2df88ec68 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -150,7 +150,7 @@ } ] }]]> - Cosmos.ExecuteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ExecuteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index bb65e30393..41d8aca522 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -159,16 +159,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -342,16 +342,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -525,16 +525,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -708,16 +708,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -891,16 +891,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1074,16 +1074,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1257,16 +1257,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1440,16 +1440,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1623,16 +1623,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1806,16 +1806,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2699,7 +2699,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 1ca6744db1..0d9f75e0a8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -1201,11 +1201,11 @@ } ] }]]> - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1977,11 +1977,11 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2726,11 +2726,11 @@ } ] }]]> - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3503,11 +3503,11 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3837,9 +3837,9 @@ } ] }]]> - Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.ReadAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.ReadAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 8a4cf2f12f..98ac9c485a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -126,8 +126,8 @@ } ] }]]> - Cosmos.DeleteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateDatabaseAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -241,8 +241,8 @@ } ] }]]> - Cosmos.DeleteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateDatabaseAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index dad3787a12..7fc2fa5639 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -173,7 +173,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -459,7 +459,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -715,7 +715,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1009,7 +1009,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1379,7 +1379,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1558,9 +1558,9 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 8bd3e5f26d..c217c523a3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -709,10 +709,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1458,10 +1458,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2180,10 +2180,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2930,10 +2930,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3759,10 +3759,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4492,10 +4492,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -5253,10 +5253,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 836e4aa4ab..6d05d3ce0e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -671,10 +671,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1382,10 +1382,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2066,10 +2066,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2778,10 +2778,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 7afb14c5e7..20203e0664 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -681,12 +681,12 @@ } ] }]]> - Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1396,7 +1396,7 @@ } ] }]]> - Cosmos.ReadManyItemsAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadManyItemsAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 371cf51a53..b2d281b020 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -102,7 +102,7 @@ } ] }]]> - Cosmos.CreateItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -204,7 +204,7 @@ } ] }]]> - Cosmos.ReadItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -314,7 +314,7 @@ } ] }]]> - Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -419,7 +419,7 @@ } ] }]]> - Cosmos.DeleteItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index fb4bcb22c0..4e64df5dae 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -130,7 +130,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -239,7 +239,7 @@ } ] }]]> - Cosmos.ReadItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -363,7 +363,7 @@ } ] }]]> - Cosmos.ReplaceItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReplaceItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -474,7 +474,7 @@ } ] }]]> - Cosmos.DeleteItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs index e8e53b6ff1..fd50cd7365 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs @@ -136,10 +136,10 @@ private void RecordAttributes(string name, IEnumerable"); + OpenTelemetryListener.AssertData(name, tags); + foreach (KeyValuePair tag in tags) { - this.ValidateData(name, tag); - builder .Append("") .Append(tag.Key) @@ -149,7 +149,45 @@ private void RecordAttributes(string name, IEnumerable tag) + private static void AssertData(string name, IEnumerable> tags) + { + IList allowedAttributes = new List + { + "az.namespace", + "kind", + "db.system", + "db.name", + "db.operation", + "net.peer.name", + "db.cosmosdb.client_id", + "db.cosmosdb.hashed_machine_id", + "db.cosmosdb.user_agent", + "db.cosmosdb.connection_mode", + "db.cosmosdb.operation_type", + "db.cosmosdb.container", + "db.cosmosdb.request_content_length_bytes", + "db.cosmosdb.response_content_length_bytes", + "db.cosmosdb.status_code", + "db.cosmosdb.sub_status_code", + "db.cosmosdb.request_charge", + "db.cosmosdb.regions_contacted", + "db.cosmosdb.retry_count", + "db.cosmosdb.item_count", + "db.cosmosdb.request_diagnostics", + "exception.type", + "exception.message", + "exception.stacktrace" + }; + + foreach (KeyValuePair tag in tags) + { + Assert.IsTrue(allowedAttributes.Contains(tag.Key), $"{tag.Key} is not allowed for {name}"); + + OpenTelemetryListener.AssertDatabaseAndContainerName(name, tag); + } + } + + private static void AssertDatabaseAndContainerName(string name, KeyValuePair tag) { IList exceptionsForContainerAttribute = new List { From 68b980523bd89fa4b298b1589e6d7d5148df3748 Mon Sep 17 00:00:00 2001 From: aavasthy <113193425+aavasthy@users.noreply.github.com> Date: Wed, 2 Nov 2022 13:39:44 -0400 Subject: [PATCH 005/164] Diagnostics: Removes unused properties and reduces size (#3519) * Remove starttime and id from diagnostics string * Remove starttime and id from diagnostics string * Update xml files for trace baseline tests * Update xml files for trace baseline tests * Update xml files for trace baseline tests * Whitespaces update * Changed starttime position based on code review Co-authored-by: Matias Quaranta --- .../Tracing/TraceWriter.TraceJsonWriter.cs | 12 +- ...iterBaselineTests.BatchOperationsAsync.xml | 21 - ...riterBaselineTests.BulkOperationsAsync.xml | 411 -------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 771 -------------- ...eWriterBaselineTests.MiscellanousAsync.xml | 34 - ...neTests.PointOperationsExceptionsAsync.xml | 210 ---- ...EndTraceWriterBaselineTests.QueryAsync.xml | 993 ------------------ ...TraceWriterBaselineTests.ReadFeedAsync.xml | 556 ---------- ...TraceWriterBaselineTests.ReadManyAsync.xml | 284 ----- ...selineTests.StreamPointOperationsAsync.xml | 52 - ...aselineTests.TypedPointOperationsAsync.xml | 68 -- ...raceWriterBaselineTests.ScenariosAsync.xml | 473 --------- ...TraceWriterBaselineTests.Serialization.xml | 33 - .../TraceWriterBaselineTests.TraceData.xml | 7 - 14 files changed, 5 insertions(+), 3920 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs index b38c5a948a..a190f2e5e2 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs @@ -41,16 +41,14 @@ public static void WriteTrace( SummaryDiagnostics summaryDiagnostics = new SummaryDiagnostics(trace); summaryDiagnostics.WriteSummaryDiagnostics(writer); } - writer.WriteFieldName("name"); writer.WriteStringValue(trace.Name); - writer.WriteFieldName("id"); - writer.WriteStringValue(trace.Id.ToString()); - - writer.WriteFieldName("start time"); - writer.WriteStringValue(trace.StartTime.ToString("hh:mm:ss:fff")); - + if (isRootTrace) + { + writer.WriteFieldName("start time"); + writer.WriteStringValue(trace.StartTime.ToString("hh:mm:ss:fff")); + } writer.WriteFieldName("duration in milliseconds"); writer.WriteNumber64Value(trace.Duration.TotalMilliseconds); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index f2df88ec68..49f8d13a83 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -61,7 +61,6 @@ @@ -72,7 +71,6 @@ Date: Wed, 2 Nov 2022 15:24:30 -0700 Subject: [PATCH 006/164] [Internal] docs: Add address caches conceptual flow (#3534) * Rough draft * Some more changes * Adding a new section * Some more refinement * Some changes Lets get the feedback * Some MISC changes --- docs/SdkDesign.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/docs/SdkDesign.md b/docs/SdkDesign.md index e1be7d282a..f277661544 100644 --- a/docs/SdkDesign.md +++ b/docs/SdkDesign.md @@ -17,6 +17,74 @@ flowchart LR TransportClient <--> Service[(Cosmos DB Service)] ``` +## Address caches conceptual model + +![image](https://user-images.githubusercontent.com/6880899/199167007-bcc054c3-ecb1-4469-ba7d-eae52362e9cd.png) + + +- CollectionCache: Dictionary +- CollectionRoutingMap: Single collection PartitionKeyRanges map +- PartitionKeyRangeCache: Dictionary +- GlobalPartitionEndpointManager: Per partition override state. Every reqeust will flow throgh + - Today GlobalEndpointManager is at region scope only and doesn't look at the partition + - Ideal abstraction is to fold it into GlobalEndpointManager --> extra hash computation + - Posible to refactor direct code and flow HashedValue down stream (more contract work with direct package) +- AddressResolver: It does use IAddressCache (Above diagram missing it) + + +```mermaid +flowchart LR + subgraph CDB_account + subgraph CDB_Account_Endpoint + CDB_EP[[CosmosDB-Account/Endpoint]] + end + + subgraph CDB_Account_Region1 + CDBR1_GW[[CosmosDB-Account/Gateway/Region1]] + CDBR1_BE[[CosmosDB-Account/Backend/Region1]] + end + subgraph CDB_Account_RegionN + CDBRN_GW[[CosmosDB-Account/Gateway/Region1]] + CDBRN_BE[[CosmosDB-Account/Backend/RegionN]] + end + end + subgraph AddressCaches + GAC1[GatewayAddressCache/R1] + GACN[GatewayAddressCache/RN] + + GAC1 --> |NonBlockingAsyncCache| CDBR1_GW + GAC1 -.-> CDBR1_BE + GACN --> |NonBlockingAsyncCache| CDBRN_GW + GACN -.-> CDBRN_BE + end +``` + +### Sequence of interaction + +```mermaid +sequenceDiagram + GlobalAddressResolver->>GlobalEndpointManager: ResolveServiceEndpoint(DocumentServiceRequest) + GlobalEndpointManager-->>GlobalAddressResolver: URI (ServingRegion) + GlobalAddressResolver->>GlobalAddressResolver: GetEndpointCache(ServingRegion).AddressResolver + + critical RegularAddressResolution(Implicit contract of dsr.RequestContext.ResolvedPartitionKeyRange population) + GlobalAddressResolver->>AddressResolver: ResolveAsync(DocumentServiceRequest) + AddressResolver-->>GlobalAddressResolver: PartitionAddressInformation + end + + critical AnyPerpartitionOverrides + GlobalAddressResolver->>GlobalPartitionEndpointManager: TryAddPartitionLevelLocationOverride(DocumentServiceRequest) + GlobalPartitionEndpointManager-->>GlobalAddressResolver: (bool, DSR.RequestContext.RouteToLocation) + + option YES + GlobalAddressResolver->>GlobalEndpointManager: ResolveServiceEndpoint(DocumentServiceRequest) + GlobalEndpointManager-->>GlobalAddressResolver: URI (ServingRegion) + end + GlobalAddressResolver->>GlobalAddressResolver: GetEndpointCache(ServingRegion) + GlobalAddressResolver->>AddressResolver: ResolveAsync(DocumentServiceRequest) + AddressResolver-->>GlobalAddressResolver: PartitionAddressInformation +``` + ## Handler pipeline The handler pipeline processes the RequestMessage and each handler can choose to augment it in different ways, as shown in our [handler samples](../Microsoft.Azure.Cosmos.Samples/Usage/Handlers/) and also handle certain error conditions and retry, like our own [RetryHandler](../Microsoft.Azure.Cosmos/src/Handler/RetryHandler.cs). The RetryHandler will handle any failures from the [Transport layer](#transport) that should be [handled as regional failovers](#cross-region-retries). From 6762e07ed50757954043c79624f0d3e9a185e9d1 Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Thu, 3 Nov 2022 13:47:15 -0700 Subject: [PATCH 007/164] Release: Adds SDK version and changelog for 3.31.2 (#3546) * Bumped SDK version and changelog * Added contracts file for 3.31.2 --- Directory.Build.props | 4 +- .../contracts/API_3.31.2.txt | 1476 +++++++++++++++++ changelog.md | 6 + 3 files changed, 1484 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.31.2.txt diff --git a/Directory.Build.props b/Directory.Build.props index d95c118656..651e1f89e5 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,8 +1,8 @@ - 3.31.1 - 3.31.1 + 3.31.2 + 3.31.2 preview 3.29.4 2.0.0 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.31.2.txt b/Microsoft.Azure.Cosmos/contracts/API_3.31.2.txt new file mode 100644 index 0000000000..9227774985 --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.31.2.txt @@ -0,0 +1,1476 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index 186c764c81..add5a1de66 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,12 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.31.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.2) - 2022-11-03 +### [3.31.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.2-preview) - 2022-11-03 + +#### Fixed +- [#3525](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3525) Query: Fixes performance regression on target partition on some ORDER BY queries with continuation + ### [3.31.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.1) - 2022-10-29 ### [3.31.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.1-preview) - 2022-10-29 From ef7339ec793eb9b91ea566cf7f1e12a7ec934c7c Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Fri, 4 Nov 2022 10:52:54 -0700 Subject: [PATCH 008/164] [Internal] Documentation: Removes invalid comment from ReadThroughputAsync (#3516) --- Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs b/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs index a13f5224a4..a59dcb8be9 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs @@ -124,9 +124,6 @@ public abstract Task DeleteAsync( /// /// The provisioned throughput for this database. /// - /// - /// Null value indicates a database with no throughput provisioned. - /// /// Request Units /// Set throughput on a database /// From 825595a431a641368ea75b0401b56278d99be6fb Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Mon, 7 Nov 2022 10:53:55 -0800 Subject: [PATCH 009/164] [Internal] nugetconfig: Removes specific overrides (#3551) --- Microsoft.Azure.Cosmos.Samples/Usage/NuGet.config | 6 ------ NuGet.config | 6 ------ 2 files changed, 12 deletions(-) delete mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/NuGet.config delete mode 100644 NuGet.config diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/NuGet.config b/Microsoft.Azure.Cosmos.Samples/Usage/NuGet.config deleted file mode 100644 index cbb81b2617..0000000000 --- a/Microsoft.Azure.Cosmos.Samples/Usage/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/NuGet.config b/NuGet.config deleted file mode 100644 index cbb81b2617..0000000000 --- a/NuGet.config +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - From 4746a6fecc19c5b7e7f6ee602b3970298aa68e25 Mon Sep 17 00:00:00 2001 From: Aditya Date: Tue, 8 Nov 2022 18:28:44 -0800 Subject: [PATCH 010/164] Query: Fixes partition range evaluation for spatial queries (#3495) * Initial commit * Update. * Pull/Rebase * Addressed comments. * Build fix --- .../CosmosQueryExecutionContextFactory.cs | 1 + .../QueryClient/ContainerQueryProperties.cs | 5 +- .../Core/QueryClient/CosmosQueryClient.cs | 1 + .../Core/QueryPlan/QueryPartitionProvider.cs | 12 +- .../Query/Core/QueryPlan/QueryPlanHandler.cs | 6 + .../Core/QueryPlan/QueryPlanRetriever.cs | 2 + .../DefaultDocumentQueryExecutionContext.cs | 1 + .../DocumentQueryExecutionContextBase.cs | 2 + .../DocumentQueryExecutionContextFactory.cs | 1 + .../Query/v3Query/CosmosQueryClientCore.cs | 7 +- .../Resource/Container/ContainerCore.Items.cs | 2 + .../Resource/Container/ContainerInternal.cs | 1 + .../src/Routing/PartitionRoutingHelper.cs | 4 +- .../CosmosItemTests.cs | 3 +- .../FeedToken/QueryFeedTokenTests.cs | 3 +- .../Query/PartitioningQueryTests.cs | 85 +++ .../Query/QueryTestsBase.cs | 75 ++- .../Query/SanityQueryTests.cs | 9 +- .../Utils/NonPartitionedContainerHelper.cs | 10 +- .../Query/ParsingBenchmark.cs | 3 +- .../QueryPlanBaselineTests.Spatial.xml | 548 ++++++++++++++++++ .../Microsoft.Azure.Cosmos.Tests.csproj | 3 + ...misticDirectExecutionQueryBaselineTests.cs | 5 +- .../Query/Pipeline/FullPipelineTests.cs | 3 +- .../Query/QueryPartitionProviderTests.cs | 6 +- .../Query/QueryPlanBaselineTests.cs | 48 +- .../Query/QueryPlanRetrieverTests.cs | 4 + .../Routing/PartitionRoutingHelperTest.cs | 1 + .../Tracing/TraceWriterBaselineTests.cs | 3 +- 29 files changed, 805 insertions(+), 49 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 21b512166e..fec5fa4d4a 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -248,6 +248,7 @@ private static async Task> TryCreateCoreContextAsy cosmosQueryContext.ResourceTypeEnum, partitionKeyDefinition, inputParameters.PartitionKey != null, + containerQueryProperties.GeospatialType, cosmosQueryContext.UseSystemPrefix, createQueryPipelineTrace, cancellationToken); diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/ContainerQueryProperties.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/ContainerQueryProperties.cs index 4d80412388..0baaceb9c6 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/ContainerQueryProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/ContainerQueryProperties.cs @@ -11,15 +11,18 @@ internal readonly struct ContainerQueryProperties public ContainerQueryProperties( string resourceId, string effectivePartitionKeyString, - PartitionKeyDefinition partitionKeyDefinition) + PartitionKeyDefinition partitionKeyDefinition, + Cosmos.GeospatialType geospatialType) { this.ResourceId = resourceId; this.EffectivePartitionKeyString = effectivePartitionKeyString; this.PartitionKeyDefinition = partitionKeyDefinition; + this.GeospatialType = geospatialType; } public string ResourceId { get; } public string EffectivePartitionKeyString { get; } public PartitionKeyDefinition PartitionKeyDefinition { get; } + public Cosmos.GeospatialType GeospatialType { get; } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs index e066ec2140..c2bcf91619 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs @@ -47,6 +47,7 @@ public abstract Task> TryGetPartitionedQ bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, + Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken); public abstract Task> ExecuteItemQueryAsync( diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs index 8d09a074c9..6e7b0b4a8f 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs @@ -118,7 +118,8 @@ public TryCatch TryGetPartitionedQueryExecutionIn bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, - bool useSystemPrefix) + bool useSystemPrefix, + GeospatialType geospatialType) { TryCatch tryGetInternalQueryInfo = this.TryGetPartitionedQueryExecutionInfoInternal( querySpecJsonString: querySpecJsonString, @@ -128,7 +129,8 @@ public TryCatch TryGetPartitionedQueryExecutionIn allowNonValueAggregateQuery: allowNonValueAggregateQuery, hasLogicalPartitionKey: hasLogicalPartitionKey, allowDCount: allowDCount, - useSystemPrefix: useSystemPrefix); + useSystemPrefix: useSystemPrefix, + geospatialType: geospatialType); if (!tryGetInternalQueryInfo.Succeeded) { return TryCatch.FromException(tryGetInternalQueryInfo.Exception); @@ -169,7 +171,8 @@ internal TryCatch TryGetPartitionedQueryE bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, - bool useSystemPrefix) + bool useSystemPrefix, + GeospatialType geospatialType) { if (querySpecJsonString == null || partitionKeyDefinition == null) { @@ -200,7 +203,6 @@ internal TryCatch TryGetPartitionedQueryE } PartitionKind partitionKind = partitionKeyDefinition.Kind; - GeospatialType defaultGeopatialType = GeospatialType.Geography; this.Initialize(); @@ -219,7 +221,7 @@ internal TryCatch TryGetPartitionedQueryE bIsContinuationExpected = Convert.ToInt32(isContinuationExpected), bRequireFormattableOrderByQuery = Convert.ToInt32(requireFormattableOrderByQuery), bUseSystemPrefix = Convert.ToInt32(useSystemPrefix), - eGeospatialType = Convert.ToInt32(defaultGeopatialType), + eGeospatialType = Convert.ToInt32(geospatialType), ePartitionKind = Convert.ToInt32(partitionKind) }; diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanHandler.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanHandler.cs index e6f8ec06bf..30be0a4903 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanHandler.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanHandler.cs @@ -29,6 +29,7 @@ public async Task> TryGetQueryPlanAsync( QueryFeatures supportedQueryFeatures, bool hasLogicalPartitionKey, bool useSystemPrefix, + GeospatialType geospatialType, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); @@ -49,6 +50,7 @@ public async Task> TryGetQueryPlanAsync( partitionKeyDefinition, hasLogicalPartitionKey, useSystemPrefix, + geospatialType, cancellationToken); if (!tryGetQueryInfo.Succeeded) { @@ -76,6 +78,7 @@ public async Task> TryGetQueryPlanAsync( PartitionKeyDefinition partitionKeyDefinition, bool hasLogicalPartitionKey, bool useSystemPrefix, + GeospatialType geospatialType, CancellationToken cancellationToken = default) { if (sqlQuerySpec == null) @@ -96,6 +99,7 @@ public async Task> TryGetQueryPlanAsync( partitionKeyDefinition, hasLogicalPartitionKey, useSystemPrefix, + geospatialType, cancellationToken); if (tryGetQueryInfo.Failed) { @@ -114,6 +118,7 @@ private Task> TryGetQueryInfoAsync( PartitionKeyDefinition partitionKeyDefinition, bool hasLogicalPartitionKey, bool useSystemPrefix, + Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken = default) { cancellationToken.ThrowIfCancellationRequested(); @@ -128,6 +133,7 @@ private Task> TryGetQueryInfoAsync( hasLogicalPartitionKey: hasLogicalPartitionKey, allowDCount: true, useSystemPrefix: useSystemPrefix, + geospatialType: geospatialType, cancellationToken: cancellationToken); } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs index 6a6d7d5777..32e061dfd8 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs @@ -38,6 +38,7 @@ public static async Task GetQueryPlanWithServiceI Documents.ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool hasLogicalPartitionKey, + GeospatialType geospatialType, bool useSystemPrefix, ITrace trace, CancellationToken cancellationToken = default) @@ -70,6 +71,7 @@ public static async Task GetQueryPlanWithServiceI QueryPlanRetriever.SupportedQueryFeatures, hasLogicalPartitionKey, useSystemPrefix, + geospatialType, cancellationToken); if (!tryGetQueryPlan.Succeeded) diff --git a/Microsoft.Azure.Cosmos/src/Query/v2Query/DefaultDocumentQueryExecutionContext.cs b/Microsoft.Azure.Cosmos/src/Query/v2Query/DefaultDocumentQueryExecutionContext.cs index e3425f3199..b53c3c5c71 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v2Query/DefaultDocumentQueryExecutionContext.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v2Query/DefaultDocumentQueryExecutionContext.cs @@ -319,6 +319,7 @@ private static bool ServiceInteropAvailable() partitionKeyDefinition: partitionKeyDefinition, queryPartitionProvider: queryPartitionProvider, clientApiVersion: version, + geospatialType: collection.GeospatialConfig.GeospatialType, out QueryInfo _); } else if (request.Properties != null && request.Properties.TryGetValue( diff --git a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs index 52458f35f1..ec4e6d9185 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs @@ -160,6 +160,7 @@ public async Task GetPartitionedQueryExecutionInf bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, + Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) { cancellationToken.ThrowIfCancellationRequested(); @@ -174,6 +175,7 @@ public async Task GetPartitionedQueryExecutionInf allowNonValueAggregateQuery: allowNonValueAggregateQuery, hasLogicalPartitionKey: hasLogicalPartitionKey, allowDCount: allowDCount, + geospatialType: geospatialType, useSystemPrefix: false); if (!tryGetPartitionedQueryExecutionInfo.Succeeded) { diff --git a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextFactory.cs index 63f17406c5..f7861f5a2c 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextFactory.cs @@ -104,6 +104,7 @@ public static async Task CreateDocumentQueryExec allowNonValueAggregateQuery: true, hasLogicalPartitionKey: feedOptions.PartitionKey != null, allowDCount: true, + geospatialType: collection.GeospatialConfig.GeospatialType, cancellationToken: token); if (DocumentQueryExecutionContextFactory.ShouldCreateSpecializedDocumentQueryExecutionContext( diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs index e541f51774..138f32c593 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs @@ -74,7 +74,8 @@ public override async Task GetCachedContainerQueryProp return new ContainerQueryProperties( containerProperties.ResourceId, effectivePartitionKeyString, - containerProperties.PartitionKey); + containerProperties.PartitionKey, + containerProperties.GeospatialConfig.GeospatialType); } public override async Task> TryGetPartitionedQueryExecutionInfoAsync( @@ -87,6 +88,7 @@ public override async Task> TryGetPartit bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, + Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) { string queryString = null; @@ -109,7 +111,8 @@ public override async Task> TryGetPartit allowNonValueAggregateQuery: allowNonValueAggregateQuery, hasLogicalPartitionKey: hasLogicalPartitionKey, allowDCount: allowDCount, - useSystemPrefix: useSystemPrefix); + useSystemPrefix: useSystemPrefix, + geospatialType: geospatialType); } public override async Task> ExecuteItemQueryAsync( diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs index 60b8db6776..0018eca9b7 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs @@ -351,6 +351,7 @@ public override async Task TryExecuteQueryAsync( string continuationToken, FeedRangeInternal feedRangeInternal, QueryRequestOptions requestOptions, + GeospatialType geospatialType, CancellationToken cancellationToken = default) { if (queryDefinition == null) @@ -418,6 +419,7 @@ public override async Task TryExecuteQueryAsync( partitionKeyDefinition, requestOptions.PartitionKey.HasValue, useSystemPrefix: QueryIterator.IsSystemPrefixExpected(requestOptions), + geospatialType: geospatialType, cancellationToken); if (tryGetQueryInfoAndIfSupported.Failed) diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInternal.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInternal.cs index e6d21ba01a..920fc5d694 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInternal.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInternal.cs @@ -71,6 +71,7 @@ public abstract Task TryExecuteQueryAsync( string continuationToken, FeedRangeInternal feedRangeInternal, QueryRequestOptions requestOptions, + GeospatialType geospatialType, CancellationToken cancellationToken = default); public abstract FeedIterator GetStandByFeedIterator( diff --git a/Microsoft.Azure.Cosmos/src/Routing/PartitionRoutingHelper.cs b/Microsoft.Azure.Cosmos/src/Routing/PartitionRoutingHelper.cs index a91c1dba5f..68f6214f17 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/PartitionRoutingHelper.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/PartitionRoutingHelper.cs @@ -37,6 +37,7 @@ public static IReadOnlyList> GetProvidedPartitionKeyRanges( PartitionKeyDefinition partitionKeyDefinition, QueryPartitionProvider queryPartitionProvider, string clientApiVersion, + Cosmos.GeospatialType geospatialType, out QueryInfo queryInfo) { if (querySpecJsonString == null) @@ -62,7 +63,8 @@ public static IReadOnlyList> GetProvidedPartitionKeyRanges( allowNonValueAggregateQuery: allowNonValueAggregates, hasLogicalPartitionKey: hasLogicalPartitionKey, allowDCount: allowDCount, - useSystemPrefix: useSystemPrefix); + useSystemPrefix: useSystemPrefix, + geospatialType: geospatialType); if (!tryGetPartitionQueryExecutionInfo.Succeeded) { throw new BadRequestException(tryGetPartitionQueryExecutionInfo.Exception); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs index ca6f1495f5..da6d79c333 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs @@ -1589,7 +1589,8 @@ public async Task ItemEpkQuerySingleKeyRangeValidation() ContainerQueryProperties containerQueryProperties = new ContainerQueryProperties( containerResponse.Resource.ResourceId, null, - containerResponse.Resource.PartitionKey); + containerResponse.Resource.PartitionKey, + containerResponse.Resource.GeospatialConfig.GeospatialType); // There should only be one range since the EPK option is set. List partitionKeyRanges = await CosmosQueryExecutionContextFactory.GetTargetPartitionKeyRangesAsync( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs index 8e36c206f1..1e26ef0738 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs @@ -55,7 +55,8 @@ public async Task GetTargetPartitionKeyRangesAsyncWithFeedRange() ContainerQueryProperties containerQueryProperties = new ContainerQueryProperties( containerResponse.Resource.ResourceId, null, - containerResponse.Resource.PartitionKey); + containerResponse.Resource.PartitionKey, + containerResponse.Resource.GeospatialConfig.GeospatialType); IReadOnlyList feedTokens = await container.GetFeedRangesAsync(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/PartitioningQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/PartitioningQueryTests.cs index c925c95d67..ed61b8fc8e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/PartitioningQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/PartitioningQueryTests.cs @@ -489,5 +489,90 @@ async Task ImplementationAsync( Assert.IsTrue(actualPartitionKeyValues.SetEquals(args.ExpectedPartitionKeyValues)); } } + + [TestMethod] + public async Task TestGeospatial() + { + string[] inputDocs = new[] + { + @"{""id"":""documentId1"",""key"":""A"",""prop"":3,""shortArray"":[{""a"":5}]}", + @"{""id"":""documentId2"",""key"":""A"",""prop"":2,""shortArray"":[{""a"":6}]}", + @"{""id"":""documentId3"",""key"":""A"",""prop"":1,""shortArray"":[{""a"":7}]}", + @"{""id"":""documentId4"",""key"":5,""prop"":3,""shortArray"":[{""a"":5}]}", + @"{""id"":""documentId5"",""key"":5,""prop"":2,""shortArray"":[{""a"":6}]}", + @"{""id"":""documentId6"",""key"":5,""prop"":1,""shortArray"":[{""a"":7}]}", + @"{""id"":""documentId10"",""prop"":3,""shortArray"":[{""a"":5}]}", + @"{""id"":""documentId11"",""prop"":2,""shortArray"":[{""a"":6}]}", + @"{""id"":""documentId12"",""prop"":1,""shortArray"":[{""a"":7}]}", + }; + + string All = "documentId4,documentId5,documentId6,documentId10,documentId11,documentId12,documentId1,documentId2,documentId3"; + string None = string.Empty; + var testVariations = new[] + { + new + { + Query = "SELECT c.id FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, {'type': 'Point', 'coordinates': [30, 10]}) > 66408.034483", + Expected = new Dictionary + { + { Cosmos.GeospatialType.Geography, All }, + { Cosmos.GeospatialType.Geometry, None }, + } + }, + new + { + Query = "SELECT c.id FROM c WHERE ST_ISVALID({'type': 'Polygon', 'coordinates': [[[-1000, 1000], [1000, 1000], [1000, 4000], [-1000, 4000], [-1000, 1000]]]})", + Expected = new Dictionary + { + { Cosmos.GeospatialType.Geography, None }, + { Cosmos.GeospatialType.Geometry, All }, + } + }, + new + { + Query = "SELECT * FROM c WHERE NOT ST_WITHIN({'type': 'Point', 'coordinates': [0, 40]}, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]})", + Expected = new Dictionary + { + { Cosmos.GeospatialType.Geography, All }, + { Cosmos.GeospatialType.Geometry, None }, + } + }, + }; + + foreach (Cosmos.GeospatialType geospatialType in new[] { Cosmos.GeospatialType.Geography, Cosmos.GeospatialType.Geometry }) + { + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct, + CollectionTypes.MultiPartition, + inputDocs, + ImplementationAsync, + "/key", + geospatialType: geospatialType); + + async Task ImplementationAsync(Container container, IReadOnlyList documents) + { + foreach (var testVariation in testVariations) + { + string expectedResult = string.Join(",", testVariation.Expected[geospatialType]); + + FeedIterator resultSetIterator = container.GetItemQueryIterator( + queryText: testVariation.Query, + requestOptions: new QueryRequestOptions()); + + List result = new List(); + while (resultSetIterator.HasMoreResults) + { + result.AddRange(await resultSetIterator.ReadNextAsync()); + } + + string resultDocIds = string.Join(",", result.Select(doc => doc.Id)); + Assert.AreEqual( + expectedResult, + resultDocIds, + $"{Environment.NewLine}Query failed for geospatial type '{geospatialType}'{Environment.NewLine}{testVariation.Query}"); + } + } + } + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs index f40015473a..269e8448bd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs @@ -113,12 +113,14 @@ private async Task> GetPartitionKeyRanges(Conta private async Task CreateMultiPartitionContainer( string partitionKey = "/id", - Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null) + Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { ContainerResponse containerResponse = await this.CreatePartitionedContainer( throughput: 25000, partitionKey: partitionKey, - indexingPolicy: indexingPolicy); + indexingPolicy: indexingPolicy, + geospatialType); IReadOnlyList ranges = await this.GetPartitionKeyRanges(containerResponse); Assert.IsTrue( @@ -130,12 +132,14 @@ private async Task CreateMultiPartitionContainer( private async Task CreateSinglePartitionContainer( string partitionKey = "/id", - Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null) + Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { ContainerResponse containerResponse = await this.CreatePartitionedContainer( throughput: 4000, partitionKey: partitionKey, - indexingPolicy: indexingPolicy); + indexingPolicy: indexingPolicy, + geospatialType: geospatialType); Assert.IsNotNull(containerResponse); Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode); @@ -149,13 +153,15 @@ private async Task CreateSinglePartitionContainer( } private async Task CreateNonPartitionedContainerAsync( - Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null) + Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { string containerName = Guid.NewGuid().ToString() + "container"; await NonPartitionedContainerHelper.CreateNonPartitionedContainer( this.database, containerName, - indexingPolicy == null ? null : JsonConvert.SerializeObject(indexingPolicy)); + indexingPolicy == null ? null : JsonConvert.SerializeObject(indexingPolicy), + geospatialType); return this.database.GetContainer(containerName); } @@ -163,7 +169,8 @@ await NonPartitionedContainerHelper.CreateNonPartitionedContainer( private async Task CreatePartitionedContainer( int throughput, string partitionKey = "/id", - Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null) + Microsoft.Azure.Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { // Assert that database exists (race deletes are possible when used concurrently) ResponseMessage responseMessage = await this.database.ReadStreamAsync(); @@ -192,7 +199,8 @@ private async Task CreatePartitionedContainer( { Paths = new Collection { partitionKey }, Kind = PartitionKind.Hash - } + }, + GeospatialConfig = new Cosmos.GeospatialConfig(geospatialType) }, // This throughput needs to be about half the max with multi master // otherwise it will create about twice as many partitions. @@ -208,50 +216,57 @@ private async Task CreatePartitionedContainer( private Task<(Container, IReadOnlyList)> CreateNonPartitionedContainerAndIngestDocumentsAsync( IEnumerable documents, - Cosmos.IndexingPolicy indexingPolicy = null) + Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { return this.CreateContainerAndIngestDocumentsAsync( CollectionTypes.NonPartitioned, documents, partitionKey: null, - indexingPolicy: indexingPolicy); + indexingPolicy: indexingPolicy, + geospatialType: geospatialType); } private Task<(Container, IReadOnlyList)> CreateSinglePartitionContainerAndIngestDocumentsAsync( IEnumerable documents, string partitionKey = "/id", - Cosmos.IndexingPolicy indexingPolicy = null) + Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { return this.CreateContainerAndIngestDocumentsAsync( CollectionTypes.SinglePartition, documents, partitionKey, - indexingPolicy); + indexingPolicy, + geospatialType); } private Task<(Container, IReadOnlyList)> CreateMultiPartitionContainerAndIngestDocumentsAsync( IEnumerable documents, string partitionKey = "/id", - Cosmos.IndexingPolicy indexingPolicy = null) + Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { return this.CreateContainerAndIngestDocumentsAsync( CollectionTypes.MultiPartition, documents, partitionKey, - indexingPolicy); + indexingPolicy, + geospatialType); } private async Task<(Container, IReadOnlyList)> CreateContainerAndIngestDocumentsAsync( CollectionTypes collectionType, IEnumerable documents, string partitionKey = "/id", - Cosmos.IndexingPolicy indexingPolicy = null) + Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { Container container = collectionType switch { - CollectionTypes.NonPartitioned => await this.CreateNonPartitionedContainerAsync(indexingPolicy), - CollectionTypes.SinglePartition => await this.CreateSinglePartitionContainer(partitionKey, indexingPolicy), - CollectionTypes.MultiPartition => await this.CreateMultiPartitionContainer(partitionKey, indexingPolicy), + CollectionTypes.NonPartitioned => await this.CreateNonPartitionedContainerAsync(indexingPolicy, geospatialType), + CollectionTypes.SinglePartition => await this.CreateSinglePartitionContainer(partitionKey, indexingPolicy, geospatialType), + CollectionTypes.MultiPartition => await this.CreateMultiPartitionContainer(partitionKey, indexingPolicy, geospatialType), _ => throw new ArgumentException($"Unknown {nameof(CollectionTypes)} : {collectionType}"), }; List insertedDocuments = new List(); @@ -369,7 +384,8 @@ internal Task CreateIngestQueryDeleteAsync( Query query, string partitionKey = "/id", Cosmos.IndexingPolicy indexingPolicy = null, - CosmosClientFactory cosmosClientFactory = null) + CosmosClientFactory cosmosClientFactory = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { Task queryWrapper(Container container, IReadOnlyList inputDocuments, object throwaway) { @@ -384,7 +400,8 @@ Task queryWrapper(Container container, IReadOnlyList inputDocument null, partitionKey, indexingPolicy, - cosmosClientFactory); + cosmosClientFactory, + geospatialType); } internal Task CreateIngestQueryDeleteAsync( @@ -395,7 +412,8 @@ internal Task CreateIngestQueryDeleteAsync( T testArgs, string partitionKey = "/id", Cosmos.IndexingPolicy indexingPolicy = null, - CosmosClientFactory cosmosClientFactory = null) + CosmosClientFactory cosmosClientFactory = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { return this.CreateIngestQueryDeleteAsync( connectionModes, @@ -405,7 +423,8 @@ internal Task CreateIngestQueryDeleteAsync( cosmosClientFactory ?? this.CreateDefaultCosmosClient, testArgs, partitionKey, - indexingPolicy); + indexingPolicy, + geospatialType); } /// @@ -434,7 +453,8 @@ internal async Task CreateIngestQueryDeleteAsync( CosmosClientFactory cosmosClientFactory, T testArgs, string partitionKey = "/id", - Cosmos.IndexingPolicy indexingPolicy = null) + Cosmos.IndexingPolicy indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { try { @@ -450,15 +470,18 @@ internal async Task CreateIngestQueryDeleteAsync( { CollectionTypes.NonPartitioned => this.CreateNonPartitionedContainerAndIngestDocumentsAsync( documents, - indexingPolicy), + indexingPolicy, + geospatialType), CollectionTypes.SinglePartition => this.CreateSinglePartitionContainerAndIngestDocumentsAsync( documents, partitionKey, - indexingPolicy), + indexingPolicy, + geospatialType), CollectionTypes.MultiPartition => this.CreateMultiPartitionContainerAndIngestDocumentsAsync( documents, partitionKey, - indexingPolicy), + indexingPolicy, + geospatialType), _ => throw new ArgumentException($"Unknown {nameof(CollectionTypes)} : {collectionType}"), }; collectionsAndDocuments.Add(await createContainerTask); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs index bc04ba6ebe..60ab6f9fe4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs @@ -604,7 +604,8 @@ private async Task TestTryExecuteQueryHelper( MaxItemCount = maxItemCount, }, feedRangeInternal: null, - continuationToken: continuationToken); + continuationToken: continuationToken, + geospatialType: Cosmos.GeospatialType.Geography); if (canSupportExpected) { @@ -637,7 +638,8 @@ private async Task TestTryExecuteQueryHelper( MaxItemCount = 1, }, feedRangeInternal: null, - continuationToken: null); + continuationToken: null, + geospatialType: Cosmos.GeospatialType.Geography); Assert.IsTrue(tryExecuteQueryResult is ContainerInternal.FailedToGetQueryPlanResult); } @@ -653,7 +655,8 @@ private async Task TestTryExecuteQueryHelper( MaxItemCount = 1, }, feedRangeInternal: new FeedRangePartitionKeyRange("0"), // filtering on a PkRangeId. - continuationToken: null); + continuationToken: null, + geospatialType: Cosmos.GeospatialType.Geography); Assert.IsTrue(tryExecuteQueryResult is ContainerInternal.QueryPlanIsSupportedResult); ContainerInternal.QueryPlanIsSupportedResult queryPlanIsSupportedResult = (ContainerInternal.QueryPlanIsSupportedResult)tryExecuteQueryResult; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/NonPartitionedContainerHelper.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/NonPartitionedContainerHelper.cs index 8748360c9a..0482695ec2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/NonPartitionedContainerHelper.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/NonPartitionedContainerHelper.cs @@ -18,7 +18,8 @@ internal static class NonPartitionedContainerHelper internal static async Task CreateNonPartitionedContainer( Cosmos.Database database, string containerId, - string indexingPolicy = null) + string indexingPolicy = null, + Cosmos.GeospatialType geospatialType = Cosmos.GeospatialType.Geography) { DocumentCollection documentCollection = new DocumentCollection() { @@ -30,6 +31,13 @@ internal static async Task CreateNonPartitionedContainer( documentCollection.IndexingPolicy = JsonConvert.DeserializeObject(indexingPolicy); } + documentCollection.GeospatialConfig = geospatialType switch + { + Cosmos.GeospatialType.Geography => new GeospatialConfig(GeospatialType.Geography), + Cosmos.GeospatialType.Geometry => new GeospatialConfig(GeospatialType.Geometry), + _ => throw new InvalidOperationException($"Unsupported geospatialType {geospatialType}") + }; + await NonPartitionedContainerHelper.CreateNonPartitionedContainer( database, documentCollection); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Query/ParsingBenchmark.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Query/ParsingBenchmark.cs index 9ac18a7068..2a17267604 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Query/ParsingBenchmark.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Query/ParsingBenchmark.cs @@ -126,7 +126,8 @@ private static void ParseUsingNativeParser(SqlQuerySpec sqlQuerySpec) allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); tryGetQueryPlan.ThrowIfFailed(); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml new file mode 100644 index 0000000000..1d67b08708 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml @@ -0,0 +1,548 @@ + + + + ST_DISTANCE Constant Foldable Geography + SELECT * FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, {'type': 'Point', 'coordinates': [30, 10]}) > 66408.034483 + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_DISTANCE Constant Foldable Geometry + SELECT * FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, {'type': 'Point', 'coordinates': [30, 10]}) > 66408.034483 + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],[]] + + + + + + + + + ST_DISTANCE Geography + SELECT * FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, c.geojson) > 66408.034483 + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_DISTANCE Geometry + SELECT * FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, c.geojson) > 66408.034483 + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_INTERSECTS Constant Foldable Geography + SELECT * FROM c WHERE ST_INTERSECTS({'type':'LineString', 'coordinates':[ [ 0, 0 ], [ 0, 40 ] ]}, {'type':'Polygon',"coordinates":[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],[]] + + + + + + + + + ST_INTERSECTS Constant Foldable Geometry + SELECT * FROM c WHERE ST_INTERSECTS({'type':'LineString', 'coordinates':[ [ 0, 0 ], [ 0, 40 ] ]}, {'type':'Polygon',"coordinates":[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_INTERSECTS Geography + SELECT * FROM c WHERE ST_INTERSECTS(c.geojson, {'type':'Polygon',"coordinates":[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_INTERSECTS Geometry + SELECT * FROM c WHERE ST_INTERSECTS(c.geojson, {'type':'Polygon',"coordinates":[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_ISVALID Constant Foldable Geography + SELECT * FROM c WHERE ST_ISVALID({'type': 'Polygon', 'coordinates': [[[-1000, 1000], [1000, 1000], [1000, 4000], [-1000, 4000], [-1000, 1000]]]}) + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],[]] + + + + + + + + + ST_ISVALID Constant Foldable Geometry + SELECT * FROM c WHERE ST_ISVALID({'type': 'Polygon', 'coordinates': [[[-1000, 1000], [1000, 1000], [1000, 4000], [-1000, 4000], [-1000, 1000]]]}) + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_ISVALID Geography + SELECT * FROM c WHERE ST_ISVALID(c.geojson) + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_ISVALID Geometry + SELECT * FROM c WHERE ST_ISVALID(c.geojson) + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_WITHIN Constant Foldable Geography + SELECT * FROM c WHERE NOT ST_WITHIN({'type': 'Point', 'coordinates': [0, 40]}, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_WITHIN Constant Foldable Geometry + SELECT * FROM c WHERE NOT ST_WITHIN({'type': 'Point', 'coordinates': [0, 40]}, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],[]] + + + + + + + + + ST_WITHIN Geography + SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, + {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geography + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + + + ST_WITHIN Geometry + SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, + {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + + /key + + Hash + Geometry + + + + + None + + + + + + + + + + False + + + + [[],"Infinity") + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj index 2fe8b7feec..ef7e193dbf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj @@ -222,6 +222,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index c2ac15064d..960235dcae 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -388,7 +388,8 @@ private static PartitionedQueryExecutionInfo GetPartitionedQueryExecutionInfo(st allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); return tryGetQueryPlan.Result; } @@ -611,7 +612,7 @@ public override Task> TryGetOverlappingRangesAs throw new NotImplementedException(); } - public override Task> TryGetPartitionedQueryExecutionInfoAsync(SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, CancellationToken cancellationToken) + public override Task> TryGetPartitionedQueryExecutionInfoAsync(SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) { throw new NotImplementedException(); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs index e1cc776d4f..0f8f6f2be7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/FullPipelineTests.cs @@ -421,7 +421,8 @@ private static QueryInfo GetQueryPlan(string query) allowNonValueAggregateQuery: true, allowDCount: true, hasLogicalPartitionKey: false, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); info.ThrowIfFailed(); return info.Result.QueryInfo; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPartitionProviderTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPartitionProviderTests.cs index ccd7a81dfd..e4e6f48846 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPartitionProviderTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPartitionProviderTests.cs @@ -39,7 +39,8 @@ public void TestQueryPartitionProviderUpdate() allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); Assert.IsTrue(tryGetQueryPlan.Failed); Assert.IsTrue(tryGetQueryPlan.Exception.ToString().Contains("The SQL query text exceeded the maximum limit of 5 characters")); @@ -54,7 +55,8 @@ public void TestQueryPartitionProviderUpdate() allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); Assert.IsTrue(tryGetQueryPlan.Succeeded); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanBaselineTests.cs index dbdace2923..79d674d7b9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanBaselineTests.cs @@ -15,6 +15,7 @@ using System.Linq; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.Aggregate; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.OrderBy; + using Microsoft.Azure.Cosmos.Serialization.HybridRow.Schemas; /// /// Tests for . @@ -1292,6 +1293,44 @@ public void SystemFunctions() this.ExecuteTestSuite(testVariations); } + [TestMethod] + [Owner("adityasa")] + public void Spatial() + { + var variations = new[] + { + // ST_DISTANCE + new { Description = @"ST_DISTANCE Constant Foldable", Query = @"SELECT * FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, {'type': 'Point', 'coordinates': [30, 10]}) > 66408.034483" }, + new { Description = @"ST_DISTANCE", Query = @"SELECT * FROM c WHERE ST_DISTANCE({'type': 'Polygon', 'coordinates': [[[35, 10], [45, 45], [15, 40], [10, 20], [35, 10]], [[20, 30], [35, 35], [30, 20], [20, 30]]]}, c.geojson) > 66408.034483" }, + + // ST_INTERSECTS + new { Description = @"ST_INTERSECTS Constant Foldable", Query = @"SELECT * FROM c WHERE ST_INTERSECTS({'type':'LineString', 'coordinates':[ [ 0, 0 ], [ 0, 40 ] ]}, {'type':'Polygon',""coordinates"":[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]})" }, + new { Description = @"ST_INTERSECTS", Query = @"SELECT * FROM c WHERE ST_INTERSECTS(c.geojson, {'type':'Polygon',""coordinates"":[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]})" }, + + // ST_ISVALID + new { Description = @"ST_ISVALID Constant Foldable", Query = @"SELECT * FROM c WHERE ST_ISVALID({'type': 'Polygon', 'coordinates': [[[-1000, 1000], [1000, 1000], [1000, 4000], [-1000, 4000], [-1000, 1000]]]})" }, + new { Description = @"ST_ISVALID", Query = @"SELECT * FROM c WHERE ST_ISVALID(c.geojson)" }, + + // ST_WITHIN + new { Description = @"ST_WITHIN Constant Foldable", Query = @"SELECT * FROM c WHERE NOT ST_WITHIN({'type': 'Point', 'coordinates': [0, 40]}, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]})" }, + new { Description = @"ST_WITHIN", Query = @"SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]})" }, + }; + + List testVariations = variations + .SelectMany(variation => + { + PartitionKeyDefinition pkDefinitions = CreateHashPartitionKey("/key"); + return new List + { + new QueryPlanBaselineTestInput($"{variation.Description} Geography", pkDefinitions, new SqlQuerySpec(variation.Query)) { GeospatialType = Cosmos.GeospatialType.Geography }, + new QueryPlanBaselineTestInput($"{variation.Description} Geometry", pkDefinitions, new SqlQuerySpec(variation.Query)) { GeospatialType = Cosmos.GeospatialType.Geometry } + }; + }) + .ToList(); + + this.ExecuteTestSuite(testVariations); + } + private static PartitionKeyDefinition CreateHashPartitionKey( params string[] partitionKeys) => new PartitionKeyDefinition() { @@ -1386,7 +1425,8 @@ public override QueryPlanBaselineTestOutput ExecuteTest(QueryPlanBaselineTestInp allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: input.GeospatialType ?? Cosmos.GeospatialType.Geography); if (info.Failed) { @@ -1401,6 +1441,7 @@ public sealed class QueryPlanBaselineTestInput : BaselineTestInput { internal PartitionKeyDefinition PartitionKeyDefinition { get; set; } internal SqlQuerySpec SqlQuerySpec { get; set; } + internal Cosmos.GeospatialType? GeospatialType { get; set; } internal QueryPlanBaselineTestInput( string description, @@ -1434,6 +1475,11 @@ public override void SerializeAsXml(XmlWriter xmlWriter) this.PartitionKeyDefinition.Kind == PartitionKind.MultiHash ? "MultiHash" : "Range")); } + if (this.GeospatialType != null) + { + xmlWriter.WriteElementString("GeospatialType", this.GeospatialType.Value.ToString()); + } + if (this.SqlQuerySpec.ShouldSerializeParameters()) { xmlWriter.WriteStartElement("QueryParameters"); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs index ffad405d08..47a681eb1a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs @@ -38,6 +38,7 @@ public async Task ServiceInterop_BadRequestContainsInnerException() It.IsAny(), It.IsAny(), It.IsAny(), + It.IsAny(), It.IsAny())).ReturnsAsync(TryCatch.FromException(innerException)); Mock trace = new Mock(); @@ -47,6 +48,7 @@ public async Task ServiceInterop_BadRequestContainsInnerException() ResourceType.Document, new Documents.PartitionKeyDefinition() { Paths = new Collection() { "/id" } }, hasLogicalPartitionKey: false, + geospatialType: Cosmos.GeospatialType.Geography, useSystemPrefix: false, trace.Object, default)); @@ -73,6 +75,7 @@ public async Task ServiceInterop_BadRequestContainsOriginalCosmosException() It.IsAny(), It.IsAny(), It.IsAny(), + It.IsAny(), It.IsAny())).ReturnsAsync(TryCatch.FromException(expectedException)); Mock trace = new Mock(); @@ -82,6 +85,7 @@ public async Task ServiceInterop_BadRequestContainsOriginalCosmosException() ResourceType.Document, new Documents.PartitionKeyDefinition() { Paths = new Collection() { "/id" } }, hasLogicalPartitionKey: false, + geospatialType: Cosmos.GeospatialType.Geography, useSystemPrefix: false, trace.Object, default)); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs index 0201b92327..35ffaa65bb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs @@ -348,6 +348,7 @@ FROM c partitionKeyDefinition: new PartitionKeyDefinition { Paths = new Collection { testcase.PartitionKey }, Kind = PartitionKind.Hash }, queryPartitionProvider: QueryPartitionProviderTestInstance.Object, clientApiVersion: testcase.ClientApiVersion, + geospatialType: Cosmos.GeospatialType.Geography, out QueryInfo info); Assert.Fail(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs index 2421060b65..eace2eb9df 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs @@ -815,7 +815,8 @@ private static QueryInfo GetQueryPlan(string query) allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, - useSystemPrefix: false); + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); info.ThrowIfFailed(); return info.Result.QueryInfo; From acd899e5c0be882c5e962103cc626ee8495a07a8 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 9 Nov 2022 11:04:47 -0800 Subject: [PATCH 011/164] [Internal] Documentation: Refactors cache content on its own document (#3554) * Add cache file * Moving content away --- docs/SdkDesign.md | 76 ++++------------------------------------------- docs/caches.md | 67 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 70 deletions(-) create mode 100644 docs/caches.md diff --git a/docs/SdkDesign.md b/docs/SdkDesign.md index f277661544..f3f2ec1581 100644 --- a/docs/SdkDesign.md +++ b/docs/SdkDesign.md @@ -17,74 +17,6 @@ flowchart LR TransportClient <--> Service[(Cosmos DB Service)] ``` -## Address caches conceptual model - -![image](https://user-images.githubusercontent.com/6880899/199167007-bcc054c3-ecb1-4469-ba7d-eae52362e9cd.png) - - -- CollectionCache: Dictionary -- CollectionRoutingMap: Single collection PartitionKeyRanges map -- PartitionKeyRangeCache: Dictionary -- GlobalPartitionEndpointManager: Per partition override state. Every reqeust will flow throgh - - Today GlobalEndpointManager is at region scope only and doesn't look at the partition - - Ideal abstraction is to fold it into GlobalEndpointManager --> extra hash computation - - Posible to refactor direct code and flow HashedValue down stream (more contract work with direct package) -- AddressResolver: It does use IAddressCache (Above diagram missing it) - - -```mermaid -flowchart LR - subgraph CDB_account - subgraph CDB_Account_Endpoint - CDB_EP[[CosmosDB-Account/Endpoint]] - end - - subgraph CDB_Account_Region1 - CDBR1_GW[[CosmosDB-Account/Gateway/Region1]] - CDBR1_BE[[CosmosDB-Account/Backend/Region1]] - end - subgraph CDB_Account_RegionN - CDBRN_GW[[CosmosDB-Account/Gateway/Region1]] - CDBRN_BE[[CosmosDB-Account/Backend/RegionN]] - end - end - subgraph AddressCaches - GAC1[GatewayAddressCache/R1] - GACN[GatewayAddressCache/RN] - - GAC1 --> |NonBlockingAsyncCache| CDBR1_GW - GAC1 -.-> CDBR1_BE - GACN --> |NonBlockingAsyncCache| CDBRN_GW - GACN -.-> CDBRN_BE - end -``` - -### Sequence of interaction - -```mermaid -sequenceDiagram - GlobalAddressResolver->>GlobalEndpointManager: ResolveServiceEndpoint(DocumentServiceRequest) - GlobalEndpointManager-->>GlobalAddressResolver: URI (ServingRegion) - GlobalAddressResolver->>GlobalAddressResolver: GetEndpointCache(ServingRegion).AddressResolver - - critical RegularAddressResolution(Implicit contract of dsr.RequestContext.ResolvedPartitionKeyRange population) - GlobalAddressResolver->>AddressResolver: ResolveAsync(DocumentServiceRequest) - AddressResolver-->>GlobalAddressResolver: PartitionAddressInformation - end - - critical AnyPerpartitionOverrides - GlobalAddressResolver->>GlobalPartitionEndpointManager: TryAddPartitionLevelLocationOverride(DocumentServiceRequest) - GlobalPartitionEndpointManager-->>GlobalAddressResolver: (bool, DSR.RequestContext.RouteToLocation) - - option YES - GlobalAddressResolver->>GlobalEndpointManager: ResolveServiceEndpoint(DocumentServiceRequest) - GlobalEndpointManager-->>GlobalAddressResolver: URI (ServingRegion) - end - GlobalAddressResolver->>GlobalAddressResolver: GetEndpointCache(ServingRegion) - GlobalAddressResolver->>AddressResolver: ResolveAsync(DocumentServiceRequest) - AddressResolver-->>GlobalAddressResolver: PartitionAddressInformation -``` - ## Handler pipeline The handler pipeline processes the RequestMessage and each handler can choose to augment it in different ways, as shown in our [handler samples](../Microsoft.Azure.Cosmos.Samples/Usage/Handlers/) and also handle certain error conditions and retry, like our own [RetryHandler](../Microsoft.Azure.Cosmos/src/Handler/RetryHandler.cs). The RetryHandler will handle any failures from the [Transport layer](#transport) that should be [handled as regional failovers](#cross-region-retries). @@ -234,6 +166,12 @@ flowchart ``` +## Direct mode caches + +Per our [connectivity documentation](https://learn.microsoft.com/azure/cosmos-db/nosql/sdk-connection-modes#routing), the SDK will store, in internal caches, critical information to allow for request routing. + +For details on the caches, please see the [cache design documentation](caches.md). + ## Consistency (direct mode) When performing operations through Direct mode, the SDK is involved in checking consistency for Bounded Staleness and Strong accounts. Read requests are handled by the [ConsistencyReader](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/msdata/direct/Microsoft.Azure.Cosmos/src/direct/ConsistencyReader.cs) and write requests are handled by the [ConsistencyWriter](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/msdata/direct/Microsoft.Azure.Cosmos/src/direct/ConsistencyWriter.cs). The `ConsistencyReader` uses the [QuorumReader](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/msdata/direct/Microsoft.Azure.Cosmos/src/direct/QuorumReader.cs) when the consistency is Bounded Staleness or Strong to verify quorum after performing two requests and comparing the LSNs. If quorum cannot be achieved, the SDK starts what is defined as "barrier requests" to the container and waits for it to achieve quorum. The `ConsistencyWriter` also performs a similar LSN check after receiving the response from the write, the `GlobalCommittedLSN` and the item `LSN`. If they don't match, barrier requests are also performed. @@ -248,5 +186,3 @@ flowchart LR ConsistencyWriter --> TCPClient ``` - - diff --git a/docs/caches.md b/docs/caches.md new file mode 100644 index 0000000000..91f5eea16f --- /dev/null +++ b/docs/caches.md @@ -0,0 +1,67 @@ +# Caches conceptual model + +![image](https://user-images.githubusercontent.com/6880899/199167007-bcc054c3-ecb1-4469-ba7d-eae52362e9cd.png) + + +- CollectionCache: Dictionary +- CollectionRoutingMap: Single collection PartitionKeyRanges map +- PartitionKeyRangeCache: Dictionary +- GlobalPartitionEndpointManager: Per partition override state. Every request will flow through + - Today GlobalEndpointManager is at region scope only and doesn't look at the partition + - Ideal abstraction is to fold it into GlobalEndpointManager --> extra hash computation + - Posible to refactor direct code and flow HashedValue down stream (more contract work with direct package) +- AddressResolver: It does use IAddressCache (Above diagram missing it) + + +```mermaid +flowchart LR + subgraph CDB_account + subgraph CDB_Account_Endpoint + CDB_EP[[CosmosDB-Account/Endpoint]] + end + + subgraph CDB_Account_Region1 + CDBR1_GW[[CosmosDB-Account/Gateway/Region1]] + CDBR1_BE[[CosmosDB-Account/Backend/Region1]] + end + subgraph CDB_Account_RegionN + CDBRN_GW[[CosmosDB-Account/Gateway/Region1]] + CDBRN_BE[[CosmosDB-Account/Backend/RegionN]] + end + end + subgraph AddressCaches + GAC1[GatewayAddressCache/R1] + GACN[GatewayAddressCache/RN] + + GAC1 --> |NonBlockingAsyncCache| CDBR1_GW + GAC1 -.-> CDBR1_BE + GACN --> |NonBlockingAsyncCache| CDBRN_GW + GACN -.-> CDBRN_BE + end +``` + +## Sequence of interaction + +```mermaid +sequenceDiagram + GlobalAddressResolver->>GlobalEndpointManager: ResolveServiceEndpoint(DocumentServiceRequest) + GlobalEndpointManager-->>GlobalAddressResolver: URI (ServingRegion) + GlobalAddressResolver->>GlobalAddressResolver: GetEndpointCache(ServingRegion).AddressResolver + + critical RegularAddressResolution(Implicit contract of dsr.RequestContext.ResolvedPartitionKeyRange population) + GlobalAddressResolver->>AddressResolver: ResolveAsync(DocumentServiceRequest) + AddressResolver-->>GlobalAddressResolver: PartitionAddressInformation + end + + critical AnyPerpartitionOverrides + GlobalAddressResolver->>GlobalPartitionEndpointManager: TryAddPartitionLevelLocationOverride(DocumentServiceRequest) + GlobalPartitionEndpointManager-->>GlobalAddressResolver: (bool, DSR.RequestContext.RouteToLocation) + + option YES + GlobalAddressResolver->>GlobalEndpointManager: ResolveServiceEndpoint(DocumentServiceRequest) + GlobalEndpointManager-->>GlobalAddressResolver: URI (ServingRegion) + end + GlobalAddressResolver->>GlobalAddressResolver: GetEndpointCache(ServingRegion) + GlobalAddressResolver->>AddressResolver: ResolveAsync(DocumentServiceRequest) + AddressResolver-->>GlobalAddressResolver: PartitionAddressInformation +``` \ No newline at end of file From 01c1cd447d567f7f1f77daf1d7807e76f5b2face Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Thu, 10 Nov 2022 22:29:39 +0000 Subject: [PATCH 012/164] [Internal] Emulator unit tests: Adds IdEncoding unit tests for ComputeGateway (#3556) * Adding IdEncoding unit tests for ComputeGateway * Reacting to code review feedback * Updating md files --- CONTRIBUTING.md | 6 ++ ...ComputeGatewayCosmosItemIdEncodingTests.cs | 16 ++++++ .../CosmosItemIdEncodingTestsBase.cs | 57 +++++++++++++++---- ...outingGatewayCosmosItemIdEncodingTests.cs} | 5 +- .../Utils/BaseCosmosClientHelper.cs | 8 ++- .../Utils/TestCommon.cs | 12 ++-- .../settings.json | 2 + templates/emulator-setup.yml | 2 +- 8 files changed, 87 insertions(+), 21 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputeGatewayCosmosItemIdEncodingTests.cs rename Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/{GatewayCosmosItemIdEncodingTests.cs => RoutingGatewayCosmosItemIdEncodingTests.cs} (63%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc1d06f852..e3cb1edc66 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -125,6 +125,12 @@ Or all through `Re-run failed checks` on the top right corner: ![Re-run all failures](docs/images/contributing-rerunall.png) +## Usage of Cosmos DB Emulator for running unit tests + +- - The same version of the emulator used in the CI pipelines can be downloaded [here](https://aka.ms/cosmosdb-emulator) +- More information about how ro use the emulator for development is documented [here](https://github.com/Azure/azure-documentdb-dotnet/blob/master/docs/documentdb-nosql-local-emulator.md) +- You can start the emulator with same parameters as the emulator unit tests in the CI pipeline via `.\CosmosDB.Emulator.exe /DisableRateLimiting /PartitionCount=100 /Consistency=Strong /enableRio /EnablePreview /EnableAadAuthentication /EnableSqlComputeEndpoint` + ## Troubleshooting - [General .NET SDK Troubleshooting](https://docs.microsoft.com/azure/cosmos-db/sql/troubleshoot-dot-net-sdk) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputeGatewayCosmosItemIdEncodingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputeGatewayCosmosItemIdEncodingTests.cs new file mode 100644 index 0000000000..a3dcb8b52a --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputeGatewayCosmosItemIdEncodingTests.cs @@ -0,0 +1,16 @@ +namespace Microsoft.Azure.Cosmos +{ + using Microsoft.Azure.Cosmos.Fluent; + using Microsoft.Azure.Cosmos.SDK.EmulatorTests; + + [TestClass] + public class ComputeGatewayCosmosItemIdEncodingTests : CosmosItemIdEncodingTestsBase + { + protected override string AccountEndpointOverride => Utils.ConfigurationManager.AppSettings["ComputeGatewayEndpoint"]; + + protected override void ConfigureClientBuilder(CosmosClientBuilder builder) + { + builder.WithConnectionModeGateway(); + } + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs index 36be8df06d..aef4323045 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs @@ -19,9 +19,13 @@ public abstract class CosmosItemIdEncodingTestsBase : BaseCosmosClientHelper encoderShouldEmitUTF8Identifier: false, throwOnInvalidBytes: true); + private static readonly int computeGatewayPort = Int32.Parse(Utils.ConfigurationManager.AppSettings["ComputeGatewayPort"]); + private Container Container = null; private ContainerProperties containerSettings = null; + protected virtual String AccountEndpointOverride => null; + protected abstract void ConfigureClientBuilder(CosmosClientBuilder builder); [TestInitialize] @@ -29,7 +33,8 @@ public async Task TestInitialize() { await base.TestInit( validateSinglePartitionKeyRangeCacheCall: true, - customizeClientBuilder: this.ConfigureClientBuilder); + customizeClientBuilder: this.ConfigureClientBuilder, + accountEndpointOverride: this.AccountEndpointOverride); string PartitionKey = "/pk"; this.containerSettings = new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: PartitionKey); @@ -483,9 +488,17 @@ public async Task IdWithCarriageReturn() { TransportMode = ConnectionMode.Gateway, ExpectedCreateStatusCode = HttpStatusCode.Created, - ExpectedReadStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.OK, - ExpectedReplaceStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.OK, - ExpectedDeleteStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.NoContent, + ExpectedReadStatusCode = HttpStatusCode.BadRequest, + ExpectedReplaceStatusCode = HttpStatusCode.BadRequest, + ExpectedDeleteStatusCode = HttpStatusCode.BadRequest, + }, + ComputeGateway = new TestScenarioExpectations + { + TransportMode = ConnectionMode.Gateway, + ExpectedCreateStatusCode = HttpStatusCode.Created, + ExpectedReadStatusCode = HttpStatusCode.OK, + ExpectedReplaceStatusCode = HttpStatusCode.OK, + ExpectedDeleteStatusCode = HttpStatusCode.NoContent, }, Direct = new TestScenarioExpectations { @@ -511,9 +524,17 @@ public async Task IdWithTab() { TransportMode = ConnectionMode.Gateway, ExpectedCreateStatusCode = HttpStatusCode.Created, - ExpectedReadStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.OK, - ExpectedReplaceStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.OK, - ExpectedDeleteStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.NoContent, + ExpectedReadStatusCode = HttpStatusCode.BadRequest, + ExpectedReplaceStatusCode = HttpStatusCode.BadRequest, + ExpectedDeleteStatusCode = HttpStatusCode.BadRequest, + }, + ComputeGateway = new TestScenarioExpectations + { + TransportMode = ConnectionMode.Gateway, + ExpectedCreateStatusCode = HttpStatusCode.Created, + ExpectedReadStatusCode = HttpStatusCode.OK, + ExpectedReplaceStatusCode = HttpStatusCode.OK, + ExpectedDeleteStatusCode = HttpStatusCode.NoContent, }, Direct = new TestScenarioExpectations { @@ -539,9 +560,17 @@ public async Task IdWithLineFeed() { TransportMode = ConnectionMode.Gateway, ExpectedCreateStatusCode = HttpStatusCode.Created, - ExpectedReadStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.OK, - ExpectedReplaceStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.OK, - ExpectedDeleteStatusCode = HttpStatusCode.BadRequest,// CGW - HttpStatusCode.NoContent, + ExpectedReadStatusCode = HttpStatusCode.BadRequest, + ExpectedReplaceStatusCode = HttpStatusCode.BadRequest, + ExpectedDeleteStatusCode = HttpStatusCode.BadRequest, + }, + ComputeGateway = new TestScenarioExpectations + { + TransportMode = ConnectionMode.Gateway, + ExpectedCreateStatusCode = HttpStatusCode.Created, + ExpectedReadStatusCode = HttpStatusCode.OK, + ExpectedReplaceStatusCode = HttpStatusCode.OK, + ExpectedDeleteStatusCode = HttpStatusCode.NoContent, }, Direct = new TestScenarioExpectations { @@ -559,8 +588,10 @@ public async Task IdWithLineFeed() private async Task ExecuteTestCase(TestScenario scenario) { TestScenarioExpectations expected = - this.cosmosClient.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? - scenario.Gateway : scenario.Direct; + this.cosmosClient.ClientOptions.ConnectionMode == ConnectionMode.Direct ? + scenario.Direct : + this.cosmosClient.Endpoint.Port == computeGatewayPort ? + scenario.ComputeGateway ?? scenario.Gateway : scenario.Gateway; Console.WriteLine($"Scenario: {scenario.Name}, Id: \"{scenario.Id}\""); @@ -671,6 +702,8 @@ private class TestScenario public TestScenarioExpectations Gateway { get; set; } + public TestScenarioExpectations ComputeGateway { get; set; } + public TestScenarioExpectations Direct { get; set; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayCosmosItemIdEncodingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/RoutingGatewayCosmosItemIdEncodingTests.cs similarity index 63% rename from Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayCosmosItemIdEncodingTests.cs rename to Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/RoutingGatewayCosmosItemIdEncodingTests.cs index 5cd9e53a37..5052e629f5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayCosmosItemIdEncodingTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/RoutingGatewayCosmosItemIdEncodingTests.cs @@ -4,11 +4,12 @@ using Microsoft.Azure.Cosmos.SDK.EmulatorTests; [TestClass] - public class GatewayCosmosItemIdEncodingTests : CosmosItemIdEncodingTestsBase + public class RoutingGatewayCosmosItemIdEncodingTests : CosmosItemIdEncodingTestsBase { protected override void ConfigureClientBuilder(CosmosClientBuilder builder) { - builder.WithConnectionModeGateway(); + builder + .WithConnectionModeGateway(); } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs index ab4027925a..20f083d85d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs @@ -18,12 +18,16 @@ public abstract class BaseCosmosClientHelper public async Task TestInit( bool validateSinglePartitionKeyRangeCacheCall = false, - Action customizeClientBuilder = null) + Action customizeClientBuilder = null, + string accountEndpointOverride = null) { this.cancellationTokenSource = new CancellationTokenSource(); this.cancellationToken = this.cancellationTokenSource.Token; - this.cosmosClient = TestCommon.CreateCosmosClient(validatePartitionKeyRangeCalls: validateSinglePartitionKeyRangeCacheCall, customizeClientBuilder: customizeClientBuilder); + this.cosmosClient = TestCommon.CreateCosmosClient( + validatePartitionKeyRangeCalls: validateSinglePartitionKeyRangeCacheCall, + customizeClientBuilder: customizeClientBuilder, + accountEndpointOverride: accountEndpointOverride); this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), cancellationToken: this.cancellationToken); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs index e85f9c565c..265e9542ef 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs @@ -75,10 +75,13 @@ internal static (string endpoint, string authKey) GetAccountInfo() internal static CosmosClientBuilder GetDefaultConfiguration( bool useCustomSeralizer = true, - bool validatePartitionKeyRangeCalls = false) + bool validatePartitionKeyRangeCalls = false, + string accountEndpointOverride = null) { (string endpoint, string authKey) = TestCommon.GetAccountInfo(); - CosmosClientBuilder clientBuilder = new CosmosClientBuilder(accountEndpoint: endpoint, authKeyOrResourceToken: authKey); + CosmosClientBuilder clientBuilder = new CosmosClientBuilder( + accountEndpoint: accountEndpointOverride ?? endpoint, + authKeyOrResourceToken: authKey); if (useCustomSeralizer) { clientBuilder.WithCustomSerializer(new CosmosJsonDotNetSerializer()); @@ -95,9 +98,10 @@ internal static CosmosClientBuilder GetDefaultConfiguration( internal static CosmosClient CreateCosmosClient( Action customizeClientBuilder = null, bool useCustomSeralizer = true, - bool validatePartitionKeyRangeCalls = false) + bool validatePartitionKeyRangeCalls = false, + string accountEndpointOverride = null) { - CosmosClientBuilder cosmosClientBuilder = GetDefaultConfiguration(useCustomSeralizer, validatePartitionKeyRangeCalls); + CosmosClientBuilder cosmosClientBuilder = GetDefaultConfiguration(useCustomSeralizer, validatePartitionKeyRangeCalls, accountEndpointOverride); customizeClientBuilder?.Invoke(cosmosClientBuilder); CosmosClient client = cosmosClientBuilder.Build(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/settings.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/settings.json index 31350d975b..51ecc8a707 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/settings.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/settings.json @@ -1,6 +1,8 @@ { "AppSettings": { "GatewayEndpoint": "https://127.0.0.1:8081/", + "ComputeGatewayEndpoint": "https://localhost:8903/", + "ComputeGatewayPort": "8903", "Location": "South Central US", "Location2": "West US", "GlobalDatabaseAccountId": "globaldb", diff --git a/templates/emulator-setup.yml b/templates/emulator-setup.yml index 533e07a19d..10b5664d82 100644 --- a/templates/emulator-setup.yml +++ b/templates/emulator-setup.yml @@ -11,7 +11,7 @@ steps: mkdir "$env:temp\Azure Cosmos DB Emulator" lessmsi x "$env:temp\azure-cosmosdb-emulator.msi" "$env:temp\Azure Cosmos DB Emulator\" Write-Host "Starting Comsos DB Emulator" -ForegroundColor green - Start-Process "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI /DisableRateLimiting /PartitionCount=100 /Consistency=Strong /enableRio /EnablePreview /EnableAadAuthentication" -Verb RunAs + Start-Process "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI /DisableRateLimiting /PartitionCount=100 /Consistency=Strong /enableRio /EnablePreview /EnableAadAuthentication /EnableSqlComputeEndpoint" -Verb RunAs Import-Module "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" Get-Item env:* | Sort-Object -Property Name for ($i=0; $i -lt 10; $i++) { From ab1f249c4074545765e466ece547a8c96fe51095 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Tue, 15 Nov 2022 10:44:55 -0800 Subject: [PATCH 013/164] Change Feed Processor: Adds support for Resource Tokens (#3566) * Adding rid parsing * Test * Removing dead code * Contract update --- .../Utils/CosmosContainerExtensions.cs | 6 +- .../src/Resource/Conflict/ConflictsCore.cs | 6 +- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 2 - .../ChangeFeed/SmokeTests.cs | 59 +++++++++++++++++++ .../ChangeFeedEstimatorIteratorTests.cs | 8 +-- .../ChangeFeedProcessorCoreTests.cs | 4 ++ .../CosmosConflictTests.cs | 18 +++++- 7 files changed, 88 insertions(+), 15 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Utils/CosmosContainerExtensions.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Utils/CosmosContainerExtensions.cs index f88b1e9e5f..d37e8c295c 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Utils/CosmosContainerExtensions.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Utils/CosmosContainerExtensions.cs @@ -121,7 +121,11 @@ public static async Task GetMonitoredDatabaseAndContainerRidAsync( forceRefresh: false, NoOpTrace.Singleton, cancellationToken: cancellationToken); - string databaseRid = await ((DatabaseInternal)((ContainerInternal)monitoredContainer).Database).GetRIDAsync(cancellationToken); + + // Extract DbRid from ContainerRid + Documents.ResourceId resourceId = Documents.ResourceId.Parse(containerRid); + string databaseRid = resourceId.DatabaseId.ToString(); + return $"{databaseRid}_{containerRid}"; } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsCore.cs index 0f52956fb6..78f6a46eef 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsCore.cs @@ -144,14 +144,14 @@ public async Task> ReadCurrentAsync( throw new ArgumentNullException(nameof(cosmosConflict)); } - // SourceResourceId is RID based on Conflicts, so we need to obtain the db and container rid - DatabaseInternal databaseCore = (DatabaseInternal)this.container.Database; - string databaseResourceId = await databaseCore.GetRIDAsync(cancellationToken); string containerResourceId = await this.container.GetCachedRIDAsync( forceRefresh: false, trace, cancellationToken: cancellationToken); + ResourceId resourceId = ResourceId.Parse(containerResourceId); + string databaseResourceId = resourceId.DatabaseId.ToString(); + string dbLink = this.ClientContext.CreateLink( parentLink: string.Empty, uriPathSegment: Paths.DatabasesPathSegment, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index e055a4f178..07da410dcf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -3068,8 +3068,6 @@ }]]> Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.ReadAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs index f00d9055d8..b4460b6ad6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs @@ -77,6 +77,65 @@ public async Task WritesTriggerDelegate_WithLeaseContainer() CollectionAssert.AreEqual(expectedIds.ToList(), receivedIds); } + [TestMethod] + public async Task WritesTriggerDelegate_WithLeaseContainer_UsingResourceTokens() + { + User user = await this.Container.Database.CreateUserAsync("testUser"); + PermissionResponse monitoredContainerPermissions = await user.CreatePermissionAsync( + new PermissionProperties( + id: "testPermission", + permissionMode: PermissionMode.All, + container: this.Container) + ); + + PermissionResponse leaseContainerPermissions = await user.CreatePermissionAsync( + new PermissionProperties( + id: "testPermission2", + permissionMode: PermissionMode.All, + container: this.LeaseContainer) + ); + + using CosmosClient clientForMonitoredContainer = new CosmosClient(this.Container.Database.Client.Endpoint.ToString(), authKeyOrResourceToken: monitoredContainerPermissions.Resource.Token); + using CosmosClient clientForLeaseContainer = new CosmosClient(this.Container.Database.Client.Endpoint.ToString(), authKeyOrResourceToken: leaseContainerPermissions.Resource.Token); + + ManualResetEvent allDocsProcessed = new ManualResetEvent(false); + IEnumerable expectedIds = Enumerable.Range(0, 100); + List receivedIds = new List(); + ChangeFeedProcessor processor = clientForMonitoredContainer.GetContainer(this.Container.Database.Id, this.Container.Id) + .GetChangeFeedProcessorBuilder("test", (IReadOnlyCollection docs, CancellationToken token) => + { + foreach (TestClass doc in docs) + { + receivedIds.Add(int.Parse(doc.id)); + } + + if (receivedIds.Count == 100) + { + allDocsProcessed.Set(); + } + + return Task.CompletedTask; + }) + .WithInstanceName("random") + .WithLeaseContainer(clientForLeaseContainer.GetContainer(this.LeaseContainer.Database.Id, this.LeaseContainer.Id)).Build(); + + await processor.StartAsync(); + // Letting processor initialize + await Task.Delay(BaseChangeFeedClientHelper.ChangeFeedSetupTime); + // Inserting documents + foreach (int id in expectedIds) + { + await this.Container.CreateItemAsync(new { id = id.ToString() }); + } + + // Waiting on all notifications to finish + bool isStartOk = allDocsProcessed.WaitOne(30 * BaseChangeFeedClientHelper.ChangeFeedCleanupTime); + await processor.StopAsync(); + Assert.IsTrue(isStartOk, "Timed out waiting for docs to process"); + // Verify that we maintain order + CollectionAssert.AreEqual(expectedIds.ToList(), receivedIds); + } + [TestMethod] public async Task ExceptionsRetryBatch() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs index bf33fe06a5..4b9a50c75d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs @@ -350,14 +350,10 @@ static FeedIteratorInternal feedCreator(DocumentServiceLease lease, string conti } }); - string databaseRid = Guid.NewGuid().ToString(); - Mock mockedMonitoredDatabase = new Mock(MockBehavior.Strict); - mockedMonitoredDatabase.Setup(c => c.GetRIDAsync(It.IsAny())).ReturnsAsync(databaseRid); - - string monitoredContainerRid = Guid.NewGuid().ToString(); + string monitoredContainerRid = "V4lVAMl0wuQ="; + string databaseRid = Documents.ResourceId.Parse(monitoredContainerRid).DatabaseId.ToString(); Mock mockedMonitoredContainer = new Mock(MockBehavior.Strict); mockedMonitoredContainer.Setup(c => c.GetCachedRIDAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(monitoredContainerRid); - mockedMonitoredContainer.Setup(c => c.Database).Returns(mockedMonitoredDatabase.Object); mockedMonitoredContainer.Setup(c => c.ClientContext).Returns(mockedContext.Object); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorCoreTests.cs index a7ba782230..c5e74fbfd9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorCoreTests.cs @@ -7,11 +7,13 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests using System; using System.Collections.Generic; using System.Linq; + using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.ChangeFeed.Configuration; using Microsoft.Azure.Cosmos.ChangeFeed.FeedProcessing; using Microsoft.Azure.Cosmos.ChangeFeed.LeaseManagement; using Microsoft.Azure.Cosmos.Tests; + using Microsoft.Azure.Cosmos.Tracing; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -233,6 +235,8 @@ private static ContainerInternal GetMockedContainer(string containerName = null) { Mock mockedContainer = MockCosmosUtil.CreateMockContainer(containerName: containerName); mockedContainer.Setup(c => c.ClientContext).Returns(ChangeFeedProcessorCoreTests.GetMockedClientContext()); + string monitoredContainerRid = "V4lVAMl0wuQ="; + mockedContainer.Setup(c => c.GetCachedRIDAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(monitoredContainerRid); Mock mockedDatabase = MockCosmosUtil.CreateMockDatabase(); mockedContainer.Setup(c => c.Database).Returns(mockedDatabase.Object); return mockedContainer.Object; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosConflictTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosConflictTests.cs index e2361bddf8..2bb48fc75b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosConflictTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosConflictTests.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Cosmos.Tests using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using Newtonsoft.Json.Linq; + using Microsoft.Azure.Cosmos.Tracing; [TestClass] public class CosmosConflictTests @@ -38,7 +39,7 @@ public async Task ReadCurrentGetsCorrectRID() const string expectedRID = "something"; Cosmos.PartitionKey partitionKey = new Cosmos.PartitionKey("pk"); // Using "test" as container name because the Mocked DocumentClient has it hardcoded - Uri expectedRequestUri = new Uri($"dbs/conflictsDb/colls/test/docs/{expectedRID}", UriKind.Relative); + Uri expectedRequestUri = new Uri($"dbs/V4lVAA==/colls/V4lVAMl0wuQ=/docs/{expectedRID}", UriKind.Relative); ContainerInternal container = CosmosConflictTests.GetMockedContainer((request, cancellationToken) => { Assert.AreEqual(OperationType.Read, request.OperationType); Assert.AreEqual(ResourceType.Document, request.ResourceType); @@ -74,7 +75,7 @@ public async Task DeleteSendsCorrectPayload() { const string expectedId = "something"; Cosmos.PartitionKey partitionKey = new Cosmos.PartitionKey("pk"); - Uri expectedRequestUri = new Uri($"/dbs/conflictsDb/colls/conflictsColl/conflicts/{expectedId}", UriKind.Relative); + Uri expectedRequestUri = new Uri($"/dbs/myDb/colls/conflictsColl/conflicts/{expectedId}", UriKind.Relative); ContainerInternal container = CosmosConflictTests.GetMockedContainer((request, cancellationToken) => { Assert.AreEqual(OperationType.Delete, request.OperationType); Assert.AreEqual(ResourceType.Conflict, request.ResourceType); @@ -91,7 +92,18 @@ public async Task DeleteSendsCorrectPayload() private static ContainerInternal GetMockedContainer(Func> handlerFunc) { - return new ContainerInlineCore(CosmosConflictTests.GetMockedClientContext(handlerFunc), MockCosmosUtil.CreateMockDatabase("conflictsDb").Object, "conflictsColl"); + CosmosClientContext clientContext = CosmosConflictTests.GetMockedClientContext(handlerFunc); + Mock mockedContainer = MockCosmosUtil.CreateMockContainer(containerName: "conflictsColl"); + DatabaseInternal database = MockCosmosUtil.CreateMockDatabase("conflictsDb").Object; + string monitoredContainerRid = "V4lVAMl0wuQ="; + mockedContainer.Setup(c => c.GetCachedRIDAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(monitoredContainerRid); + mockedContainer.Setup(c => c.Database).Returns(database); + mockedContainer.Setup(c => c.GetReadFeedIterator(It.IsAny(), It.IsAny(), It.IsAny(), It.Is(r => r == ResourceType.Conflict), It.IsAny(), It.IsAny())) + .Returns( + (QueryDefinition qd, QueryRequestOptions o, string link, ResourceType t, string ct, int p) => new ContainerInlineCore(clientContext, database, "conflictsColl").GetReadFeedIterator(qd, o, link, t, ct, p)); + mockedContainer.Setup(c => c.ClientContext).Returns(clientContext); + mockedContainer.Setup(c => c.Conflicts).Returns(new ConflictsInlineCore(clientContext, mockedContainer.Object)); + return mockedContainer.Object; } private static CosmosClientContext GetMockedClientContext( From 9fb3a12de33557ae90f408bea01575172e9d1e98 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 16 Nov 2022 03:11:07 +0530 Subject: [PATCH 014/164] [Internal] AI integration: Refactor code how container and database name is flowing to opentelemetry module (#3532) * wip * WIP * Revert "WIP" This reverts commit 71275de54b9e67fa54a37e79d450b9597e173934. * Revert "wip" This reverts commit 586fa9865cc3f40dabd7ef90fb3e0cf499a045bc. * wip add containe and database info * redesign how container and database name information flows into opne telemetry data * test fix * fix test * fix tests * fix typos * baseline test fix Co-authored-by: Sourabh Jain --- Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs | 15 +- .../src/ChangeFeed/ChangeFeedIteratorCore.cs | 10 +- ...geFeedPartitionKeyResultSetIteratorCore.cs | 10 +- .../ChangeFeedEstimatorIterator.cs | 11 +- Microsoft.Azure.Cosmos/src/CosmosClient.cs | 164 ++++----- .../src/Resource/ClientContextCore.cs | 35 +- .../ClientEncryptionKeyInlineCore.cs | 22 +- .../Resource/Conflict/ConflictsInlineCore.cs | 6 + .../Resource/Container/ContainerInlineCore.cs | 320 +++++++++++------- .../src/Resource/CosmosClientContext.cs | 3 + .../Resource/Database/DatabaseInlineCore.cs | 228 +++++++------ .../FeedIterators/FeedIteratorInlineCore.cs | 20 +- .../FeedIteratorInlineCore{T}.cs | 21 +- .../Permission/PermissionInlineCore.cs | 31 +- .../src/Resource/Scripts/ScriptsInlineCore.cs | 163 +++++---- .../src/Resource/User/UserInlineCore.cs | 55 +-- .../OpenTelemetry/CosmosDbEventSource.cs | 5 +- .../Filters/DiagnosticsFilterHelper.cs | 3 +- .../OpenTelemetry/OpenTelemetryAttributes.cs | 20 +- .../OpenTelemetryCoreRecorder.cs | 50 ++- .../OpenTelemetryRecorderFactory.cs | 9 +- .../OpenTelemetry/OpenTelemetryResponse.cs | 12 +- .../OpenTelemetry/OpenTelemetryResponse{T}.cs | 12 +- ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 202 +++++------ ...aceWriterBaselineTests.ChangeFeedAsync.xml | 44 +-- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 12 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 +-- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +- ...TraceWriterBaselineTests.ReadManyAsync.xml | 14 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- .../QueryPlanBaselineTests.Spatial.xml | 6 +- .../Batch/BatchAsyncBatcherTests.cs | 7 +- .../Batch/BatchAsyncContainerExecutorTests.cs | 7 +- .../Batch/BatchAsyncStreamerTests.cs | 7 +- .../ChangeFeedEstimatorIteratorTests.cs | 19 +- ...dPartitionKeyResultSetIteratorCoreTests.cs | 45 ++- .../CosmosDiagnosticsUnitTests.cs | 18 +- .../CosmosItemUnitTests.cs | 14 +- .../FeedRange/ChangeFeedIteratorCoreTests.cs | 7 +- .../Telemetry/DiagnosticsFilterHelperTest.cs | 4 +- 43 files changed, 1014 insertions(+), 731 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs b/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs index 24975c0d12..e211117d6f 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs @@ -219,9 +219,12 @@ public override Task ExecuteAsync( CancellationToken cancellationToken = default) { return this.container.ClientContext.OperationHelperAsync( - nameof(ExecuteAsync), - requestOptions, - (trace) => + operationName: nameof(ExecuteAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => { BatchExecutor executor = new BatchExecutor( container: this.container, @@ -232,10 +235,8 @@ public override Task ExecuteAsync( this.operations = new List(); return executor.ExecuteAsync(trace, cancellationToken); }, - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: this.container?.Id, - databaseName: this.container?.Database?.Id)); + openTelemetry: (response) => new OpenTelemetryResponse( + responseMessage: response)); } /// diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedIteratorCore.cs b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedIteratorCore.cs index ca1f60ba0b..87b34cca17 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedIteratorCore.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedIteratorCore.cs @@ -13,8 +13,8 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed using Microsoft.Azure.Cosmos.Pagination; using Microsoft.Azure.Cosmos.Query.Core; using Microsoft.Azure.Cosmos.Query.Core.Monads; - using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Tracing; + using Microsoft.Azure.Documents; internal sealed class ChangeFeedIteratorCore : FeedIteratorInternal { @@ -222,12 +222,12 @@ public ChangeFeedIteratorCore( public override async Task ReadNextAsync(CancellationToken cancellationToken = default) { return await this.clientContext.OperationHelperAsync("Change Feed Iterator Read Next Async", + containerName: this.container?.Id, + databaseName: this.container?.Database?.Id ?? this.databaseName, + operationType: OperationType.ReadFeed, requestOptions: this.changeFeedRequestOptions, task: (trace) => this.ReadNextInternalAsync(trace, cancellationToken), - openTelemetry: (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: this.container?.Id, - databaseName: this.container?.Database?.Id), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response), traceComponent: TraceComponent.ChangeFeed, traceLevel: TraceLevel.Info); } diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCore.cs b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCore.cs index 4c275227bf..4c7b8f34f0 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCore.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCore.cs @@ -91,13 +91,15 @@ public override CosmosElement GetCosmosElementContinuationToken() /// A change feed response from cosmos service public override Task ReadNextAsync(CancellationToken cancellationToken = default) { - return this.clientContext.OperationHelperAsync("Change Feed Processor Read Next Async", + return this.clientContext.OperationHelperAsync( + operationName: "Change Feed Processor Read Next Async", + containerName: this.container?.Id, + databaseName: this.container?.Database?.Id ?? this.databaseName, + operationType: Documents.OperationType.ReadFeed, requestOptions: this.changeFeedOptions, task: (trace) => this.ReadNextAsync(trace, cancellationToken), openTelemetry: (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: this.container?.Id, - databaseName: this.container?.Database?.Id), + responseMessage: response), traceComponent: TraceComponent.ChangeFeed, traceLevel: TraceLevel.Info); } diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimatorIterator.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimatorIterator.cs index d8dca1ef60..47469542de 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimatorIterator.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/ChangeFeedEstimatorIterator.cs @@ -111,13 +111,14 @@ private ChangeFeedEstimatorIterator( public override Task> ReadNextAsync(CancellationToken cancellationToken = default) { - return this.monitoredContainer.ClientContext.OperationHelperAsync("Change Feed Estimator Read Next Async", + return this.monitoredContainer.ClientContext.OperationHelperAsync( + operationName: "Change Feed Estimator Read Next Async", + containerName: this.monitoredContainer?.Id, + databaseName: this.monitoredContainer?.Database?.Id, + operationType: Documents.OperationType.ReadFeed, requestOptions: null, task: (trace) => this.ReadNextAsync(trace, cancellationToken), - openTelemetry: (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: this.monitoredContainer?.Id, - databaseName: this.monitoredContainer?.Database?.Id ?? this.databaseName), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response), traceComponent: TraceComponent.ChangeFeed, traceLevel: TraceLevel.Info); } diff --git a/Microsoft.Azure.Cosmos/src/CosmosClient.cs b/Microsoft.Azure.Cosmos/src/CosmosClient.cs index c4ab25f4e6..e5ca2d8b53 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClient.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClient.cs @@ -18,8 +18,6 @@ namespace Microsoft.Azure.Cosmos using Microsoft.Azure.Cosmos.Handlers; using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.Query.Core.QueryPlan; - using Microsoft.Azure.Cosmos.Routing; - using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Cosmos.Tracing.TraceData; using Microsoft.Azure.Documents; @@ -629,9 +627,12 @@ internal CosmosClient( public virtual Task ReadAccountAsync() { return this.ClientContext.OperationHelperAsync( - nameof(ReadAccountAsync), - null, - (trace) => ((IDocumentClientInternal)this.DocumentClient).GetDatabaseAccountInternalAsync(this.Endpoint)); + operationName: nameof(ReadAccountAsync), + containerName: null, + databaseName: null, + operationType: OperationType.Read, + requestOptions: null, + task: (trace) => ((IDocumentClientInternal)this.DocumentClient).GetDatabaseAccountInternalAsync(this.Endpoint)); } /// @@ -715,9 +716,12 @@ public virtual Task CreateDatabaseAsync( } return this.ClientContext.OperationHelperAsync( - nameof(CreateDatabaseAsync), - requestOptions, - (trace) => + operationName: nameof(CreateDatabaseAsync), + containerName: null, + databaseName: id, + operationType: OperationType.Create, + requestOptions: requestOptions, + task: (trace) => { DatabaseProperties databaseProperties = this.PrepareDatabaseProperties(id); ThroughputProperties throughputProperties = ThroughputProperties.CreateManualThroughput(throughput); @@ -729,10 +733,7 @@ public virtual Task CreateDatabaseAsync( trace: trace, cancellationToken: cancellationToken); }, - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: response.Resource?.Id)); + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } /// @@ -765,9 +766,12 @@ public virtual Task CreateDatabaseAsync( } return this.ClientContext.OperationHelperAsync( - nameof(CreateDatabaseAsync), - requestOptions, - (trace) => + operationName: nameof(CreateDatabaseAsync), + containerName: null, + databaseName: id, + operationType: OperationType.Create, + requestOptions: requestOptions, + task: (trace) => { DatabaseProperties databaseProperties = this.PrepareDatabaseProperties(id); return this.CreateDatabaseInternalAsync( @@ -777,10 +781,7 @@ public virtual Task CreateDatabaseAsync( trace: trace, cancellationToken: cancellationToken); }, - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: response.Resource?.Id)); + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } /// @@ -824,59 +825,60 @@ public virtual Task CreateDatabaseIfNotExistsAsync( return string.IsNullOrEmpty(id) ? throw new ArgumentNullException(nameof(id)) : this.ClientContext.OperationHelperAsync( - nameof(CreateDatabaseIfNotExistsAsync), - requestOptions, - async (trace) => - { - double totalRequestCharge = 0; - // Doing a Read before Create will give us better latency for existing databases - DatabaseProperties databaseProperties = this.PrepareDatabaseProperties(id); - DatabaseCore database = (DatabaseCore)this.GetDatabase(id); - using (ResponseMessage readResponse = await database.ReadStreamAsync( + operationName: nameof(CreateDatabaseIfNotExistsAsync), + containerName: null, + databaseName: id, + operationType: OperationType.Create, requestOptions: requestOptions, - trace: trace, - cancellationToken: cancellationToken)) - { - totalRequestCharge = readResponse.Headers.RequestCharge; - if (readResponse.StatusCode != HttpStatusCode.NotFound) + task: async (trace) => { - return this.ClientContext.ResponseFactory.CreateDatabaseResponse(database, readResponse); - } - } - - using (ResponseMessage createResponse = await this.CreateDatabaseStreamInternalAsync( - databaseProperties, - throughputProperties, - requestOptions, - trace, - cancellationToken)) - { - totalRequestCharge += createResponse.Headers.RequestCharge; - createResponse.Headers.RequestCharge = totalRequestCharge; - - if (createResponse.StatusCode != HttpStatusCode.Conflict) - { - return this.ClientContext.ResponseFactory.CreateDatabaseResponse(this.GetDatabase(databaseProperties.Id), createResponse); - } - } - - // This second Read is to handle the race condition when 2 or more threads have Read the database and only one succeeds with Create - // so for the remaining ones we should do a Read instead of throwing Conflict exception - using (ResponseMessage readResponseAfterConflict = await database.ReadStreamAsync( - requestOptions: requestOptions, - trace: trace, - cancellationToken: cancellationToken)) - { - totalRequestCharge += readResponseAfterConflict.Headers.RequestCharge; - readResponseAfterConflict.Headers.RequestCharge = totalRequestCharge; - - return this.ClientContext.ResponseFactory.CreateDatabaseResponse(this.GetDatabase(databaseProperties.Id), readResponseAfterConflict); - } - }, - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: response.Resource?.Id)); + double totalRequestCharge = 0; + // Doing a Read before Create will give us better latency for existing databases + DatabaseProperties databaseProperties = this.PrepareDatabaseProperties(id); + DatabaseCore database = (DatabaseCore)this.GetDatabase(id); + using (ResponseMessage readResponse = await database.ReadStreamAsync( + requestOptions: requestOptions, + trace: trace, + cancellationToken: cancellationToken)) + { + totalRequestCharge = readResponse.Headers.RequestCharge; + if (readResponse.StatusCode != HttpStatusCode.NotFound) + { + return this.ClientContext.ResponseFactory.CreateDatabaseResponse(database, readResponse); + } + } + + using (ResponseMessage createResponse = await this.CreateDatabaseStreamInternalAsync( + databaseProperties, + throughputProperties, + requestOptions, + trace, + cancellationToken)) + { + totalRequestCharge += createResponse.Headers.RequestCharge; + createResponse.Headers.RequestCharge = totalRequestCharge; + + if (createResponse.StatusCode != HttpStatusCode.Conflict) + { + return this.ClientContext.ResponseFactory.CreateDatabaseResponse(this.GetDatabase(databaseProperties.Id), createResponse); + } + } + + // This second Read is to handle the race condition when 2 or more threads have Read the database and only one succeeds with Create + // so for the remaining ones we should do a Read instead of throwing Conflict exception + using (ResponseMessage readResponseAfterConflict = await database.ReadStreamAsync( + requestOptions: requestOptions, + trace: trace, + cancellationToken: cancellationToken)) + { + totalRequestCharge += readResponseAfterConflict.Headers.RequestCharge; + readResponseAfterConflict.Headers.RequestCharge = totalRequestCharge; + + return this.ClientContext.ResponseFactory.CreateDatabaseResponse(this.GetDatabase(databaseProperties.Id), readResponseAfterConflict); + } + }, + openTelemetry: (response) => new OpenTelemetryResponse( + responseMessage: response)); } /// @@ -1165,9 +1167,12 @@ public virtual Task CreateDatabaseStreamAsync( } return this.ClientContext.OperationHelperAsync( - nameof(CreateDatabaseStreamAsync), - requestOptions, - (trace) => + operationName: nameof(CreateDatabaseStreamAsync), + containerName: null, + databaseName: databaseProperties.Id, + operationType: OperationType.Create, + requestOptions: requestOptions, + task: (trace) => { this.ClientContext.ValidateResource(databaseProperties.Id); return this.CreateDatabaseStreamInternalAsync( @@ -1177,7 +1182,7 @@ public virtual Task CreateDatabaseStreamAsync( trace, cancellationToken); }, - (response) => new OpenTelemetryResponse(response)); + openTelemetry: (response) => new OpenTelemetryResponse(response)); } /// @@ -1260,9 +1265,12 @@ internal virtual Task CreateDatabaseStreamAsync( } return this.ClientContext.OperationHelperAsync( - nameof(CreateDatabaseIfNotExistsAsync), - requestOptions, - (trace) => + operationName: nameof(CreateDatabaseIfNotExistsAsync), + containerName: null, + databaseName: databaseProperties.Id, + operationType: OperationType.Create, + requestOptions: requestOptions, + task: (trace) => { this.ClientContext.ValidateResource(databaseProperties.Id); return this.CreateDatabaseStreamInternalAsync( @@ -1272,7 +1280,7 @@ internal virtual Task CreateDatabaseStreamAsync( trace, cancellationToken); }, - (response) => new OpenTelemetryResponse(response)); + openTelemetry: (response) => new OpenTelemetryResponse(response)); } private async Task CreateDatabaseInternalAsync( diff --git a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs index 7bbb6c639b..191399943f 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs @@ -194,6 +194,9 @@ internal override void ValidateResource(string resourceId) internal override Task OperationHelperAsync( string operationName, + string containerName, + string databaseName, + OperationType operationType, RequestOptions requestOptions, Func> task, Func openTelemetry, @@ -201,13 +204,20 @@ internal override Task Tracing.TraceLevel traceLevel = Tracing.TraceLevel.Info) { return SynchronizationContext.Current == null ? - this.OperationHelperWithRootTraceAsync(operationName, + this.OperationHelperWithRootTraceAsync(operationName, + containerName, + databaseName, + operationType, requestOptions, task, openTelemetry, traceComponent, traceLevel) : - this.OperationHelperWithRootTraceWithSynchronizationContextAsync(operationName, + this.OperationHelperWithRootTraceWithSynchronizationContextAsync( + operationName, + containerName, + databaseName, + operationType, requestOptions, task, openTelemetry, @@ -217,6 +227,9 @@ internal override Task private async Task OperationHelperWithRootTraceAsync( string operationName, + string containerName, + string databaseName, + OperationType operationType, RequestOptions requestOptions, Func> task, Func openTelemetry, @@ -230,6 +243,9 @@ private async Task OperationHelperWithRootTraceAsync( trace.AddDatum("Client Configuration", this.client.ClientConfigurationTraceDatum); return await this.RunWithDiagnosticsHelperAsync( + containerName, + databaseName, + operationType, trace, task, openTelemetry, @@ -240,6 +256,9 @@ private async Task OperationHelperWithRootTraceAsync( private Task OperationHelperWithRootTraceWithSynchronizationContextAsync( string operationName, + string containerName, + string databaseName, + OperationType operationType, RequestOptions requestOptions, Func> task, Func openTelemetry, @@ -260,6 +279,9 @@ private Task OperationHelperWithRootTraceWithSynchronizationContextAsyn trace.AddDatum("Synchronization Context", syncContextVirtualAddress); return await this.RunWithDiagnosticsHelperAsync( + containerName, + databaseName, + operationType, trace, task, openTelemetry, @@ -449,6 +471,9 @@ protected virtual void Dispose(bool disposing) } private async Task RunWithDiagnosticsHelperAsync( + string containerName, + string databaseName, + OperationType operationType, ITrace trace, Func> task, Func openTelemetry, @@ -458,15 +483,15 @@ private async Task RunWithDiagnosticsHelperAsync( using (OpenTelemetryCoreRecorder recorder = OpenTelemetryRecorderFactory.CreateRecorder( operationName: operationName, + containerName: containerName, + databaseName: databaseName, + operationType: operationType, requestOptions: requestOptions, clientContext: this.isDisposed ? null : this)) using (new ActivityScope(Guid.NewGuid())) { try { - // Record Operation Name - recorder.Record(OpenTelemetryAttributeKeys.DbOperation, operationName); - TResult result = await task(trace).ConfigureAwait(false); if (openTelemetry != null && recorder.IsEnabled) { diff --git a/Microsoft.Azure.Cosmos/src/Resource/ClientEncryptionKey/ClientEncryptionKeyInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/ClientEncryptionKey/ClientEncryptionKeyInlineCore.cs index 74f17b62c0..6d6305e30b 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/ClientEncryptionKey/ClientEncryptionKeyInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/ClientEncryptionKey/ClientEncryptionKeyInlineCore.cs @@ -29,10 +29,13 @@ public override Task ReadAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadAsync), - requestOptions, - (trace) => base.ReadAsync(requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadAsync(requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceAsync( @@ -41,10 +44,13 @@ public override Task ReplaceAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceAsync), - requestOptions, - (trace) => base.ReplaceAsync(clientEncryptionKeyProperties, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceAsync(clientEncryptionKeyProperties, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsInlineCore.cs index 6c691f1eff..17caba406e 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Conflict/ConflictsInlineCore.cs @@ -26,6 +26,9 @@ public override Task DeleteAsync( { return this.ClientContext.OperationHelperAsync( operationName: nameof(DeleteAsync), + containerName: null, + databaseName: null, + operationType: Documents.OperationType.Delete, requestOptions: null, task: (trace) => base.DeleteAsync(conflict, partitionKey, trace, cancellationToken), openTelemetry: (response) => new OpenTelemetryResponse(response)); @@ -86,6 +89,9 @@ public override Task> ReadCurrentAsync( { return this.ClientContext.OperationHelperAsync( operationName: nameof(ReadCurrentAsync), + containerName: null, + databaseName: null, + operationType: Documents.OperationType.Read, requestOptions: null, task: (trace) => base.ReadCurrentAsync(cosmosConflict, partitionKey, trace, cancellationToken), openTelemetry: (response) => new OpenTelemetryResponse(response)); diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInlineCore.cs index 6cabc1a069..8e6e4495aa 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerInlineCore.cs @@ -37,10 +37,13 @@ public override Task ReadContainerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadContainerAsync), - requestOptions, - (trace) => base.ReadContainerAsync(trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadContainerAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadContainerAsync(trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReadContainerStreamAsync( @@ -48,10 +51,13 @@ public override Task ReadContainerStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadContainerStreamAsync), - requestOptions, - (trace) => base.ReadContainerStreamAsync(trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadContainerStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadContainerStreamAsync(trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceContainerAsync( @@ -60,10 +66,13 @@ public override Task ReplaceContainerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceContainerAsync), - requestOptions, - (trace) => base.ReplaceContainerAsync(containerProperties, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceContainerAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceContainerAsync(containerProperties, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceContainerStreamAsync( @@ -72,10 +81,13 @@ public override Task ReplaceContainerStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceContainerStreamAsync), - requestOptions, - (trace) => base.ReplaceContainerStreamAsync(containerProperties, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceContainerStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceContainerStreamAsync(containerProperties, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteContainerAsync( @@ -83,10 +95,13 @@ public override Task DeleteContainerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteContainerAsync), - requestOptions, - (trace) => base.DeleteContainerAsync(trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteContainerAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteContainerAsync(trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteContainerStreamAsync( @@ -94,18 +109,24 @@ public override Task DeleteContainerStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteContainerStreamAsync), - requestOptions, - (trace) => base.DeleteContainerStreamAsync(trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteContainerStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteContainerStreamAsync(trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReadThroughputAsync(CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadThroughputAsync), - null, - (trace) => base.ReadThroughputAsync(trace, cancellationToken)); + operationName: nameof(ReadThroughputAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: null, + task: (trace) => base.ReadThroughputAsync(trace, cancellationToken)); } public override Task ReadThroughputAsync( @@ -113,10 +134,13 @@ public override Task ReadThroughputAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadThroughputAsync), - requestOptions, - (trace) => base.ReadThroughputAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadThroughputAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadThroughputAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceThroughputAsync( @@ -125,10 +149,13 @@ public override Task ReplaceThroughputAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceThroughputAsync), - requestOptions, - (trace) => base.ReplaceThroughputAsync(throughput, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceThroughputAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceThroughputAsync(throughput, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceThroughputAsync( @@ -137,28 +164,37 @@ public override Task ReplaceThroughputAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceThroughputAsync), - requestOptions, - (trace) => base.ReplaceThroughputAsync(throughputProperties, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceThroughputAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceThroughputAsync(throughputProperties, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReadThroughputIfExistsAsync(RequestOptions requestOptions, CancellationToken cancellationToken) { return this.ClientContext.OperationHelperAsync( - nameof(ReadThroughputIfExistsAsync), - requestOptions, - (trace) => base.ReadThroughputIfExistsAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadThroughputIfExistsAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadThroughputIfExistsAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceThroughputIfExistsAsync(ThroughputProperties throughput, RequestOptions requestOptions, CancellationToken cancellationToken) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceThroughputIfExistsAsync), - requestOptions, - (trace) => base.ReplaceThroughputIfExistsAsync(throughput, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceThroughputIfExistsAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceThroughputIfExistsAsync(throughput, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task CreateItemStreamAsync( @@ -178,10 +214,13 @@ Task func(ITrace trace) } return this.ClientContext.OperationHelperAsync( - nameof(CreateItemStreamAsync), - requestOptions, - func, - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: func, + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> CreateItemAsync(T item, @@ -190,10 +229,13 @@ public override Task> CreateItemAsync(T item, CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateItemAsync), - requestOptions, - (trace) => base.CreateItemAsync(item, trace, partitionKey, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateItemAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateItemAsync(item, trace, partitionKey, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReadItemStreamAsync( @@ -203,10 +245,13 @@ public override Task ReadItemStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadItemStreamAsync), - requestOptions, - (trace) => base.ReadItemStreamAsync(id, partitionKey, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadItemStreamAsync(id, partitionKey, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> ReadItemAsync( @@ -217,6 +262,9 @@ public override Task> ReadItemAsync( { return this.ClientContext.OperationHelperAsync( nameof(ReadItemAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, requestOptions, (trace) => base.ReadItemAsync(id, partitionKey, trace, requestOptions, cancellationToken), (response) => new OpenTelemetryResponse(response)); @@ -229,10 +277,13 @@ public override Task UpsertItemStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(UpsertItemStreamAsync), - requestOptions, - (trace) => base.UpsertItemStreamAsync(streamPayload, partitionKey, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(UpsertItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Upsert, + requestOptions: requestOptions, + task: (trace) => base.UpsertItemStreamAsync(streamPayload, partitionKey, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> UpsertItemAsync( @@ -242,10 +293,13 @@ public override Task> UpsertItemAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(UpsertItemAsync), - requestOptions, - (trace) => base.UpsertItemAsync(item, trace, partitionKey, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(UpsertItemAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Upsert, + requestOptions: requestOptions, + task: (trace) => base.UpsertItemAsync(item, trace, partitionKey, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceItemStreamAsync( @@ -256,10 +310,13 @@ public override Task ReplaceItemStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceItemStreamAsync), - requestOptions, - (trace) => base.ReplaceItemStreamAsync(streamPayload, id, partitionKey, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceItemStreamAsync(streamPayload, id, partitionKey, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> ReplaceItemAsync( @@ -270,10 +327,13 @@ public override Task> ReplaceItemAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceItemAsync), - requestOptions, - (trace) => base.ReplaceItemAsync(item, id, trace, partitionKey, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceItemAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceItemAsync(item, id, trace, partitionKey, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteItemStreamAsync( @@ -283,10 +343,13 @@ public override Task DeleteItemStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteItemStreamAsync), - requestOptions, - (trace) => base.DeleteItemStreamAsync(id, partitionKey, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteItemStreamAsync(id, partitionKey, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> DeleteItemAsync( @@ -296,10 +359,13 @@ public override Task> DeleteItemAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteItemAsync), - requestOptions, - (trace) => base.DeleteItemAsync(id, partitionKey, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteItemAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteItemAsync(id, partitionKey, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task PatchItemStreamAsync( @@ -310,10 +376,13 @@ public override Task PatchItemStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(PatchItemStreamAsync), - requestOptions, - (trace) => base.PatchItemStreamAsync(id, partitionKey, patchOperations, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(PatchItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Patch, + requestOptions: requestOptions, + task: (trace) => base.PatchItemStreamAsync(id, partitionKey, patchOperations, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task PatchItemStreamAsync( @@ -324,10 +393,13 @@ public override Task PatchItemStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(PatchItemStreamAsync), - requestOptions, - (trace) => base.PatchItemStreamAsync(id, partitionKey, streamPayload, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(PatchItemStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Patch, + requestOptions: requestOptions, + task: (trace) => base.PatchItemStreamAsync(id, partitionKey, streamPayload, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> PatchItemAsync( @@ -338,10 +410,13 @@ public override Task> PatchItemAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(PatchItemAsync), - requestOptions, - (trace) => base.PatchItemAsync(id, partitionKey, patchOperations, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(PatchItemAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Patch, + requestOptions: requestOptions, + task: (trace) => base.PatchItemAsync(id, partitionKey, patchOperations, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReadManyItemsStreamAsync( @@ -350,13 +425,13 @@ public override Task ReadManyItemsStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadManyItemsStreamAsync), - null, - (trace) => base.ReadManyItemsStreamAsync(items, trace, readManyRequestOptions, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: this.Id, - databaseName: this.Database?.Id)); + operationName: nameof(ReadManyItemsStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: null, + task: (trace) => base.ReadManyItemsStreamAsync(items, trace, readManyRequestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task> ReadManyItemsAsync( @@ -366,12 +441,12 @@ public override Task> ReadManyItemsAsync( { return this.ClientContext.OperationHelperAsync( nameof(ReadManyItemsAsync), - null, - (trace) => base.ReadManyItemsAsync(items, trace, readManyRequestOptions, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: this.Id, - databaseName: this.Database?.Id)); + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: null, + task: (trace) => base.ReadManyItemsAsync(items, trace, readManyRequestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override FeedIterator GetItemQueryStreamIterator( @@ -490,9 +565,12 @@ public override TransactionalBatch CreateTransactionalBatch(PartitionKey partiti public override Task> GetFeedRangesAsync(CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(GetFeedRangesAsync), - null, - (trace) => base.GetFeedRangesAsync(trace, cancellationToken)); + operationName: nameof(GetFeedRangesAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.ReadFeed, + requestOptions: null, + task: (trace) => base.GetFeedRangesAsync(trace, cancellationToken)); } public override FeedIterator GetChangeFeedStreamIterator( @@ -519,9 +597,12 @@ public override Task> GetPartitionKeyRangesAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(GetPartitionKeyRangesAsync), - null, - (trace) => base.GetPartitionKeyRangesAsync(feedRange, trace, cancellationToken)); + operationName: nameof(GetPartitionKeyRangesAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: null, + task: (trace) => base.GetPartitionKeyRangesAsync(feedRange, trace, cancellationToken)); } public override FeedIterator GetItemQueryStreamIterator( @@ -572,10 +653,13 @@ public override Task DeleteAllItemsByPartitionKeyStreamAsync( CancellationToken cancellationToken = default(CancellationToken)) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteAllItemsByPartitionKeyStreamAsync), - requestOptions, - (trace) => base.DeleteAllItemsByPartitionKeyStreamAsync(partitionKey, trace, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteAllItemsByPartitionKeyStreamAsync), + containerName: this.Id, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteAllItemsByPartitionKeyStreamAsync(partitionKey, trace, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosClientContext.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosClientContext.cs index ef3aa09643..5bd2cc1848 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosClientContext.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosClientContext.cs @@ -60,6 +60,9 @@ internal abstract Task GetCachedContainerPropertiesAsync( internal abstract Task OperationHelperAsync( string operationName, + string containerName, + string databaseName, + OperationType operationType, RequestOptions requestOptions, Func> task, Func openTelemetry = null, diff --git a/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseInlineCore.cs index 4b5073289a..fb25ef4190 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseInlineCore.cs @@ -27,13 +27,13 @@ public override Task CreateContainerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerAsync), - requestOptions, - (trace) => base.CreateContainerAsync(containerProperties, throughput, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: response.Resource?.Id, - databaseName: this.Id)); + operationName: nameof(CreateContainerAsync), + containerName: containerProperties.Id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerAsync(containerProperties, throughput, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task CreateContainerAsync(string id, @@ -43,13 +43,13 @@ public override Task CreateContainerAsync(string id, CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerAsync), - requestOptions, - (trace) => base.CreateContainerAsync(id, partitionKeyPath, throughput, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: response.Resource?.Id, - databaseName: this.Id)); + operationName: nameof(CreateContainerAsync), + containerName: id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerAsync(id, partitionKeyPath, throughput, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task CreateContainerIfNotExistsAsync( @@ -59,13 +59,13 @@ public override Task CreateContainerIfNotExistsAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerIfNotExistsAsync), - requestOptions, - (trace) => base.CreateContainerIfNotExistsAsync(containerProperties, throughput, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: response.Resource?.Id, - databaseName: this.Id)); + operationName: nameof(CreateContainerIfNotExistsAsync), + containerName: containerProperties.Id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerIfNotExistsAsync(containerProperties, throughput, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task CreateContainerIfNotExistsAsync( @@ -76,13 +76,13 @@ public override Task CreateContainerIfNotExistsAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerIfNotExistsAsync), - requestOptions, - (trace) => base.CreateContainerIfNotExistsAsync(id, partitionKeyPath, throughput, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: response.Resource?.Id, - databaseName: this.Id)); + operationName: nameof(CreateContainerIfNotExistsAsync), + containerName: id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerIfNotExistsAsync(id, partitionKeyPath, throughput, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task CreateContainerStreamAsync( @@ -92,10 +92,13 @@ public override Task CreateContainerStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerStreamAsync), - requestOptions, - (trace) => base.CreateContainerStreamAsync(containerProperties, throughput, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateContainerStreamAsync), + containerName: containerProperties.Id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerStreamAsync(containerProperties, throughput, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task CreateUserAsync(string id, @@ -103,10 +106,13 @@ public override Task CreateUserAsync(string id, CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateUserAsync), - requestOptions, - (trace) => base.CreateUserAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateUserAsync), + containerName: id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateUserAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override ContainerBuilder DefineContainer( @@ -121,13 +127,13 @@ public override Task DeleteAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteAsync), - requestOptions, - (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: response.Resource?.Id)); + operationName: nameof(DeleteAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task DeleteStreamAsync( @@ -135,10 +141,13 @@ public override Task DeleteStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteStreamAsync), - requestOptions, - (trace) => base.DeleteStreamAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteStreamAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteStreamAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Container GetContainer(string id) @@ -226,13 +235,13 @@ public override Task ReadAsync(RequestOptions requestOptions = CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadAsync), - requestOptions, - (trace) => base.ReadAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: response.Resource?.Id)); + operationName: nameof(ReadAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task ReadStreamAsync( @@ -240,18 +249,24 @@ public override Task ReadStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadStreamAsync), - requestOptions, - (trace) => base.ReadStreamAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadStreamAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadStreamAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReadThroughputAsync(CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadThroughputAsync), - null, - (trace) => base.ReadThroughputAsync(trace, cancellationToken)); + operationName: nameof(ReadThroughputAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Read, + requestOptions: null, + task: (trace) => base.ReadThroughputAsync(trace, cancellationToken)); } public override Task ReadThroughputAsync( @@ -259,10 +274,13 @@ public override Task ReadThroughputAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadThroughputAsync), - requestOptions, - (trace) => base.ReadThroughputAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadThroughputAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadThroughputAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceThroughputAsync( @@ -271,10 +289,13 @@ public override Task ReplaceThroughputAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceThroughputAsync), - requestOptions, - (trace) => base.ReplaceThroughputAsync(throughput, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceThroughputAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceThroughputAsync(throughput, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceThroughputAsync( @@ -283,10 +304,13 @@ public override Task ReplaceThroughputAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceThroughputAsync), - requestOptions, - (trace) => base.ReplaceThroughputAsync(throughputProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceThroughputAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceThroughputAsync(throughputProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task CreateContainerAsync( @@ -296,13 +320,13 @@ public override Task CreateContainerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerAsync), - requestOptions, - (trace) => base.CreateContainerAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse( - responseMessage: response, - containerName: response.Resource?.Id, - databaseName: this.Id)); + operationName: nameof(CreateContainerAsync), + containerName: containerProperties.Id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task CreateContainerIfNotExistsAsync( @@ -312,10 +336,13 @@ public override Task CreateContainerIfNotExistsAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerIfNotExistsAsync), - requestOptions, - (trace) => base.CreateContainerIfNotExistsAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response, response.Resource?.Id, this.Id)); + operationName: nameof(CreateContainerIfNotExistsAsync), + containerName: containerProperties.Id, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerIfNotExistsAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task CreateContainerStreamAsync( @@ -325,10 +352,13 @@ public override Task CreateContainerStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateContainerStreamAsync), - requestOptions, - (trace) => base.CreateContainerStreamAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateContainerStreamAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateContainerStreamAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task UpsertUserAsync( @@ -337,10 +367,13 @@ public override Task UpsertUserAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(UpsertUserAsync), - requestOptions, - (trace) => base.UpsertUserAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(UpsertUserAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Upsert, + requestOptions: requestOptions, + task: (trace) => base.UpsertUserAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override ClientEncryptionKey GetClientEncryptionKey(string id) @@ -362,10 +395,13 @@ public override Task CreateClientEncryptionKeyAsync CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateClientEncryptionKeyAsync), - requestOptions, - (trace) => base.CreateClientEncryptionKeyAsync(trace, clientEncryptionKeyProperties, requestOptions, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateClientEncryptionKeyAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateClientEncryptionKeyAsync(trace, clientEncryptionKeyProperties, requestOptions, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore.cs index bf19fa7743..e1d18b72af 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore.cs @@ -51,22 +51,14 @@ public override CosmosElement GetCosmosElementContinuationToken() public override Task ReadNextAsync(CancellationToken cancellationToken = default) { - return this.clientContext.OperationHelperAsync("FeedIterator Read Next Async", + return this.clientContext.OperationHelperAsync( + operationName: "FeedIterator Read Next Async", + containerName: this.container?.Id, + databaseName: this.container?.Database?.Id ?? this.databaseName, + operationType: Documents.OperationType.ReadFeed, requestOptions: null, task: (trace) => this.feedIteratorInternal.ReadNextAsync(trace, cancellationToken), - openTelemetry: (response) => - { - if (this.container == null) - { - return new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: this.databaseName); - } - return new OpenTelemetryResponse(responseMessage: response, - containerName: this.container?.Id, - databaseName: this.container?.Database?.Id ?? this.databaseName); - }); + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task ReadNextAsync(ITrace trace, CancellationToken cancellationToken = default) diff --git a/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore{T}.cs b/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore{T}.cs index d115dcd175..cebfadb4c4 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/FeedIterators/FeedIteratorInlineCore{T}.cs @@ -46,23 +46,14 @@ internal FeedIteratorInlineCore( public override Task> ReadNextAsync(CancellationToken cancellationToken = default) { - return this.clientContext.OperationHelperAsync("Typed FeedIterator ReadNextAsync", + return this.clientContext.OperationHelperAsync( + operationName: "Typed FeedIterator ReadNextAsync", + containerName: this.container?.Id, + databaseName: this.container?.Database.Id ?? this.databaseName, + operationType: Documents.OperationType.ReadFeed, requestOptions: null, task: trace => this.feedIteratorInternal.ReadNextAsync(trace, cancellationToken), - openTelemetry: (response) => - { - if (this.container == null) - { - return new OpenTelemetryResponse( - responseMessage: response, - containerName: null, - databaseName: this.databaseName); - } - return new OpenTelemetryResponse( - responseMessage: response, - containerName: this.container?.Id, - databaseName: this.container?.Database?.Id ?? this.databaseName); - }); + openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response)); } public override Task> ReadNextAsync(ITrace trace, CancellationToken cancellationToken) diff --git a/Microsoft.Azure.Cosmos/src/Resource/Permission/PermissionInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Permission/PermissionInlineCore.cs index 121e0c245a..ecf8e36d95 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Permission/PermissionInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Permission/PermissionInlineCore.cs @@ -27,10 +27,13 @@ public override Task ReadAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadAsync), - requestOptions, - (trace) => base.ReadAsync(tokenExpiryInSeconds, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadAsync(tokenExpiryInSeconds, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceAsync( @@ -40,10 +43,13 @@ public override Task ReplaceAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceAsync), - requestOptions, - (trace) => base.ReplaceAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteAsync( @@ -51,10 +57,13 @@ public override Task DeleteAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteAsync), + operationName: nameof(DeleteAsync), + containerName: null, + databaseName: this.Id, + operationType: Documents.OperationType.Delete, requestOptions, - (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + task: (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Scripts/ScriptsInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Scripts/ScriptsInlineCore.cs index 0eae93212c..15059c1def 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Scripts/ScriptsInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Scripts/ScriptsInlineCore.cs @@ -27,10 +27,13 @@ public override Task CreateStoredProcedureAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateStoredProcedureAsync), - requestOptions, - (trace) => base.CreateStoredProcedureAsync(storedProcedureProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateStoredProcedureAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateStoredProcedureAsync(storedProcedureProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override FeedIterator GetStoredProcedureQueryIterator( @@ -87,10 +90,13 @@ public override Task ReadStoredProcedureAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadStoredProcedureAsync), - requestOptions, - (trace) => base.ReadStoredProcedureAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadStoredProcedureAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadStoredProcedureAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceStoredProcedureAsync( @@ -99,10 +105,13 @@ public override Task ReplaceStoredProcedureAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceStoredProcedureAsync), + operationName: nameof(ReplaceStoredProcedureAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Replace, requestOptions, - (trace) => base.ReplaceStoredProcedureAsync(storedProcedureProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + task: (trace) => base.ReplaceStoredProcedureAsync(storedProcedureProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteStoredProcedureAsync( @@ -111,10 +120,13 @@ public override Task DeleteStoredProcedureAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteStoredProcedureAsync), - requestOptions, - (trace) => base.DeleteStoredProcedureAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteStoredProcedureAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteStoredProcedureAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task> ExecuteStoredProcedureAsync( @@ -125,10 +137,13 @@ public override Task> ExecuteStoredProce CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ExecuteStoredProcedureAsync), - requestOptions, - (trace) => base.ExecuteStoredProcedureAsync(storedProcedureId, partitionKey, parameters, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ExecuteStoredProcedureAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Execute, + requestOptions: requestOptions, + task: (trace) => base.ExecuteStoredProcedureAsync(storedProcedureId, partitionKey, parameters, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ExecuteStoredProcedureStreamAsync( @@ -139,10 +154,13 @@ public override Task ExecuteStoredProcedureStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ExecuteStoredProcedureStreamAsync), - requestOptions, - (trace) => base.ExecuteStoredProcedureStreamAsync(storedProcedureId, partitionKey, parameters, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ExecuteStoredProcedureStreamAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Execute, + requestOptions: requestOptions, + task: (trace) => base.ExecuteStoredProcedureStreamAsync(storedProcedureId, partitionKey, parameters, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ExecuteStoredProcedureStreamAsync( @@ -153,10 +171,13 @@ public override Task ExecuteStoredProcedureStreamAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ExecuteStoredProcedureStreamAsync), - requestOptions, - (trace) => base.ExecuteStoredProcedureStreamAsync(storedProcedureId, streamPayload, partitionKey, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ExecuteStoredProcedureStreamAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Execute, + requestOptions: requestOptions, + task: (trace) => base.ExecuteStoredProcedureStreamAsync(storedProcedureId, streamPayload, partitionKey, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task CreateTriggerAsync( @@ -165,10 +186,13 @@ public override Task CreateTriggerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateTriggerAsync), - requestOptions, - (trace) => base.CreateTriggerAsync(triggerProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateTriggerAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateTriggerAsync(triggerProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override FeedIterator GetTriggerQueryIterator( @@ -225,10 +249,13 @@ public override Task ReadTriggerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadTriggerAsync), - requestOptions, - (trace) => base.ReadTriggerAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadTriggerAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadTriggerAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceTriggerAsync( @@ -237,10 +264,13 @@ public override Task ReplaceTriggerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceTriggerAsync), - requestOptions, - (trace) => base.ReplaceTriggerAsync(triggerProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceTriggerAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceTriggerAsync(triggerProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteTriggerAsync( @@ -249,10 +279,13 @@ public override Task DeleteTriggerAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteTriggerAsync), - requestOptions, - (trace) => base.DeleteTriggerAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteTriggerAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteTriggerAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task CreateUserDefinedFunctionAsync( @@ -261,10 +294,13 @@ public override Task CreateUserDefinedFunctionAsync CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreateUserDefinedFunctionAsync), - requestOptions, - (trace) => base.CreateUserDefinedFunctionAsync(userDefinedFunctionProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreateUserDefinedFunctionAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreateUserDefinedFunctionAsync(userDefinedFunctionProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override FeedIterator GetUserDefinedFunctionQueryIterator( @@ -321,10 +357,13 @@ public override Task ReadUserDefinedFunctionAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadUserDefinedFunctionAsync), - requestOptions, - (trace) => base.ReadUserDefinedFunctionAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadUserDefinedFunctionAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadUserDefinedFunctionAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceUserDefinedFunctionAsync( @@ -333,10 +372,13 @@ public override Task ReplaceUserDefinedFunctionAsyn CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceUserDefinedFunctionAsync), - requestOptions, - (trace) => base.ReplaceUserDefinedFunctionAsync(userDefinedFunctionProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceUserDefinedFunctionAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceUserDefinedFunctionAsync(userDefinedFunctionProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteUserDefinedFunctionAsync( @@ -345,10 +387,13 @@ public override Task DeleteUserDefinedFunctionAsync CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteUserDefinedFunctionAsync), - requestOptions, - (trace) => base.DeleteUserDefinedFunctionAsync(id, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteUserDefinedFunctionAsync), + containerName: this.container.Id, + databaseName: this.container.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteUserDefinedFunctionAsync(id, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/User/UserInlineCore.cs b/Microsoft.Azure.Cosmos/src/Resource/User/UserInlineCore.cs index 6969e67d3e..c50ab7ff22 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/User/UserInlineCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/User/UserInlineCore.cs @@ -26,10 +26,13 @@ public override Task ReadAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReadAsync), - requestOptions, - (trace) => base.ReadAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReadAsync), + containerName: null, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Read, + requestOptions: requestOptions, + task: (trace) => base.ReadAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task ReplaceAsync( @@ -38,10 +41,13 @@ public override Task ReplaceAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(ReplaceAsync), - requestOptions, - (trace) => base.ReplaceAsync(userProperties, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(ReplaceAsync), + containerName: null, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Replace, + requestOptions: requestOptions, + task: (trace) => base.ReplaceAsync(userProperties, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task DeleteAsync( @@ -49,10 +55,13 @@ public override Task DeleteAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(DeleteAsync), - requestOptions, - (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(DeleteAsync), + containerName: null, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Delete, + requestOptions: requestOptions, + task: (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Permission GetPermission(string id) @@ -67,10 +76,13 @@ public override Task CreatePermissionAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(CreatePermissionAsync), - requestOptions, - (trace) => base.CreatePermissionAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(CreatePermissionAsync), + containerName: null, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Create, + requestOptions: requestOptions, + task: (trace) => base.CreatePermissionAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override Task UpsertPermissionAsync( @@ -80,10 +92,13 @@ public override Task UpsertPermissionAsync( CancellationToken cancellationToken = default) { return this.ClientContext.OperationHelperAsync( - nameof(UpsertPermissionAsync), - requestOptions, - (trace) => base.UpsertPermissionAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken), - (response) => new OpenTelemetryResponse(response)); + operationName: nameof(UpsertPermissionAsync), + containerName: null, + databaseName: this.Database.Id, + operationType: Documents.OperationType.Upsert, + requestOptions: requestOptions, + task: (trace) => base.UpsertPermissionAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken), + openTelemetry: (response) => new OpenTelemetryResponse(response)); } public override FeedIterator GetPermissionQueryIterator( diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs index d53dab1e50..41ae6e1e77 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs @@ -26,7 +26,9 @@ public static bool IsEnabled(EventLevel level) } [NonEvent] - public static void RecordDiagnosticsForRequests(DistributedTracingOptions config, + public static void RecordDiagnosticsForRequests( + DistributedTracingOptions config, + Documents.OperationType operationType, OpenTelemetryAttributes response) { if (CosmosDbEventSource.IsEnabled(EventLevel.Informational)) @@ -37,6 +39,7 @@ public static void RecordDiagnosticsForRequests(DistributedTracingOptions config { if (DiagnosticsFilterHelper.IsTracingNeeded( config: config, + operationType: operationType, response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning)) { CosmosDbEventSource.Singleton.WriteWarningEvent(response.Diagnostics.ToString()); diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs index 56a4abd648..e4db97bc3f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs @@ -17,6 +17,7 @@ internal static class DiagnosticsFilterHelper /// true or false public static bool IsTracingNeeded( DistributedTracingOptions config, + OperationType operationType, OpenTelemetryAttributes response) { TimeSpan latencyThreshold; @@ -27,7 +28,7 @@ public static bool IsTracingNeeded( } else { - latencyThreshold = response.OperationType == OperationType.Query.ToOperationTypeString() ? DistributedTracingOptions.DefaultQueryTimeoutThreshold : DistributedTracingOptions.DefaultCrudLatencyThreshold; + latencyThreshold = operationType == OperationType.Query ? DistributedTracingOptions.DefaultQueryTimeoutThreshold : DistributedTracingOptions.DefaultCrudLatencyThreshold; } return response.Diagnostics.GetClientElapsedTime() > latencyThreshold || !response.StatusCode.IsSuccess(); diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs index 636ccd5714..3d9ee4afbb 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs @@ -18,12 +18,9 @@ internal OpenTelemetryAttributes() { } - internal OpenTelemetryAttributes(RequestMessage requestMessage, string containerName, string databaseName) + internal OpenTelemetryAttributes(RequestMessage requestMessage) { this.RequestContentLength = requestMessage?.Headers?.ContentLength ?? OpenTelemetryAttributes.NotAvailable; - this.OperationType = requestMessage?.OperationType.ToOperationTypeString() ?? OpenTelemetryAttributes.NotAvailable; - this.DatabaseName = requestMessage?.DatabaseId ?? databaseName ?? OpenTelemetryAttributes.NotAvailable; - this.ContainerName = requestMessage?.ContainerId ?? containerName ?? OpenTelemetryAttributes.NotAvailable; } /// @@ -46,16 +43,6 @@ internal OpenTelemetryAttributes(RequestMessage requestMessage, string container /// internal string ResponseContentLength { get; set; } - /// - /// DatabaseName - /// - internal string DatabaseName { get; set; } - - /// - /// ContainerName - /// - internal string ContainerName { get; set; } - /// /// ItemCount /// @@ -66,11 +53,6 @@ internal OpenTelemetryAttributes(RequestMessage requestMessage, string container /// internal CosmosDiagnostics Diagnostics { get; set; } - /// - /// OperationType - /// - internal string OperationType { get; set; } - /// /// SubStatusCode /// diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index c70b14a550..b8be214392 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -7,7 +7,9 @@ namespace Microsoft.Azure.Cosmos.Telemetry using System; using System.Collections.Generic; using Diagnostics; + using global::Azure; using global::Azure.Core.Pipeline; + using HdrHistogram; internal struct OpenTelemetryCoreRecorder : IDisposable { @@ -16,6 +18,8 @@ internal struct OpenTelemetryCoreRecorder : IDisposable private readonly DiagnosticScope scope; private readonly DistributedTracingOptions config; + private readonly Documents.OperationType operationType; + internal static IDictionary> OTelCompatibleExceptions = new Dictionary>() { { typeof(CosmosNullReferenceException), (exception, scope) => CosmosNullReferenceException.RecordOtelAttributes((CosmosNullReferenceException)exception, scope)}, @@ -25,16 +29,28 @@ internal struct OpenTelemetryCoreRecorder : IDisposable { typeof(ChangeFeedProcessorUserException), (exception, scope) => ChangeFeedProcessorUserException.RecordOtelAttributes((ChangeFeedProcessorUserException)exception, scope)} }; - public OpenTelemetryCoreRecorder(DiagnosticScope scope, CosmosClientContext clientContext, DistributedTracingOptions config) + public OpenTelemetryCoreRecorder( + DiagnosticScope scope, + string operationName, + string containerName, + string databaseName, + Documents.OperationType operationType, + CosmosClientContext clientContext, DistributedTracingOptions config) { this.scope = scope; this.config = config; - + this.operationType = operationType; + if (this.IsEnabled) { this.scope.Start(); - this.Record(clientContext); + this.Record( + operationName: operationName, + containerName: containerName, + databaseName: databaseName, + operationType: operationType, + clientContext: clientContext); } } @@ -47,15 +63,29 @@ public void Record(string key, string value) this.scope.AddAttribute(key, value); } } - + /// - /// System Level and Client level attributes + /// Recording information /// + /// + /// + /// + /// /// - public void Record(CosmosClientContext clientContext) + public void Record( + string operationName, + string containerName, + string databaseName, + Documents.OperationType operationType, + CosmosClientContext clientContext) { if (this.IsEnabled) { + this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbOperation, operationName); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbName, databaseName); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.ContainerName, containerName); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.OperationType, operationType); + // Other information this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbSystemName, OpenTelemetryCoreRecorder.CosmosDb); this.scope.AddAttribute(OpenTelemetryAttributeKeys.MachineId, VmMetadataApiHandler.GetMachineId()); @@ -76,21 +106,17 @@ public void Record(OpenTelemetryAttributes response) { if (this.IsEnabled) { - this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbName, response.DatabaseName); - - this.scope.AddAttribute(OpenTelemetryAttributeKeys.ContainerName, response.ContainerName); this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestContentLength, response.RequestContentLength); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ResponseContentLength, response.ResponseContentLength); this.scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, response.StatusCode); this.scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, response.SubStatusCode); this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, response.RequestCharge); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ItemCount, response.ItemCount); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.OperationType, response.OperationType); - + if (response.Diagnostics != null) { this.scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(response.Diagnostics.GetContactedRegions()) ?? OpenTelemetryAttributes.NotAvailable); - CosmosDbEventSource.RecordDiagnosticsForRequests(this.config, response); + CosmosDbEventSource.RecordDiagnosticsForRequests(this.config, this.operationType, response); } else { diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index f72954045b..c66339e51e 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -10,7 +10,10 @@ internal static class OpenTelemetryRecorderFactory { private static DiagnosticScopeFactory ScopeFactory { get; set; } - public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, + public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, + string containerName, + string databaseName, + Documents.OperationType operationType, RequestOptions requestOptions, CosmosClientContext clientContext) { @@ -27,6 +30,10 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, { return new OpenTelemetryCoreRecorder( scope: scope, + operationName: operationName, + containerName: containerName, + databaseName: databaseName, + operationType: operationType, clientContext: clientContext, config: requestOptions?.DistributedTracingOptions ?? clientContext.ClientOptions?.DistributedTracingOptions); } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs index 0547fda4bd..7bb1fdc12e 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs @@ -10,29 +10,25 @@ namespace Microsoft.Azure.Cosmos internal sealed class OpenTelemetryResponse : OpenTelemetryAttributes { - internal OpenTelemetryResponse(TransactionalBatchResponse responseMessage, string containerName = null, string databaseName = null) + internal OpenTelemetryResponse(TransactionalBatchResponse responseMessage) : this( statusCode: responseMessage.StatusCode, requestCharge: responseMessage.Headers?.RequestCharge, responseContentLength: null, diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, - databaseName: databaseName, - containerName: containerName, requestMessage: null, subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { } - internal OpenTelemetryResponse(ResponseMessage responseMessage, string containerName = null, string databaseName = null) + internal OpenTelemetryResponse(ResponseMessage responseMessage) : this( statusCode: responseMessage.StatusCode, requestCharge: responseMessage.Headers?.RequestCharge, responseContentLength: OpenTelemetryResponse.GetPayloadSize(responseMessage), diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, - databaseName: databaseName, - containerName: containerName, requestMessage: responseMessage.RequestMessage, subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { @@ -44,11 +40,9 @@ private OpenTelemetryResponse( string responseContentLength, CosmosDiagnostics diagnostics, string itemCount, - string databaseName, - string containerName, RequestMessage requestMessage, int subStatusCode) - : base(requestMessage, containerName, databaseName) + : base(requestMessage) { this.StatusCode = statusCode; this.RequestCharge = requestCharge; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs index 68301f4f4e..3d7359da75 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs @@ -9,29 +9,25 @@ namespace Microsoft.Azure.Cosmos internal sealed class OpenTelemetryResponse : OpenTelemetryAttributes { - internal OpenTelemetryResponse(FeedResponse responseMessage, string containerName = null, string databaseName = null) + internal OpenTelemetryResponse(FeedResponse responseMessage) : this( statusCode: responseMessage.StatusCode, requestCharge: responseMessage.Headers?.RequestCharge, responseContentLength: responseMessage?.Headers?.ContentLength, diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, - databaseName: databaseName, - containerName: containerName, requestMessage: responseMessage.RequestMessage, subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { } - internal OpenTelemetryResponse(Response responseMessage, string containerName = null, string databaseName = null) + internal OpenTelemetryResponse(Response responseMessage) : this( statusCode: responseMessage.StatusCode, requestCharge: responseMessage.Headers?.RequestCharge, responseContentLength: responseMessage?.Headers?.ContentLength, diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, - databaseName: databaseName, - containerName: containerName, requestMessage: responseMessage.RequestMessage, subStatusCode: (int)responseMessage.Headers?.SubStatusCode) { @@ -43,11 +39,9 @@ private OpenTelemetryResponse( string responseContentLength, CosmosDiagnostics diagnostics, string itemCount, - string databaseName, - string containerName, RequestMessage requestMessage, int subStatusCode) - : base(requestMessage, containerName, databaseName) + : base(requestMessage) { this.StatusCode = statusCode; this.RequestCharge = requestCharge; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 49f8d13a83..15d67f3483 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -129,7 +129,7 @@ } ] }]]> - Cosmos.ExecuteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ExecuteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index 41dca40b1e..bc0240518f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -134,16 +134,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -292,16 +292,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -450,16 +450,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -608,16 +608,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -766,16 +766,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -924,16 +924,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1082,16 +1082,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1240,16 +1240,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1398,16 +1398,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1556,16 +1556,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2288,7 +2288,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 07da410dcf..1a1f0b40ee 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -952,11 +952,11 @@ } ] }]]> - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1569,11 +1569,11 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2167,11 +2167,11 @@ } ] }]]> - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2785,11 +2785,11 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3066,8 +3066,8 @@ } ] }]]> - Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index a011bb4d54..bffa1a103a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -107,8 +107,8 @@ } ] }]]> - Cosmos.DeleteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -207,8 +207,8 @@ } ] }]]> - Cosmos.DeleteAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 3d7eb4ca65..d87ec949cd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -148,7 +148,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -391,7 +391,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -616,7 +616,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -873,7 +873,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1194,7 +1194,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1348,7 +1348,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 5909fa5328..5368aad0e7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -574,10 +574,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1180,10 +1180,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1767,10 +1767,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2374,10 +2374,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3048,10 +3048,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3644,10 +3644,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4260,10 +4260,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index b5ed674d20..8860741fc2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -536,10 +536,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1104,10 +1104,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1653,10 +1653,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2222,10 +2222,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 4aec783e49..5cc059c7a7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -542,12 +542,12 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1112,7 +1112,7 @@ } ] }]]> - Cosmos.ReadManyItemsAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadManyItemsAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 59937f5675..665f74396c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -89,7 +89,7 @@ } ] }]]> - Cosmos.CreateItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -178,7 +178,7 @@ } ] }]]> - Cosmos.ReadItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -275,7 +275,7 @@ } ] }]]> - Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -367,7 +367,7 @@ } ] }]]> - Cosmos.DeleteItemStreamAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index 8eb9eebaea..8042b6e21d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -109,7 +109,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -203,7 +203,7 @@ } ] }]]> - Cosmos.ReadItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReadItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -310,7 +310,7 @@ } ] }]]> - Cosmos.ReplaceItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.ReplaceItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -406,7 +406,7 @@ } ] }]]> - Cosmos.DeleteItemAsynckindaz.namespacedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.operation_typedb.cosmosdb.regions_contacted + Cosmos.DeleteItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml index 1d67b08708..cff22b3e76 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.Spatial.xml @@ -478,8 +478,7 @@ ST_WITHIN Geography - SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, - {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) /key @@ -513,8 +512,7 @@ ST_WITHIN Geometry - SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, - {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) + SELECT * FROM c WHERE NOT ST_WITHIN(c.geojson, {'type':'Polygon','coordinates':[[[-60,20], [70,20], [70,70], [-60,70], [-60,20]]]}) /key diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncBatcherTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncBatcherTests.cs index 28913390ec..044a735734 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncBatcherTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncBatcherTests.cs @@ -757,13 +757,16 @@ private static CosmosClientContext MockClientContext() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.IsAny(), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType,requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); return mockContext.Object; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncContainerExecutorTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncContainerExecutorTests.cs index a51ff0ef3a..993afa449b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncContainerExecutorTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncContainerExecutorTests.cs @@ -345,13 +345,16 @@ private Mock MockClientContext() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.IsAny(), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName,containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); mockContext.Setup(x => x.Client).Returns(MockCosmosUtil.CreateMockCosmosClient()); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncStreamerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncStreamerTests.cs index 9e72ada29b..896eb0fade 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncStreamerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Batch/BatchAsyncStreamerTests.cs @@ -201,13 +201,16 @@ private CosmosClientContext GetMockClientContext() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.IsAny(), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); return mockContext.Object; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs index 4b9a50c75d..4cc722528b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedEstimatorIteratorTests.cs @@ -336,13 +336,16 @@ static FeedIteratorInternal feedCreator(DocumentServiceLease lease, string conti mockedContext.Setup(c => c.Client).Returns(MockCosmosUtil.CreateMockCosmosClient()); mockedContext.Setup(x => x.OperationHelperAsync>( It.Is(str => str.Contains("Change Feed Estimator")), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>>(), It.IsAny, OpenTelemetryAttributes>>(), It.Is(tc => tc == TraceComponent.ChangeFeed), It.IsAny())) - .Returns>>, Func, OpenTelemetryAttributes>, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => + .Returns>>, Func, OpenTelemetryAttributes>, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => { using (ITrace trace = Trace.GetRootTrace(operationName, comp, level)) { @@ -355,7 +358,7 @@ static FeedIteratorInternal feedCreator(DocumentServiceLease lease, string conti Mock mockedMonitoredContainer = new Mock(MockBehavior.Strict); mockedMonitoredContainer.Setup(c => c.GetCachedRIDAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(monitoredContainerRid); mockedMonitoredContainer.Setup(c => c.ClientContext).Returns(mockedContext.Object); - + mockedMonitoredContainer.Setup(c => c.Id).Returns("containerId"); Mock leaseFeedIterator = new Mock(); leaseFeedIterator.Setup(i => i.HasMoreResults).Returns(false); @@ -425,15 +428,21 @@ private static ContainerInternal GetMockedContainer() Mock mockContext = new Mock(MockBehavior.Strict); mockContext.Setup(x => x.Client).Returns(mockClient.Object); containerMock.Setup(c => c.ClientContext).Returns(mockContext.Object); + containerMock.Setup(c => c.Id).Returns("containerId"); + containerMock.Setup(c => c.Database.Id).Returns("databaseId"); + mockContext.Setup(x => x.OperationHelperAsync>( It.Is(str => str.Contains("Change Feed Estimator")), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>>(), It.IsAny, OpenTelemetryAttributes>>(), It.Is(tc => tc == TraceComponent.ChangeFeed), It.IsAny())) - .Returns>>, Func, OpenTelemetryAttributes>, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => + .Returns>>, Func, OpenTelemetryAttributes>, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => { using (ITrace trace = Trace.GetRootTrace(operationName, comp, level)) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCoreTests.cs index 42de6190f4..ebbb837943 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCoreTests.cs @@ -41,13 +41,16 @@ public async Task EtagPassesContinuation() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.Is(str => str.Contains("Change Feed Processor")), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.Is(tc => tc == TraceComponent.ChangeFeed), It.IsAny())) - .Returns>,Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => + .Returns>,Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => { using (ITrace trace = Trace.GetRootTrace(operationName, comp, level)) { @@ -70,7 +73,9 @@ public async Task EtagPassesContinuation() ).ReturnsAsync(responseMessage); containerMock.Setup(c => c.ClientContext).Returns(mockContext.Object); containerMock.Setup(c => c.LinkUri).Returns("http://localhot"); - + containerMock.Setup(c => c.Id).Returns("containerId"); + containerMock.Setup(c => c.Database.Id).Returns("databaseId"); + ChangeFeedPartitionKeyResultSetIteratorCore iterator = ChangeFeedPartitionKeyResultSetIteratorCore.Create( lease: documentServiceLeaseCore, continuationToken: null, @@ -115,13 +120,16 @@ public async Task NextReadHasUpdatedContinuation() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.Is(str => str.Contains("Change Feed Processor")), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.Is(tc => tc == TraceComponent.ChangeFeed), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => { using (ITrace trace = Trace.GetRootTrace(operationName, comp, level)) { @@ -146,7 +154,9 @@ public async Task NextReadHasUpdatedContinuation() .ReturnsAsync(secondResponse); containerMock.Setup(c => c.ClientContext).Returns(mockContext.Object); containerMock.Setup(c => c.LinkUri).Returns("http://localhot"); - + containerMock.Setup(c => c.Id).Returns("containerId"); + containerMock.Setup(c => c.Database.Id).Returns("databaseId"); + ChangeFeedPartitionKeyResultSetIteratorCore iterator = ChangeFeedPartitionKeyResultSetIteratorCore.Create( lease: documentServiceLeaseCore, continuationToken: null, @@ -179,13 +189,16 @@ public async Task ShouldSetFeedRangePartitionKeyRange() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.Is(str => str.Contains("Change Feed Processor")), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.Is(tc => tc == TraceComponent.ChangeFeed), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => { using (ITrace trace = Trace.GetRootTrace(operationName, comp, level)) { @@ -208,7 +221,9 @@ public async Task ShouldSetFeedRangePartitionKeyRange() ).ReturnsAsync(new ResponseMessage(System.Net.HttpStatusCode.OK)); containerMock.Setup(c => c.ClientContext).Returns(mockContext.Object); containerMock.Setup(c => c.LinkUri).Returns("http://localhot"); - + containerMock.Setup(c => c.Id).Returns("containerId"); + containerMock.Setup(c => c.Database.Id).Returns("databaseId"); + ChangeFeedPartitionKeyResultSetIteratorCore iterator = ChangeFeedPartitionKeyResultSetIteratorCore.Create( lease: documentServiceLeaseCore, continuationToken: null, @@ -255,13 +270,16 @@ public async Task ShouldUseFeedRangeEpk() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.Is(str => str.Contains("Change Feed Processor")), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.Is(tc => tc == TraceComponent.ChangeFeed), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => { using (ITrace trace = Trace.GetRootTrace(operationName, comp, level)) { @@ -283,7 +301,10 @@ public async Task ShouldUseFeedRangeEpk() ) ).ReturnsAsync(new ResponseMessage(System.Net.HttpStatusCode.OK)); containerMock.Setup(c => c.ClientContext).Returns(mockContext.Object); - containerMock.Setup(c => c.LinkUri).Returns("http://localhot"); + containerMock.Setup(c => c.LinkUri).Returns("http://localhost"); + containerMock.Setup(c => c.Id).Returns("containerId"); + containerMock.Setup(c => c.Database.Id).Returns("databaseId"); + MockDocumentClient mockDocumentClient = new MockDocumentClient(); mockContext.Setup(c => c.DocumentClient).Returns(mockDocumentClient); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosDiagnosticsUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosDiagnosticsUnitTests.cs index 905fbd8757..404955997d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosDiagnosticsUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosDiagnosticsUnitTests.cs @@ -93,9 +93,12 @@ public async Task ValidateActivityId() new CosmosClientOptions()); Guid result = await clientContext.OperationHelperAsync( - nameof(ValidateActivityId), - new RequestOptions(), - (trace) => this.ValidateActivityIdHelper()); + operationName: nameof(ValidateActivityId), + containerName: null, + databaseName: null, + operationType: Documents.OperationType.Replace, + requestOptions: new RequestOptions(), + task: (trace) => this.ValidateActivityIdHelper()); Assert.AreEqual(Guid.Empty, System.Diagnostics.Trace.CorrelationManager.ActivityId, "ActivityScope was not disposed of"); } @@ -119,9 +122,12 @@ public async Task ValidateActivityIdWithSynchronizationContext() SynchronizationContext.SetSynchronizationContext(mockSynchronizationContext.Object); Guid result = await clientContext.OperationHelperAsync( - nameof(ValidateActivityIdWithSynchronizationContext), - new RequestOptions(), - (trace) => this.ValidateActivityIdHelper()); + operationName: nameof(ValidateActivityIdWithSynchronizationContext), + containerName: null, + databaseName: null, + operationType: Documents.OperationType.Replace, + requestOptions: new RequestOptions(), + task: (trace) => this.ValidateActivityIdHelper()); Assert.AreEqual(Guid.Empty, System.Diagnostics.Trace.CorrelationManager.ActivityId, "ActivityScope was not disposed of"); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosItemUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosItemUnitTests.cs index 589ad47efc..5f9b3d3dad 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosItemUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosItemUnitTests.cs @@ -711,23 +711,29 @@ public async Task TestMultipleNestedPartitionKeyValueFromStreamAsync() mockContext.Setup(x => x.OperationHelperAsync( It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.IsAny(), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); mockContext.Setup(x => x.OperationHelperAsync>( It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>>(), It.IsAny, OpenTelemetryAttributes>>(), It.IsAny(), It.IsAny())) - .Returns>>, Func, OpenTelemetryAttributes>, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); + .Returns>>, Func, OpenTelemetryAttributes>, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); mockContext.Setup(x => x.ProcessResourceOperationStreamAsync( It.IsAny(), diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/FeedRange/ChangeFeedIteratorCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/FeedRange/ChangeFeedIteratorCoreTests.cs index 32bbc1173f..6594bd926e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/FeedRange/ChangeFeedIteratorCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/FeedRange/ChangeFeedIteratorCoreTests.cs @@ -477,13 +477,16 @@ private CosmosClientContext MockClientContext() Mock mockContext = new Mock(); mockContext.Setup(x => x.OperationHelperAsync( It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), It.IsAny(), It.IsAny>>(), It.IsAny>(), It.IsAny(), It.IsAny())) - .Returns>, Func, TraceComponent, TraceLevel>( - (operationName, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); + .Returns>, Func, TraceComponent, TraceLevel>( + (operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton)); return mockContext.Object; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs index b86883c451..9474239569 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs @@ -49,7 +49,7 @@ public void CheckReturnFalseOnSuccessAndLowerLatencyThanConfiguredConfig() Assert.IsFalse( DiagnosticsFilterHelper - .IsTracingNeeded(distributedTracingOptions, response), + .IsTracingNeeded(distributedTracingOptions, OperationType.Read, response), $" Response time is {response.Diagnostics.GetClientElapsedTime().Milliseconds}ms " + $"and Configured threshold value is {distributedTracingOptions.DiagnosticsLatencyThreshold.Value.Milliseconds}ms " + $"and Is response Success : {response.StatusCode.IsSuccess()}" ); @@ -74,7 +74,7 @@ public void CheckReturnTrueOnFailedStatusCode() Assert.IsTrue( DiagnosticsFilterHelper - .IsTracingNeeded(distributedTracingOptions, response), + .IsTracingNeeded(distributedTracingOptions, OperationType.Read, response), $" Response time is {response.Diagnostics.GetClientElapsedTime().Milliseconds}ms " + $"and Configured threshold value is {distributedTracingOptions.DiagnosticsLatencyThreshold.Value.Milliseconds}ms " + $"and Is response Success : {response.StatusCode.IsSuccess()}"); From 9c2015bb47f53e92cdc78fd0c105896aefe9d859 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 16 Nov 2022 20:11:55 +0530 Subject: [PATCH 015/164] [Internal] AI Integration: Adds a new flag in DistributedTracingOptions (#3562) * add flag in diagnostic options * test fixes * rename variable * test fix * add validation * fix baseline * test fix Co-authored-by: Sourabh Jain --- .../OpenTelemetry/CosmosDbEventSource.cs | 2 +- .../DistributedTracingOptions.cs | 33 ++++++++++++++++++- ...riterBaselineTests.BulkOperationsAsync.xml | 2 +- ...neTests.PointOperationsExceptionsAsync.xml | 2 +- .../EndToEndTraceWriterBaselineTests.cs | 13 ++++---- .../ChangeFeedEstimatorIteratorTests.cs | 1 + .../CosmosClientOptionsUnitTests.cs | 19 +++++++++++ .../Telemetry/DiagnosticsFilterHelperTest.cs | 4 +-- 8 files changed, 63 insertions(+), 13 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs index 41ae6e1e77..f0ac635d81 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs @@ -31,7 +31,7 @@ public static void RecordDiagnosticsForRequests( Documents.OperationType operationType, OpenTelemetryAttributes response) { - if (CosmosDbEventSource.IsEnabled(EventLevel.Informational)) + if (config.EnableDiagnosticsTraceForAllRequests) { CosmosDbEventSource.Singleton.WriteInfoEvent(response.Diagnostics.ToString()); } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs index 34c7ae69dc..078a554980 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs @@ -21,12 +21,43 @@ internal sealed class DistributedTracingOptions /// Default Latency threshold for QUERY operation /// internal static readonly TimeSpan DefaultQueryTimeoutThreshold = TimeSpan.FromMilliseconds(500); + private bool enableDiagnosticsTraceForAllRequests; + private TimeSpan? diagnosticsLatencyThreshold; /// /// Latency Threshold to generate () with Request diagnostics in distributing Tracing.

/// If it is not set then by default it will generate () for query operation which are taking more than 500 ms and non-query operations taking more than 100 ms. ///
- public TimeSpan? DiagnosticsLatencyThreshold { get; set; } + public TimeSpan? DiagnosticsLatencyThreshold + { + get => this.diagnosticsLatencyThreshold; + set + { + if (this.EnableDiagnosticsTraceForAllRequests) + { + throw new ArgumentException("EnableDiagnosticsTraceForAllRequests can not be true along with DiagnosticsLatencyThreshold."); + } + + this.diagnosticsLatencyThreshold = value; + } + } + /// + /// Set this flag as true if you want to generate () containing request diagnostics string for all the operations. + /// If this flag is true then, it won't honour value to generate diagnostic traces. + /// + public bool EnableDiagnosticsTraceForAllRequests + { + get => this.enableDiagnosticsTraceForAllRequests; + set + { + if (value && this.DiagnosticsLatencyThreshold != null) + { + throw new ArgumentException("EnableDiagnosticsTraceForAllRequests can not be true along with DiagnosticsLatencyThreshold."); + } + + this.enableDiagnosticsTraceForAllRequests = value; + } + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index bc0240518f..a31ad6433d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -1602,7 +1602,7 @@ throttleClient.ClientOptions.EnableDistributedTracing = true; throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(DiagnosticsLatencyThresholdValue) + EnableDiagnosticsTraceForAllRequests = true }; ItemRequestOptions requestOptions = new ItemRequestOptions(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index d87ec949cd..019adb993e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -175,7 +175,7 @@ throttleClient.ClientOptions.EnableDistributedTracing = true; throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(DiagnosticsLatencyThresholdValue) + EnableDiagnosticsTraceForAllRequests = true }; ItemRequestOptions requestOptions = new ItemRequestOptions(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index 855bea096d..aea21c9655 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -37,8 +37,7 @@ public sealed class EndToEndTraceWriterBaselineTests : BaselineTests mockedMonitoredContainer = new Mock(MockBehavior.Strict); mockedMonitoredContainer.Setup(c => c.GetCachedRIDAsync(It.IsAny(), It.IsAny(), It.IsAny())).ReturnsAsync(monitoredContainerRid); mockedMonitoredContainer.Setup(c => c.ClientContext).Returns(mockedContext.Object); + mockedMonitoredContainer.Setup(c => c.Database.Id).Returns("databaseId"); mockedMonitoredContainer.Setup(c => c.Id).Returns("containerId"); Mock leaseFeedIterator = new Mock(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs index e39bb8d0f3..6078570d96 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs @@ -186,6 +186,25 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.AreEqual(portReuseMode, policy.PortReuseMode); Assert.IsTrue(policy.EnableTcpConnectionEndpointRediscovery); CollectionAssert.AreEqual(preferredLocations.ToArray(), policy.PreferredLocations.ToArray()); + + // Verify DiagnosticsLatencyThreshold + cosmosClientBuilder = new CosmosClientBuilder( + accountEndpoint: endpoint, + authKeyOrResourceToken: key); + var exception = Assert.ThrowsException(() => cosmosClientBuilder.WithConnectionModeDirect( + idleTcpConnectionTimeout, + openTcpConnectionTimeout, + maxRequestsPerTcpConnection, + maxTcpConnectionsPerEndpoint, + portReuseMode, + enableTcpConnectionEndpointRediscovery) + .WithApplicationPreferredRegions(preferredLocations) + .WithDistributingTracing(new DistributedTracingOptions + { + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(100), + EnableDiagnosticsTraceForAllRequests = true + })); + Assert.AreEqual("EnableDiagnosticsTraceForAllRequests can not be true along with DiagnosticsLatencyThreshold.", exception.Message); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs index 9474239569..98f4d62954 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs @@ -38,7 +38,7 @@ public void CheckReturnFalseOnSuccessAndLowerLatencyThanConfiguredConfig() DistributedTracingOptions distributedTracingOptions = new DistributedTracingOptions { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(20) + DiagnosticsLatencyThreshold = this.rootTrace.Duration.Add(TimeSpan.FromSeconds(1)) }; OpenTelemetryAttributes response = new OpenTelemetryAttributes @@ -63,7 +63,7 @@ public void CheckReturnTrueOnFailedStatusCode() DistributedTracingOptions distributedTracingOptions = new DistributedTracingOptions { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(20) + DiagnosticsLatencyThreshold = this.rootTrace.Duration.Add(TimeSpan.FromSeconds(1)) }; OpenTelemetryAttributes response = new OpenTelemetryAttributes From c38346dd8d029bf32dc523c678b6df95e8c1b9b9 Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Wed, 16 Nov 2022 17:05:16 -0800 Subject: [PATCH 016/164] Query: Fixes default to BadRequestException in case of internal errors in ServiceInterop (#3399) * Don't default to BadRequestException in case of errors in ServiceInterop * Incorporate code review feedback * Fix build error * fix up failing test --- .../Query/Core/ExceptionToCosmosException.cs | 32 +++++++-------- .../Core/QueryPlan/QueryPlanRetriever.cs | 16 +++----- .../Query/QueryPlanRetrieverTests.cs | 39 +++++++++++++++++-- 3 files changed, 56 insertions(+), 31 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/ExceptionToCosmosException.cs b/Microsoft.Azure.Cosmos/src/Query/Core/ExceptionToCosmosException.cs index 966c603f5d..02c1882e26 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/ExceptionToCosmosException.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/ExceptionToCosmosException.cs @@ -76,32 +76,28 @@ private static bool TryCreateFromExceptionWithStackTrace( ITrace trace, out CosmosException cosmosException) { - // Use the original stack trace from the inner exception. - if (exceptionWithStackTrace.InnerException is Microsoft.Azure.Documents.DocumentClientException - || exceptionWithStackTrace.InnerException is CosmosException) - { - return ExceptionToCosmosException.TryCreateFromException( - exceptionWithStackTrace.InnerException, - trace, - out cosmosException); - } + Exception innerException = ExceptionWithStackTraceException.UnWrapMonadExcepion(exceptionWithStackTrace, trace); if (!ExceptionToCosmosException.TryCreateFromException( - exceptionWithStackTrace.InnerException, + innerException, trace, out cosmosException)) { return false; } - cosmosException = CosmosExceptionFactory.Create( - cosmosException.StatusCode, - cosmosException.Message, - exceptionWithStackTrace.StackTrace, - headers: cosmosException.Headers, - cosmosException.Trace, - cosmosException.Error, - cosmosException.InnerException); + if (innerException is not CosmosException && innerException is not Documents.DocumentClientException) + { + cosmosException = CosmosExceptionFactory.Create( + cosmosException.StatusCode, + cosmosException.Message, + exceptionWithStackTrace.StackTrace, + headers: cosmosException.Headers, + cosmosException.Trace, + cosmosException.Error, + cosmosException.InnerException); + } + return true; } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs index 32e061dfd8..09ad98f395 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPlanRetriever.cs @@ -76,18 +76,14 @@ public static async Task GetQueryPlanWithServiceI if (!tryGetQueryPlan.Succeeded) { - Exception originalException = ExceptionWithStackTraceException.UnWrapMonadExcepion(tryGetQueryPlan.Exception, serviceInteropTrace); - if (originalException is CosmosException) + if (ExceptionToCosmosException.TryCreateFromException(tryGetQueryPlan.Exception, serviceInteropTrace, out CosmosException cosmosException)) { - throw originalException; + throw cosmosException; + } + else + { + throw ExceptionWithStackTraceException.UnWrapMonadExcepion(tryGetQueryPlan.Exception, serviceInteropTrace); } - - throw CosmosExceptionFactory.CreateBadRequestException( - message: originalException.Message, - headers: new Headers(), - stackTrace: tryGetQueryPlan.Exception.StackTrace, - innerException: originalException, - trace: trace); } return tryGetQueryPlan.Result; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs index 47a681eb1a..c1dc2fc3ae 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/QueryPlanRetrieverTests.cs @@ -41,7 +41,6 @@ public async Task ServiceInterop_BadRequestContainsInnerException() It.IsAny(), It.IsAny())).ReturnsAsync(TryCatch.FromException(innerException)); - Mock trace = new Mock(); CosmosException cosmosException = await Assert.ThrowsExceptionAsync(() => QueryPlanRetriever.GetQueryPlanWithServiceInteropAsync( queryClient.Object, new SqlQuerySpec("selectttttt * from c"), @@ -50,8 +49,7 @@ public async Task ServiceInterop_BadRequestContainsInnerException() hasLogicalPartitionKey: false, geospatialType: Cosmos.GeospatialType.Geography, useSystemPrefix: false, - trace.Object, - default)); + NoOpTrace.Singleton)); Assert.AreEqual(HttpStatusCode.BadRequest, cosmosException.StatusCode); Assert.AreEqual(innerException, cosmosException.InnerException); @@ -92,5 +90,40 @@ public async Task ServiceInterop_BadRequestContainsOriginalCosmosException() Assert.AreEqual(expectedException, cosmosException); } + + [TestMethod] + public async Task ServiceInterop_E_UNEXPECTED() + { + UnexpectedQueryPartitionProviderException innerException = new UnexpectedQueryPartitionProviderException("E_UNEXPECTED"); + Mock queryClient = new Mock(); + + queryClient.Setup(c => c.TryGetPartitionedQueryExecutionInfoAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())).ReturnsAsync(TryCatch.FromException(innerException)); + + CosmosException cosmosException = await Assert.ThrowsExceptionAsync(() => QueryPlanRetriever.GetQueryPlanWithServiceInteropAsync( + queryClient.Object, + new SqlQuerySpec("Super secret query that triggers bug"), + ResourceType.Document, + new Documents.PartitionKeyDefinition() { Paths = new Collection() { "/id" } }, + hasLogicalPartitionKey: false, + geospatialType: Cosmos.GeospatialType.Geography, + useSystemPrefix: false, + NoOpTrace.Singleton)); + + Assert.AreEqual(HttpStatusCode.InternalServerError, cosmosException.StatusCode); + Assert.AreEqual(innerException, cosmosException.InnerException); + Assert.IsNotNull(cosmosException.Trace); + Assert.IsNotNull(cosmosException.Diagnostics); + } } } From 9cafaa85c651761fe9eb099e996afb6e1f2dd149 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:18:45 -0800 Subject: [PATCH 017/164] [Internal] Query: Adds unit tests for Merge/Split implementation with OptimisticDirectExecution pipeline (#3510) * Added tests to test different aspects of merge/split support with OptimisticDirectExecution pipeline. Tests check for gone exception handling, pipeline switching etc. * Added gone exception simulation tests. * Added new tests and improved test infra * Removed ParalleContEvocation test. Fixed comments * Removed CreateParallelCrossPartitionPipelineStateAsync() as it is not being used anymore * Removed while loop in CreateDocumentContainerAsync() * Fixed comments. * Updated ExecuteGoneExceptionOnODEPipeline() * Added type Assert for ExecuteGoneExceptionOnODEPipeline() * Updated OptimisticDirectExecution pipeline abbreviation * Updated TestBaseline folder with new xml --- .../CosmosQueryExecutionContextFactory.cs | 4 +- ...ositiveOptimisticDirectExecutionOutput.xml | 12 +- ...misticDirectExecutionQueryBaselineTests.cs | 478 +++++++++--------- 3 files changed, 260 insertions(+), 234 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index fec5fa4d4a..4e6bacb145 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -266,7 +266,7 @@ private static async Task> TryCreateCoreContextAsy } } - public static async Task> TryCreateFromPartitionedQueryExecutionInfoAsync( + private static async Task> TryCreateFromPartitionedQueryExecutionInfoAsync( DocumentContainer documentContainer, PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, ContainerQueryProperties containerQueryProperties, @@ -537,7 +537,7 @@ private static TryCatch TryCreateSpecializedDocumentQueryEx return targetRanges; } - public static void SetTestInjectionPipelineType(InputParameters inputParameters, string pipelineType) + private static void SetTestInjectionPipelineType(InputParameters inputParameters, string pipelineType) { TestInjections.ResponseStats responseStats = inputParameters?.TestInjections?.Stats; if (responseStats != null) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml index 950947ff5a..7d4f7ce18d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml @@ -1,8 +1,8 @@  - Partition Key + Value and Distinct - SELECT DISTINCT c.key FROM c + Single Partition Key and Distinct + SELECT DISTINCT c.age FROM c /pk @@ -14,8 +14,8 @@ - Partition Key + Value and Min Aggregate - SELECT VALUE MIN(c.key) FROM c + Single Partition Key and Min Aggregate + SELECT VALUE MIN(c.age) FROM c /pk @@ -27,8 +27,8 @@ - Partition Key + Value Fields - SELECT c.key FROM c + Single Partition Key and Value Field + SELECT c.age FROM c /pk diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index 960235dcae..f849a04913 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -29,58 +29,110 @@ using System.IO; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.OptimisticDirectExecutionQuery; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.Parallel; + using Microsoft.IdentityModel.Tokens; [TestClass] public class OptimisticDirectExecutionQueryBaselineTests : BaselineTests { [TestMethod] [Owner("akotalwar")] - public void TestPipelineNullContinuationToken() + public void PositiveOptimisticDirectExecutionOutput() { - Mock mockDocumentContainer = new Mock(); + List testVariations = new List + { + CreateInput( + description: @"Single Partition Key and Distinct", + query: "SELECT DISTINCT c.age FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: @"value"), - TryCatch monadicCreate = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( - documentContainer: mockDocumentContainer.Object, - sqlQuerySpec: new SqlQuerySpec("SELECT VALUE COUNT(1) FROM c"), - targetRange: FeedRangeEpk.FullRange, - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), - partitionKey: null, - cancellationToken: default, - continuationToken: null); - Assert.IsTrue(monadicCreate.Succeeded); + CreateInput( + description: @"Single Partition Key and Min Aggregate", + query: "SELECT VALUE MIN(c.age) FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: @"value"), + + CreateInput( + description: @"Single Partition Key and Value Field", + query: "SELECT c.age FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: @"value"), + }; + this.ExecuteTestSuite(testVariations); } [TestMethod] [Owner("akotalwar")] - public void TestPipelineSingleContinuationToken() + public void NegativeOptimisticDirectExecutionOutput() { - Mock mockDocumentContainer = new Mock(); + List testVariations = new List + { + CreateInput( + description: @"Null Partition Key Value", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: false, + partitionKeyPath: @"/pk", + partitionKeyValue: Cosmos.PartitionKey.Null), - ParallelContinuationToken parallelContinuationToken = new ParallelContinuationToken( - token: "asdf", - range: new Documents.Routing.Range("A", "B", true, false)); + CreateInput( + description: @"None Partition Key Value", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: false, + partitionKeyPath: @"/pk", + partitionKeyValue: Cosmos.PartitionKey.None), - OptimisticDirectExecutionContinuationToken token = new OptimisticDirectExecutionContinuationToken(parallelContinuationToken); - CosmosElement cosmosElementContinuationToken = OptimisticDirectExecutionContinuationToken.ToCosmosElement(token); + CreateInput( + description: @"C# Null Partition Key Value", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: false, + partitionKeyPath: @"/pk", + partitionKeyValue: null), + }; + this.ExecuteTestSuite(testVariations); + } - TryCatch monadicCreate = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( - documentContainer: mockDocumentContainer.Object, - sqlQuerySpec: new SqlQuerySpec("SELECT * FROM c"), - targetRange: new FeedRangeEpk(new Documents.Routing.Range(min: "A", max: "B", isMinInclusive: true, isMaxInclusive: false)), - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), - partitionKey: null, - cancellationToken: default, - continuationToken: cosmosElementContinuationToken); - Assert.IsTrue(monadicCreate.Succeeded); + // This test confirms that TestInjection.EnableOptimisticDirectExection is set to false from default. + // Check test "TestPipelineForDistributedQueryAsync" to understand why this is done + [TestMethod] + public async Task TestDefaultTestInjectionSettings() + { + TestInjections testInjection = new TestInjections(simulate429s: false, simulateEmptyPages: false); + + Assert.AreEqual(testInjection.EnableOptimisticDirectExecution, false); } - // test checks that the pipeline can take a query to the backend and returns its associated document(s). [TestMethod] - public async Task TestPipelineForBackendDocumentsAsync() + [Owner("akotalwar")] + public async Task TestMonadicCreateOdePipeline() { int numItems = 10; + bool multiPartition = false; + string query = "SELECT * FROM c"; + + // null continuation token + Assert.IsTrue(await TryMonadicCreate(numItems, multiPartition, query, targetRange: FeedRangeEpk.FullRange, continuationToken: null)); + + CosmosElement cosmosElementContinuationToken = CosmosElement.Parse( + "{\"OptimisticDirectExecutionToken\":{\"token\":\"{\\\"resourceId\\\":\\\"AQAAAMmFOw8LAAAAAAAAAA==\\\",\\\"skipCount\\\":1}\"," + + "\"range\":{\"min\":\"\",\"max\":\"FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF\"}}}"); + Range range = new Documents.Routing.Range("", "FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF", isMinInclusive: true, isMaxInclusive: false); + + // single continuation token + Assert.IsTrue(await TryMonadicCreate(numItems, multiPartition, query, targetRange: new FeedRangeEpk(range), continuationToken: cosmosElementContinuationToken)); + + //TODO: Add non Ode continuation token case + } + + // test checks that the pipeline can take a query to the backend and returns its associated document(s). + [TestMethod] + public async Task TestPipelineForBackendDocumentsOnSinglePartitionAsync() + { + int numItems = 100; string query = "SELECT VALUE COUNT(1) FROM c"; - IDocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems); + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: false); IQueryPipelineStage queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); int documentCountInSinglePartition = 0; @@ -92,17 +144,94 @@ public async Task TestPipelineForBackendDocumentsAsync() documentCountInSinglePartition += Int32.Parse(tryGetPage.Result.Documents[0].ToString()); } - Assert.AreEqual(documentCountInSinglePartition, 4); + Assert.AreEqual(100, documentCountInSinglePartition); } // test checks that the pipeline can take a query to the backend and returns its associated document(s) + continuation token. [TestMethod] - public async Task TestPipelineForContinuationTokenAsync() + public async Task TestPipelineForContinuationTokenOnSinglePartitionAsync() { int numItems = 100; - string query = "SELECT * FROM c"; - IDocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems); + int result = await this.CreateOptimisticPipelineAndDrainAsync( + numItems: numItems, + isMultiPartition: false, + query: "SELECT * FROM c", + expectedContinuationTokenCount: 10); + + Assert.AreEqual(numItems, result); + } + + // test to check if pipeline handles a 410 exception properly and returns all the documents. + [TestMethod] + public async Task TestPipelineForGoneExceptionOnSingleAndMultiplePartitionAsync() + { + Assert.IsTrue(await ExecuteGoneExceptionOnOdePipeline(isMultiPartition: false)); + + Assert.IsTrue(await ExecuteGoneExceptionOnOdePipeline(isMultiPartition: true)); + } + + // The reason we have the below test is to show the missing capabilities of the OptimisticDirectExecution pipeline. + // Currently this pipeline cannot handle distributed queries as it does not have the logic to sum up the values it gets from the backend in partial results. + // This functionality is available for other pipelines such as the ParallelCrossPartitionQueryPipelineStage. + [TestMethod] + public async Task TestPipelineForDistributedQueryAsync() + { + int numItems = 100; + int result = await this.CreateOptimisticPipelineAndDrainAsync( + numItems: numItems, + isMultiPartition: false, + query: "SELECT AVG(c) FROM c", + expectedContinuationTokenCount: 0); + + //TODO: Add validation for actual value of average + Assert.AreEqual(1, result); + } + + private static async Task TryMonadicCreate(int numItems, bool multiPartition, string query, FeedRangeEpk targetRange, CosmosElement continuationToken) + { + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition); + + TryCatch monadicQueryPipelineStage = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( + documentContainer: inMemoryCollection, + sqlQuerySpec: new SqlQuerySpec(query), + targetRange: targetRange, + queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), + partitionKey: null, + cancellationToken: default, + continuationToken: continuationToken); + + return monadicQueryPipelineStage.Succeeded; + } + + private static async Task CreateOptimisticDirectExecutionPipelineStateAsync(DocumentContainer documentContainer, string query, CosmosElement continuationToken) + { + List targetRanges = await documentContainer.GetFeedRangesAsync( + trace: NoOpTrace.Singleton, + cancellationToken: default); + + // only one range is taken because Ode pipeline can only accept one range + FeedRangeEpk firstRange = targetRanges[0]; + + TryCatch monadicQueryPipelineStage = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( + documentContainer: documentContainer, + sqlQuerySpec: new SqlQuerySpec(query), + targetRange: firstRange, + queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), + partitionKey: null, + continuationToken: continuationToken, + cancellationToken: default); + + Assert.IsTrue(monadicQueryPipelineStage.Succeeded); + IQueryPipelineStage queryPipelineStage = monadicQueryPipelineStage.Result; + + return queryPipelineStage; + } + + private async Task CreateOptimisticPipelineAndDrainAsync(int numItems, bool isMultiPartition, string query, int expectedContinuationTokenCount) + { + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: isMultiPartition); IQueryPipelineStage queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); + List documents = new List(); int continuationTokenCount = 0; @@ -125,126 +254,66 @@ public async Task TestPipelineForContinuationTokenAsync() continuationTokenCount++; } - Assert.AreEqual(continuationTokenCount, 2); - Assert.AreEqual(documents.Count, 17); + Assert.AreEqual(expectedContinuationTokenCount, continuationTokenCount); + return documents.Count; } - // This test confirms that TestInjection.EnableOptimisticDirectExection is set to false from default. - // Check test "TestPipelineForDistributedQueryAsync" to understand why this is done - [TestMethod] - public async Task TestDefaultTestInjectionSettings() - { - TestInjections testInjection = new TestInjections(simulate429s: false, simulateEmptyPages: false); - - Assert.AreEqual(testInjection.EnableOptimisticDirectExecution, false); - } - - // The reason we have the below test is to show the missing capabilities of the OptimisticDirectExecution pipeline. - // Currently this pipeline cannot handle distributed queries as it does not have the logic to sum up the values it gets from the backend in partial results. - // This functionality is available for other pipelines such as the ParallelCrossPartitionQueryPipelineStage as evident below - [TestMethod] - public async Task TestPipelineForDistributedQueryAsync() + // it creates a gone exception after the first MoveNexyAsync() call. This allows for the pipeline to return some documents before failing + // TODO: With the addition of the merge/split support, this queryPipelineStage should be able to return all documents regardless of a gone exception happening + private static async Task ExecuteGoneExceptionOnOdePipeline(bool isMultiPartition) { int numItems = 100; - string query = "SELECT VALUE COUNT(1) FROM c"; - IDocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems); - IQueryPipelineStage optimisticDirectExecutionQueryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); - IQueryPipelineStage parallelQueryPipelineStage = await CreateParallelCrossPartitionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); - int documentCountOptimisticPipeline = 0; - int documentCountParallelPipeline = 0; - - List queryPipelineStages = new List - { - optimisticDirectExecutionQueryPipelineStage, - parallelQueryPipelineStage - }; - - List documentPipelinesCount = new List - { - documentCountOptimisticPipeline, - documentCountParallelPipeline - }; + string query = "SELECT * FROM c"; + List documents = new List(); + string goneExceptionMessage = $"Epk Range: Partition does not exist at the given range."; + CosmosException goneException = new CosmosException( + message: goneExceptionMessage, + statusCode: System.Net.HttpStatusCode.Gone, + subStatusCode: (int)SubStatusCodes.PartitionKeyRangeGone, + activityId: "0f8fad5b-d9cb-469f-a165-70867728950e", + requestCharge: default); + + int moveNextAsyncCounter = 0; + bool caughtGoneException = false; + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync( + numItems, + multiPartition: isMultiPartition, + failureConfigs: new FlakyDocumentContainer.FailureConfigs( + inject429s: false, + injectEmptyPages: false, + shouldReturnFailure: () => Task.FromResult(moveNextAsyncCounter == 1 ? goneException : null))); - for (int i = 0; i < queryPipelineStages.Count(); i++) + IQueryPipelineStage queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); + while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) { - while (await queryPipelineStages[i].MoveNextAsync(NoOpTrace.Singleton)) - { - TryCatch tryGetPage = queryPipelineStages[i].Current; - tryGetPage.ThrowIfFailed(); + moveNextAsyncCounter++; + TryCatch tryGetPage = queryPipelineStage.Current; - documentPipelinesCount[i] += Int32.Parse(tryGetPage.Result.Documents[0].ToString()); + if (tryGetPage.Failed == true) + { + string errorRecieved = tryGetPage.Exception.InnerException.Message; + Assert.AreEqual(goneException.GetType(), tryGetPage.Exception.InnerException.GetType()); - if (tryGetPage.Result.State == null) + if (errorRecieved.Equals(goneExceptionMessage)) { + caughtGoneException = true; break; } - else - { - queryPipelineStages[i] = queryPipelineStages[i].Equals(optimisticDirectExecutionQueryPipelineStage) - ? await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: tryGetPage.Result.State.Value) - : await CreateParallelCrossPartitionPipelineStateAsync(inMemoryCollection, query, continuationToken: tryGetPage.Result.State.Value); - } } - } - - documentCountOptimisticPipeline = documentPipelinesCount[0]; - documentCountParallelPipeline = documentPipelinesCount[1]; - int countDifference = documentCountParallelPipeline - documentCountOptimisticPipeline; - - Assert.AreNotEqual(documentCountOptimisticPipeline, documentCountParallelPipeline, countDifference.ToString()); - Assert.AreEqual(documentCountOptimisticPipeline, 17); - Assert.AreEqual(documentCountParallelPipeline, 100); - Assert.AreEqual(countDifference, 83); - Assert.AreEqual(documentCountParallelPipeline, numItems); - } - - private static async Task CreateOptimisticDirectExecutionPipelineStateAsync(IDocumentContainer documentContainer, string query, CosmosElement continuationToken) - { - List targetRanges = await documentContainer.GetFeedRangesAsync( - trace: NoOpTrace.Singleton, - cancellationToken: default); - FeedRangeEpk firstRange = targetRanges[0]; - - TryCatch monadicQueryPipelineStage = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( - documentContainer: documentContainer, - sqlQuerySpec: new SqlQuerySpec(query), - targetRange: firstRange, - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), - partitionKey: null, - cancellationToken: default, - continuationToken: continuationToken); - - Assert.IsTrue(monadicQueryPipelineStage.Succeeded); - IQueryPipelineStage queryPipelineStage = monadicQueryPipelineStage.Result; - - return queryPipelineStage; - } - private static async Task CreateParallelCrossPartitionPipelineStateAsync(IDocumentContainer documentContainer, string query, CosmosElement continuationToken) - { - List targetRanges = await documentContainer.GetFeedRangesAsync( - trace: NoOpTrace.Singleton, - cancellationToken: default); - - TryCatch monadicQueryPipelineStage = ParallelCrossPartitionQueryPipelineStage.MonadicCreate( - documentContainer: documentContainer, - sqlQuerySpec: new SqlQuerySpec(query), - targetRanges: targetRanges, - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), - partitionKey: null, - maxConcurrency: 10, - prefetchPolicy: PrefetchPolicy.PrefetchSinglePage, - cancellationToken: default, - continuationToken: continuationToken); + documents.AddRange(tryGetPage.Result.Documents); + } - Assert.IsTrue(monadicQueryPipelineStage.Succeeded); - IQueryPipelineStage queryPipelineStage = monadicQueryPipelineStage.Result; + // Once fallback plan is implemented, this test should be able to return all 100 documents + Assert.AreEqual(10, documents.Count); + Assert.IsTrue(caughtGoneException); - return queryPipelineStage; + return true; } - private static async Task CreateDocumentContainerAsync( + private static async Task CreateDocumentContainerAsync( int numItems, + bool multiPartition, FlakyDocumentContainer.FailureConfigs failureConfigs = null) { PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition() @@ -265,107 +334,59 @@ private static async Task CreateDocumentContainerAsync( DocumentContainer documentContainer = new DocumentContainer(monadicDocumentContainer); - for (int i = 0; i < 3; i++) + // a value of 2 would lead to 4 partitions (2 * 2). 4 partitions are used because they're easy to manage + demonstrates multi partition use case + int exponentPartitionKeyRanges = 2; + + IReadOnlyList ranges; + + for (int i = 0; i < exponentPartitionKeyRanges; i++) { - IReadOnlyList ranges = await documentContainer.GetFeedRangesAsync( + ranges = await documentContainer.GetFeedRangesAsync( trace: NoOpTrace.Singleton, cancellationToken: default); - foreach (FeedRangeInternal range in ranges) + + if (multiPartition) { - await documentContainer.SplitAsync(range, cancellationToken: default); + foreach (FeedRangeInternal range in ranges) + { + await documentContainer.SplitAsync(range, cancellationToken: default); + } } await documentContainer.RefreshProviderAsync(NoOpTrace.Singleton, cancellationToken: default); } + ranges = await documentContainer.GetFeedRangesAsync( + trace: NoOpTrace.Singleton, + cancellationToken: default); + + int rangeCount = multiPartition ? 4 : 1; + + Assert.AreEqual(rangeCount, ranges.Count); + for (int i = 0; i < numItems; i++) { // Insert an item CosmosObject item = CosmosObject.Parse($"{{\"pk\" : {i} }}"); - while (true) - { - TryCatch monadicCreateRecord = await documentContainer.MonadicCreateItemAsync(item, cancellationToken: default); - if (monadicCreateRecord.Succeeded) - { - break; - } - } + TryCatch monadicCreateRecord = await documentContainer.MonadicCreateItemAsync(item, cancellationToken: default); + Assert.IsTrue(monadicCreateRecord.Succeeded); } return documentContainer; } - [TestMethod] - [Owner("akotalwar")] - public void PositiveOptimisticDirectExecutionOutput() - { - List testVariations = new List - { - CreateInput( - @"Partition Key + Value and Distinct", - "SELECT DISTINCT c.key FROM c", - true, - @"/pk", - @"/value"), - - CreateInput( - @"Partition Key + Value and Min Aggregate", - "SELECT VALUE MIN(c.key) FROM c", - true, - @"/pk", - @"/value"), - - CreateInput( - @"Partition Key + Value Fields", - "SELECT c.key FROM c", - true, - @"/pk", - @"/value"), - }; - this.ExecuteTestSuite(testVariations); - } - - [TestMethod] - [Owner("akotalwar")] - public void NegativeOptimisticDirectExecutionOutput() - { - List testVariations = new List - { - CreateInput( - @"Null Partition Key Value", - "SELECT * FROM c", - false, - @"/pk", - Cosmos.PartitionKey.Null), - - CreateInput( - @"None Partition Key Value", - "SELECT * FROM c", - false, - @"/pk", - Cosmos.PartitionKey.None), - - CreateInput( - @"C# Null Partition Key Value", - "SELECT * FROM c", - false, - @"/pk", - null), - }; - this.ExecuteTestSuite(testVariations); - } - private static OptimisticDirectExecutionTestInput CreateInput( string description, string query, bool expectedOptimisticDirectExecution, string partitionKeyPath, - string partitionKeyValue) + string partitionKeyValue, + CosmosElement continuationToken = null) { PartitionKeyBuilder pkBuilder = new PartitionKeyBuilder(); pkBuilder.Add(partitionKeyValue); - return CreateInput(description, query, expectedOptimisticDirectExecution, partitionKeyPath, pkBuilder.Build()); + return CreateInput(description, query, expectedOptimisticDirectExecution, partitionKeyPath, pkBuilder.Build(), continuationToken); } private static OptimisticDirectExecutionTestInput CreateInput( @@ -373,18 +394,19 @@ private static OptimisticDirectExecutionTestInput CreateInput( string query, bool expectedOptimisticDirectExecution, string partitionKeyPath, - Cosmos.PartitionKey partitionKeyValue) + Cosmos.PartitionKey partitionKeyValue, + CosmosElement continuationToken = null) { - return new OptimisticDirectExecutionTestInput(description, query, new SqlQuerySpec(query), expectedOptimisticDirectExecution, partitionKeyPath, partitionKeyValue); + return new OptimisticDirectExecutionTestInput(description, query, new SqlQuerySpec(query), expectedOptimisticDirectExecution, partitionKeyPath, partitionKeyValue, continuationToken); } - + private static PartitionedQueryExecutionInfo GetPartitionedQueryExecutionInfo(string querySpecJsonString, PartitionKeyDefinition pkDefinition) { TryCatch tryGetQueryPlan = QueryPartitionProviderTestInstance.Object.TryGetPartitionedQueryExecutionInfo( querySpecJsonString: querySpecJsonString, partitionKeyDefinition: pkDefinition, requireFormattableOrderByQuery: true, - isContinuationExpected: false, + isContinuationExpected: true, allowNonValueAggregateQuery: true, hasLogicalPartitionKey: false, allowDCount: true, @@ -404,14 +426,14 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect // gets query context string databaseId = "db1234"; - string resourceLink = string.Format("dbs/{0}/colls", databaseId); + string resourceLink = $"dbs/{databaseId}/colls"; CosmosQueryContextCore cosmosQueryContextCore = new CosmosQueryContextCore( client: new TestCosmosQueryClient(), resourceTypeEnum: Documents.ResourceType.Document, operationType: Documents.OperationType.Query, resourceType: typeof(QueryResponseCore), resourceLink: resourceLink, - isContinuationExpected: false, + isContinuationExpected: true, allowNonValueAggregateQuery: true, useSystemPrefix: false, correlatedActivityId: Guid.NewGuid()); @@ -419,7 +441,6 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect // gets input parameters QueryRequestOptions queryRequestOptions = new QueryRequestOptions { - MaxBufferedItemCount = 7000, TestSettings = new TestInjections(simulate429s: true, simulateEmptyPages: false, enableOptimisticDirectExecution: true, new TestInjections.ResponseStats()) }; @@ -435,7 +456,7 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect CosmosQueryExecutionContextFactory.InputParameters inputParameters = new CosmosQueryExecutionContextFactory.InputParameters( sqlQuerySpec: sqlQuerySpec, - initialUserContinuationToken: null, + initialUserContinuationToken: input.ContinuationToken, initialFeedRange: null, maxConcurrency: queryRequestOptions.MaxConcurrency, maxItemCount: queryRequestOptions.MaxItemCount, @@ -447,25 +468,27 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect returnResultsInDeterministicOrder: null, forcePassthrough: true, testInjections: queryRequestOptions.TestSettings); - + IQueryPipelineStage queryPipelineStage = CosmosQueryExecutionContextFactory.Create( documentContainer, cosmosQueryContextCore, inputParameters, NoOpTrace.Singleton); + bool result = queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton).Result; if (input.ExpectedOptimisticDirectExecution) { Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); } - else { + else + { Assert.AreNotEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); } - + Assert.IsNotNull(queryPipelineStage); Assert.IsTrue(result); - + return new OptimisticDirectExecutionTestOutput(input.ExpectedOptimisticDirectExecution); } } @@ -495,6 +518,7 @@ public sealed class OptimisticDirectExecutionTestInput : BaselineTestInput internal bool ExpectedOptimisticDirectExecution { get; set; } internal PartitionKeyRangeIdentity PartitionKeyRangeId { get; set; } internal string Query { get; set; } + internal CosmosElement ContinuationToken { get; set; } internal OptimisticDirectExecutionTestInput( string description, @@ -502,7 +526,8 @@ internal OptimisticDirectExecutionTestInput( SqlQuerySpec sqlQuerySpec, bool expectedOptimisticDirectExecution, string partitionKeyPath, - Cosmos.PartitionKey partitionKeyValue) + Cosmos.PartitionKey partitionKeyValue, + CosmosElement continuationToken) : base(description) { this.PartitionKeyDefinition = new PartitionKeyDefinition() @@ -518,6 +543,7 @@ internal OptimisticDirectExecutionTestInput( this.ExpectedOptimisticDirectExecution = expectedOptimisticDirectExecution; this.Query = query; this.PartitionKeyValue = partitionKeyValue; + this.ContinuationToken = continuationToken; } public override void SerializeAsXml(XmlWriter xmlWriter) @@ -533,7 +559,7 @@ public override void SerializeAsXml(XmlWriter xmlWriter) } } - xmlWriter.WriteEndElement(); + xmlWriter.WriteEndElement(); if (this.PartitionKeyDefinition != null) { xmlWriter.WriteElementString( @@ -596,8 +622,8 @@ public override Task> GetTargetPartitionKeyRangesAsync(s { return Task.FromResult(new List{new PartitionKeyRange() { - MinInclusive = PartitionKeyHash.V2.Hash("abc").ToString(), - MaxExclusive = PartitionKeyHash.V2.Hash("def").ToString() + MinInclusive = PartitionKeyInternal.MinimumInclusiveEffectivePartitionKey, + MaxExclusive = PartitionKeyInternal.MaximumExclusiveEffectivePartitionKey } }); } From 2681be80b9674fc8a09f1a7552894ef8741b23e2 Mon Sep 17 00:00:00 2001 From: Nalu Tripician Date: Fri, 18 Nov 2022 11:06:27 -0500 Subject: [PATCH 018/164] Client Retry Policy: Adds HTTP timeouts with request-level cross-region retry (#3555) * Fixes to ReadThroughputAsync for databases with no provisioned throughput and null as request options * fixed failure to ReadReplaceThroughputResponseTests * Added Stream Method * Ran UpdateContract.ps1 * Encryption implemtation * Fixed spelling error * Update Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabase.cs Co-authored-by: Matias Quaranta * Variable name change * Update Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs Co-authored-by: Matias Quaranta * Suggested Changes and fixes * Removed manufactured ResponseMessage + nits * Simplified PR * nits * nits * initial changes TODO: Update tests * updated tests * nits' * Ran UpdateContracts.ps1 * nits + requested changes * Delete NuGet.Config * Update Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs Co-authored-by: Matias Quaranta * Update Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs Co-authored-by: Matias Quaranta * Update Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs Co-authored-by: Matias Quaranta * Update Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs Co-authored-by: Matias Quaranta * Use Cosmos Exception Factory, Simplified Tests * removed unused code * nits: removed unused code * removed unused code Co-authored-by: Matias Quaranta Co-authored-by: Nalu Tripician --- .../src/HttpClient/CosmosHttpClientCore.cs | 13 ++++ .../src/HttpClient/HttpTimeoutPolicy.cs | 26 +++++++- .../HttpTimeoutPolicyControlPlaneRead.cs | 2 + ...meoutPolicyControlPlaneRetriableHotPath.cs | 9 ++- .../HttpClient/HttpTimeoutPolicyDefault.cs | 9 ++- .../CosmosExceptionFactory.cs | 18 ++++++ .../CosmosHttpClientCoreTests.cs | 63 ++++++++++++++++++- .../GatewayAccountReaderTests.cs | 2 +- .../GatewayStoreModelTest.cs | 2 +- 9 files changed, 136 insertions(+), 8 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs index fa8463e64b..f86bd6b183 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs @@ -296,6 +296,19 @@ private async Task SendHttpHelperAsync( string message = $"GatewayStoreClient Request Timeout. Start Time UTC:{startDateTimeUtc}; Total Duration:{(DateTime.UtcNow - startDateTimeUtc).TotalMilliseconds} Ms; Request Timeout {requestTimeout.TotalMilliseconds} Ms; Http Client Timeout:{this.httpClient.Timeout.TotalMilliseconds} Ms; Activity id: {System.Diagnostics.Trace.CorrelationManager.ActivityId};"; e.Data.Add("Message", message); + + if (timeoutPolicy.ShouldThrow503OnTimeout) + { + throw CosmosExceptionFactory.CreateServiceUnavailableException( + message: message, + headers: new Headers() + { + ActivityId = System.Diagnostics.Trace.CorrelationManager.ActivityId.ToString(), + SubStatusCode = SubStatusCodes.TransportGenerated503 + }, + innerException: e); + } + throw; } diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs index 413205cdba..a3fc51dd91 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs @@ -18,21 +18,45 @@ internal abstract class HttpTimeoutPolicy public abstract bool ShouldRetryBasedOnResponse(HttpMethod requestHttpMethod, HttpResponseMessage responseMessage); + public virtual bool ShouldThrow503OnTimeout => false; + public static HttpTimeoutPolicy GetTimeoutPolicy( DocumentServiceRequest documentServiceRequest) { + //Query Plan Requests if (documentServiceRequest.ResourceType == ResourceType.Document && documentServiceRequest.OperationType == OperationType.QueryPlan) { - return HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance; + return HttpTimeoutPolicyControlPlaneRetriableHotPath.InstanceShouldThrow503OnTimeout; } + //Partition Key Requests if (documentServiceRequest.ResourceType == ResourceType.PartitionKeyRange) { return HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance; } + //Data Plane Read & Write + if (!HttpTimeoutPolicy.IsMetaData(documentServiceRequest)) + { + return HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout; + } + + //Meta Data Read + if (HttpTimeoutPolicy.IsMetaData(documentServiceRequest) && documentServiceRequest.IsReadOnlyRequest) + { + return HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout; + } + + //Default behavior return HttpTimeoutPolicyDefault.Instance; } + + private static bool IsMetaData(DocumentServiceRequest request) + { + return (request.OperationType != Documents.OperationType.ExecuteJavaScript && request.ResourceType == ResourceType.StoredProcedure) || + request.ResourceType != ResourceType.Document; + + } } } diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs index 56c55901bb..757134a576 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs @@ -44,5 +44,7 @@ public override bool ShouldRetryBasedOnResponse(HttpMethod requestHttpMethod, Ht { return false; } + + public override bool ShouldThrow503OnTimeout => true; } } diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs index c8b8dbfb50..8dbb8a2a44 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs @@ -10,11 +10,14 @@ namespace Microsoft.Azure.Cosmos internal sealed class HttpTimeoutPolicyControlPlaneRetriableHotPath : HttpTimeoutPolicy { - public static readonly HttpTimeoutPolicy Instance = new HttpTimeoutPolicyControlPlaneRetriableHotPath(); + public static readonly HttpTimeoutPolicy Instance = new HttpTimeoutPolicyControlPlaneRetriableHotPath(false); + public static readonly HttpTimeoutPolicy InstanceShouldThrow503OnTimeout = new HttpTimeoutPolicyControlPlaneRetriableHotPath(true); + public bool shouldThrow503OnTimeout; private static readonly string Name = nameof(HttpTimeoutPolicyControlPlaneRetriableHotPath); - private HttpTimeoutPolicyControlPlaneRetriableHotPath() + private HttpTimeoutPolicyControlPlaneRetriableHotPath(bool shouldThrow503OnTimeout) { + this.shouldThrow503OnTimeout = shouldThrow503OnTimeout; } private readonly IReadOnlyList<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> TimeoutsAndDelays = new List<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)>() @@ -61,5 +64,7 @@ public override bool ShouldRetryBasedOnResponse(HttpMethod requestHttpMethod, Ht return true; } + + public override bool ShouldThrow503OnTimeout => this.shouldThrow503OnTimeout; } } diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs index 949afc0513..974509c70c 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs @@ -10,11 +10,14 @@ namespace Microsoft.Azure.Cosmos internal sealed class HttpTimeoutPolicyDefault : HttpTimeoutPolicy { - public static readonly HttpTimeoutPolicy Instance = new HttpTimeoutPolicyDefault(); + public static readonly HttpTimeoutPolicy Instance = new HttpTimeoutPolicyDefault(false); + public static readonly HttpTimeoutPolicy InstanceShouldThrow503OnTimeout = new HttpTimeoutPolicyDefault(true); + public bool shouldThrow503OnTimeout; private static readonly string Name = nameof(HttpTimeoutPolicyDefault); - private HttpTimeoutPolicyDefault() + private HttpTimeoutPolicyDefault(bool shouldThrow503OnTimeout) { + this.shouldThrow503OnTimeout = shouldThrow503OnTimeout; } private readonly IReadOnlyList<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> TimeoutsAndDelays = new List<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)>() @@ -46,5 +49,7 @@ public override bool ShouldRetryBasedOnResponse(HttpMethod requestHttpMethod, Ht { return false; } + + public override bool ShouldThrow503OnTimeout => this.shouldThrow503OnTimeout; } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosExceptionFactory.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosExceptionFactory.cs index fff41258b2..0648aecbc3 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosExceptionFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosExceptionFactory.cs @@ -283,6 +283,24 @@ internal static CosmosException CreateBadRequestException( innerException); } + internal static CosmosException CreateServiceUnavailableException( + string message, + Headers headers, + string stackTrace = default, + ITrace trace = default, + Error error = default, + Exception innerException = default) + { + return CosmosExceptionFactory.Create( + HttpStatusCode.ServiceUnavailable, + message, + stackTrace, + headers, + trace, + error, + innerException); + } + internal static CosmosException CreateUnauthorizedException( string message, Headers headers, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs index 00d156e8b7..67c653498b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs @@ -259,6 +259,67 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio Assert.AreEqual(3, count, "Should retry 3 times"); } + [TestMethod] + public async Task HttpTimeoutThrow503TestAsync() + { + + async Task TestScenarioAsync(HttpMethod method, ResourceType resourceType, HttpTimeoutPolicy timeoutPolicy, Type expectedException, int expectedNumberOfRetrys) + { + int count = 0; + async Task sendFunc(HttpRequestMessage request, CancellationToken cancellationToken) + { + count++; + + throw new OperationCanceledException("API with exception"); + + } + + DocumentClientEventSource eventSource = DocumentClientEventSource.Instance; + HttpMessageHandler messageHandler = new MockMessageHandler(sendFunc); + using CosmosHttpClient cosmoshttpClient = MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler)); + + try + { + + HttpResponseMessage responseMessage1 = await cosmoshttpClient.SendHttpAsync(() => + new ValueTask( + result: new HttpRequestMessage(method, new Uri("http://localhost"))), + resourceType: resourceType, + timeoutPolicy: timeoutPolicy, + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + cancellationToken: default); + } + catch (Exception e) + { + Assert.AreEqual(expectedNumberOfRetrys, count, "Should retry 3 times for read methods, for writes should only be tried once"); + Assert.AreEqual(e.GetType(), expectedException); + + if (e.GetType() == typeof(CosmosException)) + { + CosmosException cosmosException = (CosmosException)e; + Assert.AreEqual(cosmosException.StatusCode, System.Net.HttpStatusCode.ServiceUnavailable); + Assert.AreEqual((int)cosmosException.SubStatusCode,(int)SubStatusCodes.TransportGenerated503); + } + } + + } + + //Data plane read + await TestScenarioAsync(HttpMethod.Get, ResourceType.Document, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 3); + + //Data plane write + await TestScenarioAsync(HttpMethod.Post, ResourceType.Document, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 1); + + //Meta data read + await TestScenarioAsync(HttpMethod.Get, ResourceType.Database, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 3); + + //Query plan read (note all query plan operations are reads). + await TestScenarioAsync(HttpMethod.Get, ResourceType.Document, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 3); + + //Metadata Write (Should throw a 408 OperationCanceledException rather than a 503) + await TestScenarioAsync(HttpMethod.Post, ResourceType.Document, HttpTimeoutPolicyDefault.Instance, typeof(TaskCanceledException), 1); + } + [TestMethod] public async Task NoRetryOnNoRetryPolicyTestAsync() { @@ -309,7 +370,7 @@ public async Task RetryTransientIssuesForQueryPlanTestAsync() new Documents.Collections.RequestNameValueCollection()); HttpTimeoutPolicy retryPolicy = HttpTimeoutPolicy.GetTimeoutPolicy(documentServiceRequest); - Assert.AreEqual(HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance, retryPolicy); + Assert.AreEqual(HttpTimeoutPolicyControlPlaneRetriableHotPath.InstanceShouldThrow503OnTimeout, retryPolicy); int count = 0; IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> retry = retryPolicy.GetTimeoutEnumerator(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs index e1cfeb5f40..2fc8359f68 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs @@ -61,7 +61,7 @@ public async Task DocumentClient_BuildHttpClientFactory_WithHandler() uri: new Uri("https://localhost"), additionalHeaders: new RequestNameValueCollection(), resourceType: ResourceType.Document, - timeoutPolicy: HttpTimeoutPolicyDefault.Instance, + timeoutPolicy: HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), cancellationToken: default); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs index fe4287484c..43078d1866 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs @@ -808,7 +808,7 @@ public async Task GatewayStatsDurationTest() await cosmosHttpClient.SendHttpAsync(() => new ValueTask(new HttpRequestMessage(HttpMethod.Get, "http://someuri.com")), ResourceType.Document, - HttpTimeoutPolicyDefault.Instance, + HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, clientSideRequestStatistics, CancellationToken.None); From 010e4ba7198b62cb13b680baf4f6b2d6f9538cef Mon Sep 17 00:00:00 2001 From: Pramod Valavala <43602528+PramodValavala-MSFT@users.noreply.github.com> Date: Mon, 21 Nov 2022 17:56:48 -0500 Subject: [PATCH 019/164] Documentation: Fixes EUAP in Comments (#3579) --- Microsoft.Azure.Cosmos/src/Regions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Regions.cs b/Microsoft.Azure.Cosmos/src/Regions.cs index 64729bd21a..f08bbf4c91 100644 --- a/Microsoft.Azure.Cosmos/src/Regions.cs +++ b/Microsoft.Azure.Cosmos/src/Regions.cs @@ -186,12 +186,12 @@ public static class Regions public const string USGovVirginia = "USGov Virginia"; /// - /// Name of the Azure East US 2 EUAP region in the Azure Cosmos DB service. + /// Name of the Azure East US 2 Early Updates Access Program (EUAP) region in the Azure Cosmos DB service. /// public const string EastUS2EUAP = "East US 2 EUAP"; /// - /// Name of the Azure Central US EUAP region in the Azure Cosmos DB service. + /// Name of the Azure Central US Early Updates Access Program (EUAP) region in the Azure Cosmos DB service. /// public const string CentralUSEUAP = "Central US EUAP"; From b24eeb96babef246d8deb2305e08accb7ceffc7d Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Wed, 23 Nov 2022 10:28:19 -0800 Subject: [PATCH 020/164] Query: Fixes incorrect FeedResponse.Count when result contains undefined elements (#3574) * Do not maintain an independent count on QueryResponse that can go out of sync * Add more test coverage for QueryResponse.Count * Output the correct count from CosmosElementSerializer when the input contains CosmosUndefined * Add untyped tests for CosmosUndefined * Remove commented code --- .../src/Query/v3Query/QueryResponse.cs | 8 +-- .../src/Serializer/CosmosElementSerializer.cs | 7 +- .../Query/CosmosUndefinedQueryTests.cs | 65 +++++++++++++++++++ .../Query/QueryTestsBase.cs | 24 +++++++ 4 files changed, 98 insertions(+), 6 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryResponse.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryResponse.cs index e9d0b5856b..6c7777ebff 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryResponse.cs @@ -163,6 +163,7 @@ class QueryResponse : FeedResponse { private readonly CosmosSerializerCore serializerCore; private readonly CosmosSerializationFormatOptions serializationOptions; + private readonly IReadOnlyList resource; private QueryResponse( HttpStatusCode httpStatusCode, @@ -178,8 +179,7 @@ private QueryResponse( this.serializerCore = serializerCore; this.serializationOptions = serializationOptions; this.StatusCode = httpStatusCode; - this.Count = cosmosElements.Count; - this.Resource = CosmosElementSerializer.GetResources( + this.resource = CosmosElementSerializer.GetResources( cosmosArray: cosmosElements, serializerCore: serializerCore); @@ -197,7 +197,7 @@ private QueryResponse( public override CosmosDiagnostics Diagnostics { get; } - public override int Count { get; } + public override int Count => this.resource.Count; internal CosmosQueryResponseMessageHeaders QueryHeaders { get; } @@ -210,7 +210,7 @@ public override IEnumerator GetEnumerator() return this.Resource.GetEnumerator(); } - public override IEnumerable Resource { get; } + public override IEnumerable Resource => this.resource; internal override RequestMessage RequestMessage { get; } diff --git a/Microsoft.Azure.Cosmos/src/Serializer/CosmosElementSerializer.cs b/Microsoft.Azure.Cosmos/src/Serializer/CosmosElementSerializer.cs index 1c4cb96a24..0564727b0c 100644 --- a/Microsoft.Azure.Cosmos/src/Serializer/CosmosElementSerializer.cs +++ b/Microsoft.Azure.Cosmos/src/Serializer/CosmosElementSerializer.cs @@ -74,8 +74,11 @@ internal static MemoryStream ToStream( jsonWriter.WriteArrayStart(); foreach (CosmosElement element in cosmosElements) { - count++; - element.WriteTo(jsonWriter); + if (element is not CosmosUndefined) + { + count++; + element.WriteTo(jsonWriter); + } } jsonWriter.WriteArrayEnd(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs index 42cb70fe16..3945169330 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs @@ -5,6 +5,7 @@ namespace Microsoft.Azure.Cosmos.EmulatorTests.Query using System.Collections.ObjectModel; using System.Linq; using System.Threading.Tasks; + using Azure; using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.CosmosElements.Numbers; using Microsoft.Azure.Cosmos.Json; @@ -50,6 +51,70 @@ private static async Task RunTests(Container container, IReadOnlyList results = RunSimpleQueryAsync( + container, + testCase.Query, + new QueryRequestOptions { MaxItemCount = pageSize }); + + long actualCount = 0; + await foreach (ResponseMessage responseMessage in results) + { + Assert.IsTrue(responseMessage.IsSuccessStatusCode); + + string content = responseMessage.Content.ReadAsString(); + IJsonNavigator navigator = JsonNavigator.Create(System.Text.Encoding.UTF8.GetBytes(content)); + IJsonNavigatorNode rootNode = navigator.GetRootNode(); + Assert.IsTrue(navigator.TryGetObjectProperty(rootNode, "_count", out ObjectProperty countProperty)); + + long count = Number64.ToLong(navigator.GetNumber64Value(countProperty.ValueNode)); + actualCount += count; + + Assert.IsTrue(navigator.TryGetObjectProperty(rootNode, "Documents", out ObjectProperty documentsProperty)); + int documentCount = navigator.GetArrayItemCount(documentsProperty.ValueNode); + Assert.AreEqual(count, documentCount); + + for (int index= 0; index < documentCount; ++index) + { + IJsonNavigatorNode documentNode = navigator.GetArrayItemAt(documentsProperty.ValueNode, index); + int propertyCount = navigator.GetObjectPropertyCount(documentNode); + Assert.AreEqual(0, propertyCount); + } + } + + Assert.AreEqual(testCase.ExpectedResultCount, actualCount); + } + } } private static async Task OrderByTests(Container container) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs index 269e8448bd..4775716efa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs @@ -645,6 +645,7 @@ internal static async Task> QueryWithContinuationTokensAsync( } List resultsFromContinuationToken = new List(); + int resultCount = 0; string continuationToken = null; do { @@ -668,6 +669,7 @@ internal static async Task> QueryWithContinuationTokensAsync( } resultsFromContinuationToken.AddRange(cosmosQueryResponse); + resultCount += cosmosQueryResponse.Count; continuationToken = cosmosQueryResponse.ContinuationToken; break; } @@ -687,6 +689,7 @@ internal static async Task> QueryWithContinuationTokensAsync( } } while (continuationToken != null); + Assert.AreEqual(resultsFromContinuationToken.Count, resultCount); return resultsFromContinuationToken; } @@ -700,6 +703,7 @@ internal static async Task> QueryWithoutContinuationTokensAsync( queryRequestOptions = new QueryRequestOptions(); } + int resultCount = 0; List results = new List(); FeedIterator itemQuery = container.GetItemQueryIterator( queryText: query, @@ -713,6 +717,7 @@ internal static async Task> QueryWithoutContinuationTokensAsync( { FeedResponse page = await itemQuery.ReadNextAsync(); results.AddRange(page); + resultCount += page.Count; if (queryRequestOptions.MaxItemCount.HasValue) { @@ -746,6 +751,7 @@ internal static async Task> QueryWithoutContinuationTokensAsync( { // The query failed and we don't have a save point, so just restart the whole thing. results = new List(); + resultCount = 0; } } } @@ -755,6 +761,7 @@ internal static async Task> QueryWithoutContinuationTokensAsync( itemQuery.Dispose(); } + Assert.AreEqual(results.Count, resultCount); return results; } @@ -907,6 +914,23 @@ internal static async IAsyncEnumerable> RunSimpleQueryWithNewIte } } + internal static async IAsyncEnumerable RunSimpleQueryAsync( + Container container, + string query, + QueryRequestOptions requestOptions = null) + { + using FeedIterator resultSetIterator = container.GetItemQueryStreamIterator( + query, + null, + requestOptions: requestOptions); + + while (resultSetIterator.HasMoreResults) + { + ResponseMessage response = await resultSetIterator.ReadNextAsync(); + yield return response; + } + } + internal async Task> RunSinglePartitionQuery( Container container, string query, From 9734ec5ed0d462aff0b312aee8999ffe3968fb68 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 24 Nov 2022 07:36:37 +0530 Subject: [PATCH 021/164] removed allr eference (#3581) Co-authored-by: Sourabh Jain --- .../OpenTelemetry/CosmosDbEventSource.cs | 17 +++------- .../DistributedTracingOptions.cs | 34 +------------------ ...riterBaselineTests.BulkOperationsAsync.xml | 2 +- ...neTests.PointOperationsExceptionsAsync.xml | 2 +- .../EndToEndTraceWriterBaselineTests.cs | 10 +++--- .../CosmosClientOptionsUnitTests.cs | 19 ----------- 6 files changed, 13 insertions(+), 71 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs index f0ac635d81..6700697914 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs @@ -31,19 +31,12 @@ public static void RecordDiagnosticsForRequests( Documents.OperationType operationType, OpenTelemetryAttributes response) { - if (config.EnableDiagnosticsTraceForAllRequests) + if (DiagnosticsFilterHelper.IsTracingNeeded( + config: config, + operationType: operationType, + response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning)) { - CosmosDbEventSource.Singleton.WriteInfoEvent(response.Diagnostics.ToString()); - } - else - { - if (DiagnosticsFilterHelper.IsTracingNeeded( - config: config, - operationType: operationType, - response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning)) - { - CosmosDbEventSource.Singleton.WriteWarningEvent(response.Diagnostics.ToString()); - } + CosmosDbEventSource.Singleton.WriteWarningEvent(response.Diagnostics.ToString()); } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs index 078a554980..652b6b9e3f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs @@ -21,43 +21,11 @@ internal sealed class DistributedTracingOptions /// Default Latency threshold for QUERY operation /// internal static readonly TimeSpan DefaultQueryTimeoutThreshold = TimeSpan.FromMilliseconds(500); - private bool enableDiagnosticsTraceForAllRequests; - private TimeSpan? diagnosticsLatencyThreshold; /// /// Latency Threshold to generate () with Request diagnostics in distributing Tracing.

/// If it is not set then by default it will generate () for query operation which are taking more than 500 ms and non-query operations taking more than 100 ms. ///
- public TimeSpan? DiagnosticsLatencyThreshold - { - get => this.diagnosticsLatencyThreshold; - set - { - if (this.EnableDiagnosticsTraceForAllRequests) - { - throw new ArgumentException("EnableDiagnosticsTraceForAllRequests can not be true along with DiagnosticsLatencyThreshold."); - } - - this.diagnosticsLatencyThreshold = value; - } - } - - /// - /// Set this flag as true if you want to generate () containing request diagnostics string for all the operations. - /// If this flag is true then, it won't honour value to generate diagnostic traces. - /// - public bool EnableDiagnosticsTraceForAllRequests - { - get => this.enableDiagnosticsTraceForAllRequests; - set - { - if (value && this.DiagnosticsLatencyThreshold != null) - { - throw new ArgumentException("EnableDiagnosticsTraceForAllRequests can not be true along with DiagnosticsLatencyThreshold."); - } - - this.enableDiagnosticsTraceForAllRequests = value; - } - } + public TimeSpan? DiagnosticsLatencyThreshold { get; set; } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index a31ad6433d..3eb9468e57 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -1602,7 +1602,7 @@ throttleClient.ClientOptions.EnableDistributedTracing = true; throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; ItemRequestOptions requestOptions = new ItemRequestOptions(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 019adb993e..d074dbb221 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -175,7 +175,7 @@ throttleClient.ClientOptions.EnableDistributedTracing = true; throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; ItemRequestOptions requestOptions = new ItemRequestOptions(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index aea21c9655..f64d289cfe 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -57,17 +57,17 @@ public static async Task ClassInitAsync(TestContext context) client.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; bulkClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; miscCosmosClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; EndToEndTraceWriterBaselineTests.database = await client.CreateDatabaseAsync( @@ -984,7 +984,7 @@ public async Task PointOperationsExceptionsAsync() throttleClient.ClientOptions.EnableDistributedTracing = true; throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; ItemRequestOptions requestOptions = new ItemRequestOptions(); @@ -1271,7 +1271,7 @@ public async Task BulkOperationsAsync() throttleClient.ClientOptions.EnableDistributedTracing = true; throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() { - EnableDiagnosticsTraceForAllRequests = true + DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) }; ItemRequestOptions requestOptions = new ItemRequestOptions(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs index 6078570d96..e39bb8d0f3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs @@ -186,25 +186,6 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.AreEqual(portReuseMode, policy.PortReuseMode); Assert.IsTrue(policy.EnableTcpConnectionEndpointRediscovery); CollectionAssert.AreEqual(preferredLocations.ToArray(), policy.PreferredLocations.ToArray()); - - // Verify DiagnosticsLatencyThreshold - cosmosClientBuilder = new CosmosClientBuilder( - accountEndpoint: endpoint, - authKeyOrResourceToken: key); - var exception = Assert.ThrowsException(() => cosmosClientBuilder.WithConnectionModeDirect( - idleTcpConnectionTimeout, - openTcpConnectionTimeout, - maxRequestsPerTcpConnection, - maxTcpConnectionsPerEndpoint, - portReuseMode, - enableTcpConnectionEndpointRediscovery) - .WithApplicationPreferredRegions(preferredLocations) - .WithDistributingTracing(new DistributedTracingOptions - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(100), - EnableDiagnosticsTraceForAllRequests = true - })); - Assert.AreEqual("EnableDiagnosticsTraceForAllRequests can not be true along with DiagnosticsLatencyThreshold.", exception.Message); } [TestMethod] From 6632168410079b849aa5d6f31f9bdd6f1ef52da1 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Wed, 23 Nov 2022 18:11:55 -0800 Subject: [PATCH 022/164] Trace: Fixes Tracing/diagnostics hour-times to 24Hours (#3577) * Trace: Fixes Tracing/diagnostics hour-times to 24Hours * fixing baseline tests Co-authored-by: Matias Quaranta --- .../Tracing/TraceWriter.TraceJsonWriter.cs | 2 +- .../Tracing/TraceWriter.TraceTextWriter.cs | 22 +- ...raceWriterBaselineTests.ScenariosAsync.xml | 482 +++++++++--------- ...TraceWriterBaselineTests.Serialization.xml | 54 +- .../TraceWriterBaselineTests.TraceData.xml | 54 +- 5 files changed, 308 insertions(+), 306 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs index a190f2e5e2..4710f00a2e 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs @@ -47,7 +47,7 @@ public static void WriteTrace( if (isRootTrace) { writer.WriteFieldName("start time"); - writer.WriteStringValue(trace.StartTime.ToString("hh:mm:ss:fff")); + writer.WriteStringValue(trace.StartTime.ToString(TraceWriter.HourTimeFormatString)); } writer.WriteFieldName("duration in milliseconds"); writer.WriteNumber64Value(trace.Duration.TotalMilliseconds); diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs index a55860655c..f77307b359 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs @@ -17,6 +17,8 @@ namespace Microsoft.Azure.Cosmos.Tracing internal static partial class TraceWriter { + internal static readonly string HourTimeFormatString = "HH:mm:ss:fff"; + private static class TraceTextWriter { private const string space = " "; @@ -97,8 +99,8 @@ private static class Headers private static class HeaderLengths { - public static readonly int StartTime = Math.Max(Headers.StartTime.Length, DateTime.MaxValue.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture).Length); - public static readonly int EndTime = Math.Max(Headers.EndTime.Length, DateTime.MaxValue.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture).Length); + public static readonly int StartTime = Math.Max(Headers.StartTime.Length, DateTime.MaxValue.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture).Length); + public static readonly int EndTime = Math.Max(Headers.EndTime.Length, DateTime.MaxValue.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture).Length); public static readonly int Endpoint = 80 - (StartTime + EndTime); } @@ -177,7 +179,7 @@ private static void WriteTraceRecursive( writer.Write("Component"); writer.Write(space); - writer.Write(trace.StartTime.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture)); + writer.Write(trace.StartTime.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture)); writer.Write(space); writer.Write(trace.Duration.TotalMilliseconds.ToString("0.00")); @@ -316,7 +318,7 @@ public void Visit(PointOperationStatisticsTraceDatum pointOperationStatisticsTra StringBuilder stringBuilder = new StringBuilder(); stringBuilder.AppendLine($"Activity ID: {pointOperationStatisticsTraceDatum.ActivityId ?? ""}"); stringBuilder.AppendLine($"Status Code: {pointOperationStatisticsTraceDatum.StatusCode}/{pointOperationStatisticsTraceDatum.SubStatusCode}"); - stringBuilder.AppendLine($"Response Time: {pointOperationStatisticsTraceDatum.ResponseTimeUtc.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture)}"); + stringBuilder.AppendLine($"Response Time: {pointOperationStatisticsTraceDatum.ResponseTimeUtc.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture)}"); stringBuilder.AppendLine($"Request Charge: {pointOperationStatisticsTraceDatum.RequestCharge}"); stringBuilder.AppendLine($"Request URI: {pointOperationStatisticsTraceDatum.RequestUri ?? ""}"); stringBuilder.AppendLine($"Session Tokens: {pointOperationStatisticsTraceDatum.RequestSessionToken ?? ""} / {pointOperationStatisticsTraceDatum.ResponseSessionToken ?? ""}"); @@ -331,10 +333,10 @@ public void Visit(PointOperationStatisticsTraceDatum pointOperationStatisticsTra public void Visit(ClientSideRequestStatisticsTraceDatum clientSideRequestStatisticsTraceDatum) { StringBuilder stringBuilder = new StringBuilder(); - stringBuilder.AppendLine($"Start Time: {clientSideRequestStatisticsTraceDatum.RequestStartTimeUtc.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture)}"); + stringBuilder.AppendLine($"Start Time: {clientSideRequestStatisticsTraceDatum.RequestStartTimeUtc.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture)}"); if (clientSideRequestStatisticsTraceDatum.RequestEndTimeUtc.HasValue) { - stringBuilder.AppendLine($"End Time: {clientSideRequestStatisticsTraceDatum.RequestEndTimeUtc.Value.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture)}"); + stringBuilder.AppendLine($"End Time: {clientSideRequestStatisticsTraceDatum.RequestEndTimeUtc.Value.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture)}"); } stringBuilder.AppendLine("Contacted Replicas"); @@ -378,8 +380,8 @@ public void Visit(ClientSideRequestStatisticsTraceDatum clientSideRequestStatist foreach (KeyValuePair stat in clientSideRequestStatisticsTraceDatum.EndpointToAddressResolutionStatistics) { string row = AddressResolutionStatisticsTextTable.Singleton.GetRow( - stat.Value.StartTime.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture), - stat.Value.EndTime.HasValue ? stat.Value.EndTime.Value.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture) : "NO END TIME", + stat.Value.StartTime.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture), + stat.Value.EndTime.HasValue ? stat.Value.EndTime.Value.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture) : "NO END TIME", stat.Value.TargetEndpoint); stringBuilder.AppendLine(row); } @@ -391,14 +393,14 @@ public void Visit(ClientSideRequestStatisticsTraceDatum clientSideRequestStatist { if (stat.RequestStartTime.HasValue) { - stringBuilder.AppendLine($"{space}Start Time: {stat.RequestStartTime.Value.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture)}"); + stringBuilder.AppendLine($"{space}Start Time: {stat.RequestStartTime.Value.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture)}"); } else { stringBuilder.AppendLine("{space}Start Time Not Found"); } - stringBuilder.AppendLine($"{space}End Time: {stat.RequestResponseTime.ToString("hh:mm:ss:fff", CultureInfo.InvariantCulture)}"); + stringBuilder.AppendLine($"{space}End Time: {stat.RequestResponseTime.ToString(TraceWriter.HourTimeFormatString, CultureInfo.InvariantCulture)}"); stringBuilder.AppendLine($"{space}Resource Type: {stat.RequestResourceType}"); stringBuilder.AppendLine($"{space}Operation Type: {stat.RequestOperationType}"); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml index 92d4a7344c..eecc33b72f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.ScenariosAsync.xml @@ -26,108 +26,108 @@ @@ -34,7 +34,7 @@ Status Code: 0/Unknown - Response Time: 12:00:00:000 + Response Time: 00:00:00:000 Request Charge: 0 Request URI: Session Tokens: / @@ -97,7 +97,7 @@ @@ -484,12 +484,12 @@ ┌────────────────┬──────────────┬──────────────────────────────────────────────────┐ │Start Time (utc)│End Time (utc)│Endpoint │ ├────────────────┼──────────────┼──────────────────────────────────────────────────┤ - │ 12:00:00:000│ NO END TIME│ │ - │ 12:00:00:000│ NO END TIME│ │ + │ 00:00:00:000│ NO END TIME│ │ + │ 00:00:00:000│ NO END TIME│ │ └────────────────┴──────────────┴──────────────────────────────────────────────────┘ Store Response Statistics {space}Start Time Not Found - End Time: 12:00:00:000 + End Time: 00:00:00:000 Resource Type: Database Operation Type: Create Store Result @@ -518,7 +518,7 @@ "RegionsContacted": 1 }, "name": "Trace For Baseline Testing", - "start time": "12:00:00:000", + "start time": "00:00:00:000", "duration in milliseconds": 0, "data": { "Client Side Request Stats Default": { @@ -662,11 +662,11 @@ Date: Sat, 26 Nov 2022 07:14:25 +0530 Subject: [PATCH 023/164] AI Integration: Adds cosmetic fixes (#3576) * wip * status code int and internal and client kind activity * remove unused imports * update baselines * fix test * fixed baseline tests * fix tests * update base tetss Co-authored-by: Sourabh Jain --- .../CosmosExceptions/CosmosException.cs | 4 +- .../OpenTelemetryAttributeKeys.cs | 2 +- .../OpenTelemetry/OpenTelemetryAttributes.cs | 5 +- .../OpenTelemetryCoreRecorder.cs | 18 +- .../OpenTelemetryRecorderFactory.cs | 3 +- .../OpenTelemetry/OpenTelemetryResponse.cs | 6 +- .../OpenTelemetry/OpenTelemetryResponse{T}.cs | 4 +- ...iterBaselineTests.BatchOperationsAsync.xml | 26 +- ...riterBaselineTests.BulkOperationsAsync.xml | 646 +++++----- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 830 ++++++------- ...eWriterBaselineTests.MiscellanousAsync.xml | 48 +- ...neTests.PointOperationsExceptionsAsync.xml | 240 ++-- ...EndTraceWriterBaselineTests.QueryAsync.xml | 1070 ++++++++--------- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 600 ++++----- ...TraceWriterBaselineTests.ReadManyAsync.xml | 304 ++--- ...selineTests.StreamPointOperationsAsync.xml | 72 +- ...aselineTests.TypedPointOperationsAsync.xml | 88 +- .../Tracing/OpenTelemetryListener.cs | 17 +- 18 files changed, 1984 insertions(+), 1999 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs index f6544e3545..12db379f0c 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs @@ -289,8 +289,8 @@ private string ToStringHelper( /// internal static void RecordOtelAttributes(CosmosException exception, DiagnosticScope scope) { - scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, exception.StatusCode); - scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, exception.SubStatusCode); + scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, (int)exception.StatusCode); + scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, (int)exception.SubStatusCode); scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, exception.RequestCharge); scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(exception.Diagnostics?.GetContactedRegions())); diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs index 033a8744b6..801824b791 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs @@ -19,7 +19,7 @@ internal sealed class OpenTelemetryAttributeKeys // Cosmos Db Specific public const string ClientId = "db.cosmosdb.client_id"; - public const string MachineId = "db.cosmosdb.hashed_machine_id"; + public const string MachineId = "db.cosmosdb.machine_id"; public const string UserAgent = "db.cosmosdb.user_agent"; public const string ConnectionMode = "db.cosmosdb.connection_mode"; public const string OperationType = "db.cosmosdb.operation_type"; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs index 3d9ee4afbb..7e9c798f9d 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs @@ -5,12 +5,9 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System.Net; - using Microsoft.Azure.Documents; internal class OpenTelemetryAttributes { - internal const string NotAvailable = "information not available"; - /// /// For testing purpose only, to make initialization of this class easy /// @@ -20,7 +17,7 @@ internal OpenTelemetryAttributes() internal OpenTelemetryAttributes(RequestMessage requestMessage) { - this.RequestContentLength = requestMessage?.Headers?.ContentLength ?? OpenTelemetryAttributes.NotAvailable; + this.RequestContentLength = requestMessage?.Headers?.ContentLength; } /// diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index b8be214392..e0b47e744f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -6,10 +6,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; using System.Collections.Generic; - using Diagnostics; - using global::Azure; using global::Azure.Core.Pipeline; - using HdrHistogram; internal struct OpenTelemetryCoreRecorder : IDisposable { @@ -92,8 +89,8 @@ public void Record( this.scope.AddAttribute(OpenTelemetryAttributeKeys.NetPeerName, clientContext.Client?.Endpoint?.Host); // Client Information - this.scope.AddAttribute(OpenTelemetryAttributeKeys.ClientId, clientContext?.Client?.Id ?? OpenTelemetryAttributes.NotAvailable); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.UserAgent, clientContext.UserAgent ?? OpenTelemetryAttributes.NotAvailable); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.ClientId, clientContext?.Client?.Id); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.UserAgent, clientContext.UserAgent); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ConnectionMode, clientContext.ClientOptions.ConnectionMode); } } @@ -108,21 +105,16 @@ public void Record(OpenTelemetryAttributes response) { this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestContentLength, response.RequestContentLength); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ResponseContentLength, response.ResponseContentLength); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, response.StatusCode); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, response.SubStatusCode); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, (int)response.StatusCode); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, (int)response.SubStatusCode); this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, response.RequestCharge); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ItemCount, response.ItemCount); if (response.Diagnostics != null) { - this.scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(response.Diagnostics.GetContactedRegions()) ?? OpenTelemetryAttributes.NotAvailable); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(response.Diagnostics.GetContactedRegions())); CosmosDbEventSource.RecordDiagnosticsForRequests(this.config, this.operationType, response); } - else - { - this.scope.AddAttribute(OpenTelemetryAttributeKeys.Region, OpenTelemetryAttributes.NotAvailable); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestDiagnostics, OpenTelemetryAttributes.NotAvailable); - } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index c66339e51e..88f149d608 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -24,7 +24,8 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, isActivityEnabled: true); DiagnosticScope scope = OpenTelemetryRecorderFactory .ScopeFactory - .CreateScope($"{OpenTelemetryAttributeKeys.OperationPrefix}.{operationName}"); + .CreateScope(name: $"{OpenTelemetryAttributeKeys.OperationPrefix}.{operationName}", + kind: clientContext.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? DiagnosticScope.ActivityKind.Internal : DiagnosticScope.ActivityKind.Client); if (scope.IsEnabled) { diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs index 7bb1fdc12e..98c1bfab8d 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs @@ -46,9 +46,9 @@ private OpenTelemetryResponse( { this.StatusCode = statusCode; this.RequestCharge = requestCharge; - this.ResponseContentLength = responseContentLength ?? OpenTelemetryAttributes.NotAvailable; + this.ResponseContentLength = responseContentLength; this.Diagnostics = diagnostics; - this.ItemCount = itemCount ?? OpenTelemetryAttributes.NotAvailable; + this.ItemCount = itemCount; this.SubStatusCode = subStatusCode; } @@ -60,7 +60,7 @@ private static string GetPayloadSize(ResponseMessage response) { return response.Content.Length.ToString(); } - return response?.Headers?.ContentLength ?? OpenTelemetryAttributes.NotAvailable; + return response?.Headers?.ContentLength; } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs index 3d7359da75..71ca5cfba2 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs @@ -45,9 +45,9 @@ private OpenTelemetryResponse( { this.StatusCode = statusCode; this.RequestCharge = requestCharge; - this.ResponseContentLength = responseContentLength ?? OpenTelemetryAttributes.NotAvailable; + this.ResponseContentLength = responseContentLength; this.Diagnostics = diagnostics; - this.ItemCount = itemCount ?? OpenTelemetryAttributes.NotAvailable; + this.ItemCount = itemCount; this.SubStatusCode = subStatusCode; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 15d67f3483..ffce1a6bf4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -34,34 +34,34 @@ - Cosmos.ExecuteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ExecuteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index 3eb9468e57..e999759bd3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -31,36 +31,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -189,36 +189,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -347,36 +347,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -505,36 +505,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -663,36 +663,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -821,36 +821,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -979,36 +979,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1137,36 +1137,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1295,36 +1295,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1453,36 +1453,36 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1629,176 +1629,176 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 1a1f0b40ee..2d747e9e45 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -25,220 +25,220 @@ - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -992,139 +992,139 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1610,135 +1610,135 @@ - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2208,139 +2208,139 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2821,65 +2821,65 @@ - Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index bffa1a103a..5b29ba3737 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -16,35 +16,35 @@ - Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -128,33 +128,33 @@ - Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index d074dbb221..7dea567de8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -33,42 +33,42 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -201,61 +201,61 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -469,30 +469,30 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -694,30 +694,30 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -951,30 +951,30 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1233,42 +1233,42 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 5368aad0e7..937daa7a49 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -19,151 +19,151 @@ - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -605,155 +605,155 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1212,151 +1212,151 @@ - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1799,155 +1799,155 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2409,175 +2409,175 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3082,152 +3082,152 @@ - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3678,156 +3678,156 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 8860741fc2..ee1302e06e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -19,118 +19,118 @@ - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -567,131 +567,131 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1136,118 +1136,118 @@ - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1685,131 +1685,131 @@ - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 5cc059c7a7..9558168b76 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -12,133 +12,133 @@ - Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -567,136 +567,136 @@ - Cosmos.ReadManyItemsAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ReadManyItemsAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 665f74396c..a1b5ceb966 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -18,21 +18,21 @@ - Cosmos.CreateItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -107,21 +107,21 @@ - Cosmos.ReadItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ReadItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -204,21 +204,21 @@ - Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -296,21 +296,21 @@ - Cosmos.DeleteItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.DeleteItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index 8042b6e21d..dfe617f632 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -16,34 +16,34 @@ - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -127,31 +127,31 @@ - Cosmos.ReadItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ReadItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -229,32 +229,32 @@ - Cosmos.ReplaceItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.ReplaceItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -330,31 +330,31 @@ - Cosmos.DeleteItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.hashed_machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Cosmos.DeleteItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs index fd50cd7365..05763f0bdb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs @@ -160,7 +160,7 @@ private static void AssertData(string name, IEnumerable exceptionsForDbNameAttribute = new List - { - "Cosmos.DeleteAsync", - "Cosmos.ExecuteAsync", "Cosmos.DeleteStreamAsync" }; if ((tag.Key == OpenTelemetryAttributeKeys.ContainerName && !exceptionsForContainerAttribute.Contains(name)) || - (tag.Key == OpenTelemetryAttributeKeys.DbName && !exceptionsForDbNameAttribute.Contains(name))) + (tag.Key == OpenTelemetryAttributeKeys.DbName)) { Assert.IsNotNull(tag.Value, $"{tag.Key} is 'null' for {name} operation"); - Assert.AreNotEqual(OpenTelemetryAttributes.NotAvailable, tag.Value, $"{tag.Key} is {OpenTelemetryAttributes.NotAvailable} for {name} operation"); + } + else if (tag.Key == OpenTelemetryAttributeKeys.ContainerName && exceptionsForContainerAttribute.Contains(name)) + { + Assert.IsNull(tag.Value, $"{tag.Key} is '{tag.Value}' for {name} operation"); } } From 2f047e1cf3c0d94d9fb13f66739952acf7467e9d Mon Sep 17 00:00:00 2001 From: Ezra Haleva <115735172+ezrahaleva-msft@users.noreply.github.com> Date: Mon, 28 Nov 2022 09:45:40 -0800 Subject: [PATCH 024/164] Query: Adds ALL Scalar Expression (#3509) * Add SqlAllScalarExpression to v3 DOM * updated generated parser files * Parsing for ALL * Added tests for ALL and baselines * Added more tests * added new test, cleanup * cleaning & fix typos * fixed typo * Added new baseline test file names to csproj file * renamed AggregateAll to AggregateSubquery to accomodate FIRST and LAST later * Added keywords for 'left' and 'right' and respective function calls * fixed bug from last commit * cleaning * replace tabs with spaces * cleaning --- .../src/Query/Core/Parser/CstToAstVisitor.cs | 59 +- .../src/Query/Core/Parser/IsqlListener.cs | 116 +- .../src/Query/Core/Parser/IsqlVisitor.cs | 61 +- .../src/Query/Core/Parser/sql.g4 | 235 +-- .../src/Query/Core/Parser/sqlBaseListener.cs | 122 +- .../src/Query/Core/Parser/sqlBaseVisitor.cs | 73 +- .../src/Query/Core/Parser/sqlLexer.cs | 919 ++++----- .../src/Query/Core/Parser/sqlParser.cs | 1640 ++++++++++------- .../CosmosQueryExecutionContextFactory.cs | 6 + .../src/SqlObjects/SqlAllScalarExpression.cs | 40 + .../Visitors/SqlObjectEqualityVisitor.cs | 15 + .../SqlObjects/Visitors/SqlObjectHasher.cs | 8 + .../Visitors/SqlObjectObfuscator.cs | 5 + .../Visitors/SqlObjectTextSerializer.cs | 8 + .../SqlObjects/Visitors/SqlObjectVisitor.cs | 1 + .../SqlObjectVisitor{TArg,TOutput}.cs | 1 + .../Visitors/SqlObjectVisitor{TResult}.cs | 1 + .../Visitors/SqlScalarExpressionVisitor.cs | 1 + ...qlScalarExpressionVisitor{TArg,TOutput}.cs | 1 + .../SqlScalarExpressionVisitor{TResult}.cs | 1 + ...gateSubquerySqlParserBaselineTests.All.xml | 92 + ...arExpressionSqlParserBaselineTests.All.xml | 47 + .../Microsoft.Azure.Cosmos.Tests.csproj | 8 +- .../AggregateProjectionDector.cs | 6 + .../AggregateProjectionTransformer.cs | 6 + .../ScalarExpressionEvaluator.cs | 48 + .../Query/OfflineEngine/SqlInterpreter.cs | 5 + ...AggregateSubquerySqlParserBaselineTests.cs | 68 + .../ScalarExpressionSqlParserBaselineTests.cs | 32 + 29 files changed, 2218 insertions(+), 1407 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/SqlObjects/SqlAllScalarExpression.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.All.xml create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.All.xml create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/AggregateSubquerySqlParserBaselineTests.cs diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs index 6b1de2883e..448b8f4ca6 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs @@ -183,9 +183,9 @@ public override SqlObject VisitSelect_item([NotNull] sqlParser.Select_itemContex SqlScalarExpression sqlScalarExpression = (SqlScalarExpression)this.Visit(context.scalar_expression()); SqlIdentifier alias; - if (context.IDENTIFIER() != null) + if (context.identifier() != null) { - alias = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + alias = SqlIdentifier.Create(context.identifier().GetText()); } else { @@ -233,9 +233,9 @@ public override SqlObject VisitAliasedCollectionExpression([NotNull] sqlParser.A SqlCollection sqlCollection = (SqlCollection)this.Visit(context.collection()); SqlIdentifier alias; - if (context.IDENTIFIER() != null) + if (context.identifier() != null) { - alias = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + alias = SqlIdentifier.Create(context.identifier().GetText()); } else { @@ -250,7 +250,7 @@ public override SqlObject VisitArrayIteratorCollectionExpression([NotNull] sqlPa Contract.Requires(context != null); SqlCollection sqlCollection = (SqlCollection)this.Visit(context.collection()); - SqlIdentifier identifier = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + SqlIdentifier identifier = SqlIdentifier.Create(context.identifier().GetText()); return SqlArrayIteratorCollectionExpression.Create(identifier, sqlCollection); } @@ -269,7 +269,7 @@ public override SqlObject VisitInputPathCollection([NotNull] sqlParser.InputPath { Contract.Requires(context != null); - SqlIdentifier identifier = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + SqlIdentifier identifier = SqlIdentifier.Create(context.identifier().GetText()); SqlPathExpression pathExpression; if (context.path_expression() != null) { @@ -302,7 +302,7 @@ public override SqlObject VisitIdentifierPathExpression([NotNull] sqlParser.Iden Contract.Requires(context != null); SqlPathExpression pathExpression = (SqlPathExpression)this.Visit(context.path_expression()); - SqlIdentifier identifier = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + SqlIdentifier identifier = SqlIdentifier.Create(context.identifier().GetText()); return SqlIdentifierPathExpression.Create(parentPath: pathExpression, value: identifier); } @@ -458,6 +458,15 @@ public override SqlObject VisitLimit_count([NotNull] sqlParser.Limit_countContex #endregion #region ScalarExpressions + public override SqlObject VisitAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context) + { + Contract.Requires(context != null); + // K_ALL '(' sql_query ')' + Contract.Requires(context.ChildCount == 4); + + SqlQuery subquery = (SqlQuery)this.Visit(context.children[2]); + return SqlAllScalarExpression.Create(subquery); + } public override SqlObject VisitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { Contract.Requires(context != null); @@ -562,10 +571,34 @@ public override SqlObject VisitExistsScalarExpression([NotNull] sqlParser.Exists public override SqlObject VisitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { Contract.Requires(context != null); - // (K_UDF '.')? IDENTIFIER '(' scalar_expression_list? ')' + // function_call_scalar_expression + + return this.Visit(context.function_call_scalar_expression()); + } + + public override SqlObject VisitFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context) + { + Contract.Requires(context != null); + // : (K_UDF '.')? identifier '(' scalar_expression_list ? ')' + // | K_LEFT '(' scalar_expression_list ? ')' + // | K_RIGHT '(' scalar_expression_list ? ')' bool udf = context.K_UDF() != null; - SqlIdentifier identifier = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + SqlIdentifier identifier; + + if (context.identifier() != null) + { + identifier = SqlIdentifier.Create(context.identifier().GetText()); + } + else if (context.K_LEFT() != null) + { + identifier = SqlIdentifier.Create(context.K_LEFT().GetText()); + } + else + { + identifier = SqlIdentifier.Create(context.K_RIGHT().GetText()); + } + List arguments = new List(); if (context.scalar_expression_list() != null) { @@ -719,20 +752,20 @@ public override SqlObject VisitParameterRefScalarExpression([NotNull] sqlParser. public override SqlObject VisitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { Contract.Requires(context != null); - // IDENTIFIER + // identifier return SqlPropertyRefScalarExpression.Create( member: null, - SqlIdentifier.Create(context.IDENTIFIER().GetText())); + SqlIdentifier.Create(context.identifier().GetText())); } public override SqlObject VisitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { Contract.Requires(context != null); - // primary_expression '.' IDENTIFIER + // primary_expression '.' identifier SqlScalarExpression memberExpression = (SqlScalarExpression)this.Visit(context.primary_expression()); - SqlIdentifier indentifier = SqlIdentifier.Create(context.IDENTIFIER().GetText()); + SqlIdentifier indentifier = SqlIdentifier.Create(context.identifier().GetText()); return SqlPropertyRefScalarExpression.Create(memberExpression, indentifier); } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs index ed0eb42e76..24a4a0694a 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs @@ -526,101 +526,125 @@ internal interface IsqlListener : IParseTreeListener { /// The parse tree. void ExitUnary_operator([NotNull] sqlParser.Unary_operatorContext context); /// - /// Enter a parse tree produced by the SubqueryScalarExpression + /// Enter a parse tree produced by the AllScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context); + void EnterAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context); /// - /// Exit a parse tree produced by the SubqueryScalarExpression + /// Exit a parse tree produced by the AllScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context); + void ExitAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context); /// - /// Enter a parse tree produced by the PropertyRefScalarExpressionBase + /// Enter a parse tree produced by the LiteralScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context); + void EnterLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context); /// - /// Exit a parse tree produced by the PropertyRefScalarExpressionBase + /// Exit a parse tree produced by the LiteralScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context); + void ExitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context); /// - /// Enter a parse tree produced by the FunctionCallScalarExpression + /// Enter a parse tree produced by the ObjectCreateScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context); + void EnterObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); /// - /// Exit a parse tree produced by the FunctionCallScalarExpression + /// Exit a parse tree produced by the ObjectCreateScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context); + void ExitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); /// - /// Enter a parse tree produced by the LiteralScalarExpression + /// Enter a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context); + void EnterArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context); /// - /// Exit a parse tree produced by the LiteralScalarExpression + /// Exit a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context); + void ExitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context); /// - /// Enter a parse tree produced by the ObjectCreateScalarExpression + /// Enter a parse tree produced by the MemberIndexerScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); + void EnterMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context); /// - /// Exit a parse tree produced by the ObjectCreateScalarExpression + /// Exit a parse tree produced by the MemberIndexerScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); + void ExitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context); /// - /// Enter a parse tree produced by the ParenthesizedScalarExperession + /// Enter a parse tree produced by the SubqueryScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context); + void EnterSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context); /// - /// Exit a parse tree produced by the ParenthesizedScalarExperession + /// Exit a parse tree produced by the SubqueryScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context); + void ExitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context); /// - /// Enter a parse tree produced by the ParameterRefScalarExpression + /// Enter a parse tree produced by the PropertyRefScalarExpressionBase /// labeled alternative in . /// /// The parse tree. - void EnterParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context); + void EnterPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context); /// - /// Exit a parse tree produced by the ParameterRefScalarExpression + /// Exit a parse tree produced by the PropertyRefScalarExpressionBase /// labeled alternative in . /// /// The parse tree. - void ExitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context); + void ExitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context); /// - /// Enter a parse tree produced by the ArrayCreateScalarExpression + /// Enter a parse tree produced by the FunctionCallScalarExpression /// labeled alternative in . /// /// The parse tree. - void EnterArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context); + void EnterFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context); /// - /// Exit a parse tree produced by the ArrayCreateScalarExpression + /// Exit a parse tree produced by the FunctionCallScalarExpression /// labeled alternative in . /// /// The parse tree. - void ExitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context); + void ExitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context); + /// + /// Enter a parse tree produced by the ParenthesizedScalarExperession + /// labeled alternative in . + /// + /// The parse tree. + void EnterParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context); + /// + /// Exit a parse tree produced by the ParenthesizedScalarExperession + /// labeled alternative in . + /// + /// The parse tree. + void ExitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context); + /// + /// Enter a parse tree produced by the ParameterRefScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + void EnterParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context); + /// + /// Exit a parse tree produced by the ParameterRefScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + void ExitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context); /// /// Enter a parse tree produced by the ExistsScalarExpression /// labeled alternative in . @@ -646,29 +670,27 @@ internal interface IsqlListener : IParseTreeListener { /// The parse tree. void ExitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context); /// - /// Enter a parse tree produced by the MemberIndexerScalarExpression + /// Enter a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// /// The parse tree. - void EnterMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context); + void EnterPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context); /// - /// Exit a parse tree produced by the MemberIndexerScalarExpression + /// Exit a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// /// The parse tree. - void ExitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context); + void ExitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context); /// - /// Enter a parse tree produced by the PropertyRefScalarExpressionRecursive - /// labeled alternative in . + /// Enter a parse tree produced by . /// /// The parse tree. - void EnterPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context); + void EnterFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context); /// - /// Exit a parse tree produced by the PropertyRefScalarExpressionRecursive - /// labeled alternative in . + /// Exit a parse tree produced by . /// /// The parse tree. - void ExitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context); + void ExitFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context); /// /// Enter a parse tree produced by . /// @@ -700,6 +722,16 @@ internal interface IsqlListener : IParseTreeListener { /// The parse tree. void ExitObject_property([NotNull] sqlParser.Object_propertyContext context); /// + /// Enter a parse tree produced by . + /// + /// The parse tree. + void EnterIdentifier([NotNull] sqlParser.IdentifierContext context); + /// + /// Exit a parse tree produced by . + /// + /// The parse tree. + void ExitIdentifier([NotNull] sqlParser.IdentifierContext context); + /// /// Enter a parse tree produced by . /// /// The parse tree. diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs index 2e96892783..e22a9d4218 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs @@ -326,61 +326,75 @@ internal interface IsqlVisitor : IParseTreeVisitor { /// The visitor result. Result VisitUnary_operator([NotNull] sqlParser.Unary_operatorContext context); /// - /// Visit a parse tree produced by the SubqueryScalarExpression + /// Visit a parse tree produced by the AllScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context); + Result VisitAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context); /// - /// Visit a parse tree produced by the PropertyRefScalarExpressionBase + /// Visit a parse tree produced by the LiteralScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context); + Result VisitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context); /// - /// Visit a parse tree produced by the FunctionCallScalarExpression + /// Visit a parse tree produced by the ObjectCreateScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context); + Result VisitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); /// - /// Visit a parse tree produced by the LiteralScalarExpression + /// Visit a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context); + Result VisitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context); /// - /// Visit a parse tree produced by the ObjectCreateScalarExpression + /// Visit a parse tree produced by the MemberIndexerScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); + Result VisitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context); /// - /// Visit a parse tree produced by the ParenthesizedScalarExperession + /// Visit a parse tree produced by the SubqueryScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context); + Result VisitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context); /// - /// Visit a parse tree produced by the ParameterRefScalarExpression + /// Visit a parse tree produced by the PropertyRefScalarExpressionBase /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context); + Result VisitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context); /// - /// Visit a parse tree produced by the ArrayCreateScalarExpression + /// Visit a parse tree produced by the FunctionCallScalarExpression /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context); + Result VisitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context); + /// + /// Visit a parse tree produced by the ParenthesizedScalarExperession + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context); + /// + /// Visit a parse tree produced by the ParameterRefScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context); /// /// Visit a parse tree produced by the ExistsScalarExpression /// labeled alternative in . @@ -396,19 +410,18 @@ internal interface IsqlVisitor : IParseTreeVisitor { /// The visitor result. Result VisitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context); /// - /// Visit a parse tree produced by the MemberIndexerScalarExpression + /// Visit a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// /// The parse tree. /// The visitor result. - Result VisitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context); + Result VisitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context); /// - /// Visit a parse tree produced by the PropertyRefScalarExpressionRecursive - /// labeled alternative in . + /// Visit a parse tree produced by . /// /// The parse tree. /// The visitor result. - Result VisitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context); + Result VisitFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context); /// /// Visit a parse tree produced by . /// @@ -428,6 +441,12 @@ internal interface IsqlVisitor : IParseTreeVisitor { /// The visitor result. Result VisitObject_property([NotNull] sqlParser.Object_propertyContext context); /// + /// Visit a parse tree produced by . + /// + /// The parse tree. + /// The visitor result. + Result VisitIdentifier([NotNull] sqlParser.IdentifierContext context); + /// /// Visit a parse tree produced by . /// /// The parse tree. diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 index ef9361f67b..42ac229557 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 @@ -1,8 +1,8 @@ grammar sql; program - : sql_query EOF - ; + : sql_query EOF + ; sql_query : select_clause from_clause? where_clause? group_by_clause? order_by_clause? offset_limit_clause? ; @@ -12,14 +12,14 @@ sql_query : select_clause from_clause? where_clause? group_by_clause? order_by_c select_clause : K_SELECT K_DISTINCT? top_spec? selection ; top_spec : K_TOP (NUMERIC_LITERAL | PARAMETER); selection - : select_star_spec - | select_value_spec - | select_list_spec - ; + : select_star_spec + | select_value_spec + | select_list_spec + ; select_star_spec : '*' ; select_value_spec : K_VALUE scalar_expression ; select_list_spec : select_item ( ',' select_item )* ; -select_item : scalar_expression (K_AS IDENTIFIER)? ; +select_item : scalar_expression (K_AS identifier)? ; /*--------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------*/ @@ -27,20 +27,20 @@ select_item : scalar_expression (K_AS IDENTIFIER)? ; /*--------------------------------------------------------------------------------*/ from_clause : K_FROM collection_expression ; collection_expression - : collection (K_AS? IDENTIFIER)? #AliasedCollectionExpression - | IDENTIFIER K_IN collection #ArrayIteratorCollectionExpression - | collection_expression K_JOIN collection_expression #JoinCollectionExpression - ; + : collection (K_AS? identifier)? #AliasedCollectionExpression + | identifier K_IN collection #ArrayIteratorCollectionExpression + | collection_expression K_JOIN collection_expression #JoinCollectionExpression + ; collection - : IDENTIFIER path_expression? #InputPathCollection - | '(' sql_query ')' #SubqueryCollection - ; + : identifier path_expression? #InputPathCollection + | '(' sql_query ')' #SubqueryCollection + ; path_expression - : path_expression'.'IDENTIFIER #IdentifierPathExpression - | path_expression'[' NUMERIC_LITERAL ']' #NumberPathExpression - | path_expression'[' STRING_LITERAL ']' #StringPathExpression - | /*epsilon*/ #EpsilonPathExpression - ; + : path_expression'.'identifier #IdentifierPathExpression + | path_expression'[' NUMERIC_LITERAL ']' #NumberPathExpression + | path_expression'[' STRING_LITERAL ']' #StringPathExpression + | /*epsilon*/ #EpsilonPathExpression + ; /*--------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------*/ @@ -62,9 +62,9 @@ order_by_clause : K_ORDER K_BY order_by_items ; order_by_items : order_by_item (',' order_by_item)* ; order_by_item : scalar_expression sort_order? ; sort_order - : K_ASC - | K_DESC - ; + : K_ASC + | K_DESC + ; /*--------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------*/ @@ -79,66 +79,66 @@ limit_count : NUMERIC_LITERAL | PARAMETER; /* SCALAR EXPRESSIONs */ /*--------------------------------------------------------------------------------*/ scalar_expression - : scalar_expression '?' scalar_expression ':' scalar_expression #ConditionalScalarExpression - | scalar_expression '??' scalar_expression #CoalesceScalarExpression - | logical_scalar_expression #LogicalScalarExpression - | binary_scalar_expression K_NOT? K_BETWEEN binary_scalar_expression K_AND binary_scalar_expression #BetweenScalarExpression - ; + : scalar_expression '?' scalar_expression ':' scalar_expression #ConditionalScalarExpression + | scalar_expression '??' scalar_expression #CoalesceScalarExpression + | logical_scalar_expression #LogicalScalarExpression + | binary_scalar_expression K_NOT? K_BETWEEN binary_scalar_expression K_AND binary_scalar_expression #BetweenScalarExpression + ; logical_scalar_expression - : binary_scalar_expression - | in_scalar_expression - | like_scalar_expression - | logical_scalar_expression K_AND logical_scalar_expression - | logical_scalar_expression K_OR logical_scalar_expression - ; + : binary_scalar_expression + | in_scalar_expression + | like_scalar_expression + | logical_scalar_expression K_AND logical_scalar_expression + | logical_scalar_expression K_OR logical_scalar_expression + ; in_scalar_expression - : binary_scalar_expression K_NOT? K_IN '(' scalar_expression_list ')' - ; + : binary_scalar_expression K_NOT? K_IN '(' scalar_expression_list ')' + ; like_scalar_expression - : binary_scalar_expression K_NOT? K_LIKE binary_scalar_expression escape_expression? - ; + : binary_scalar_expression K_NOT? K_LIKE binary_scalar_expression escape_expression? + ; escape_expression - : K_ESCAPE STRING_LITERAL - ; + : K_ESCAPE STRING_LITERAL + ; binary_scalar_expression - : unary_scalar_expression - | binary_scalar_expression multiplicative_operator binary_scalar_expression - | binary_scalar_expression additive_operator binary_scalar_expression - | binary_scalar_expression relational_operator binary_scalar_expression - | binary_scalar_expression equality_operator binary_scalar_expression - | binary_scalar_expression bitwise_and_operator binary_scalar_expression - | binary_scalar_expression bitwise_exclusive_or_operator binary_scalar_expression - | binary_scalar_expression bitwise_inclusive_or_operator binary_scalar_expression - | binary_scalar_expression string_concat_operator binary_scalar_expression - ; + : unary_scalar_expression + | binary_scalar_expression multiplicative_operator binary_scalar_expression + | binary_scalar_expression additive_operator binary_scalar_expression + | binary_scalar_expression relational_operator binary_scalar_expression + | binary_scalar_expression equality_operator binary_scalar_expression + | binary_scalar_expression bitwise_and_operator binary_scalar_expression + | binary_scalar_expression bitwise_exclusive_or_operator binary_scalar_expression + | binary_scalar_expression bitwise_inclusive_or_operator binary_scalar_expression + | binary_scalar_expression string_concat_operator binary_scalar_expression + ; multiplicative_operator - : '*' - | '/' - | '%' - ; + : '*' + | '/' + | '%' + ; additive_operator - : '+' - | '-' - ; + : '+' + | '-' + ; relational_operator - : '<' - | '>' - | '>=' - | '<=' - ; + : '<' + | '>' + | '>=' + | '<=' + ; equality_operator - : '=' - | '!=' - ; + : '=' + | '!=' + ; bitwise_and_operator : '&' ; @@ -149,42 +149,55 @@ bitwise_inclusive_or_operator : '|'; string_concat_operator : '||'; unary_scalar_expression - : primary_expression - | unary_operator unary_scalar_expression - ; + : primary_expression + | unary_operator unary_scalar_expression + ; unary_operator - : '-' - | '+' - | '~' - | K_NOT - ; + : '-' + | '+' + | '~' + | K_NOT + ; primary_expression - : IDENTIFIER #PropertyRefScalarExpressionBase - | PARAMETER #ParameterRefScalarExpression - | literal #LiteralScalarExpression - | '[' scalar_expression_list? ']' #ArrayCreateScalarExpression - | '{' object_property_list? '}' #ObjectCreateScalarExpression - | (K_UDF '.')? IDENTIFIER '(' scalar_expression_list? ')' #FunctionCallScalarExpression - | '(' scalar_expression ')' #ParenthesizedScalarExperession - | '(' sql_query ')' #SubqueryScalarExpression - | primary_expression '.' IDENTIFIER #PropertyRefScalarExpressionRecursive - | primary_expression '[' scalar_expression ']' #MemberIndexerScalarExpression - | K_EXISTS '(' sql_query ')' #ExistsScalarExpression - | K_ARRAY '(' sql_query ')' #ArrayScalarExpression - ; + : identifier #PropertyRefScalarExpressionBase + | PARAMETER #ParameterRefScalarExpression + | literal #LiteralScalarExpression + | '[' scalar_expression_list? ']' #ArrayCreateScalarExpression + | '{' object_property_list? '}' #ObjectCreateScalarExpression + | '(' scalar_expression ')' #ParenthesizedScalarExperession + | '(' sql_query ')' #SubqueryScalarExpression + | primary_expression '.' identifier #PropertyRefScalarExpressionRecursive + | primary_expression '[' scalar_expression ']' #MemberIndexerScalarExpression + | K_EXISTS '(' sql_query ')' #ExistsScalarExpression + | K_ARRAY '(' sql_query ')' #ArrayScalarExpression + | K_ALL '(' sql_query ')' #AllScalarExpression + | function_call_scalar_expression #FunctionCallScalarExpression + ; + +function_call_scalar_expression + : (K_UDF '.')? identifier '(' scalar_expression_list? ')' + | K_LEFT '(' scalar_expression_list? ')' + | K_RIGHT '(' scalar_expression_list? ')' + ; scalar_expression_list : scalar_expression (',' scalar_expression)*; object_property_list : object_property (',' object_property)* ; object_property : STRING_LITERAL ':' scalar_expression ; + +identifier + : LEX_IDENTIFIER + | K_ALL + ; /*--------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------*/ /* KEYWORDS */ /*--------------------------------------------------------------------------------*/ +K_ALL : A L L; K_AND : A N D; K_ARRAY : A R R A Y; K_AS : A S; @@ -200,6 +213,7 @@ K_FROM : F R O M; K_GROUP : G R O U P; K_IN : I N ; K_JOIN : J O I N; +K_LEFT : L E F T; K_LIKE : L I K E; K_LIMIT : L I M I T; K_NOT : N O T; @@ -207,6 +221,7 @@ K_NULL : 'null'; K_OFFSET : O F F S E T; K_OR : O R; K_ORDER : O R D E R; +K_RIGHT : R I G H T; K_SELECT : S E L E C T; K_TOP : T O P; K_TRUE : 'true'; @@ -224,27 +239,27 @@ WS /* LITERALS */ /*--------------------------------------------------------------------------------*/ literal - : STRING_LITERAL - | NUMERIC_LITERAL - | K_TRUE - | K_FALSE - | K_NULL - | K_UNDEFINED - ; + : STRING_LITERAL + | NUMERIC_LITERAL + | K_TRUE + | K_FALSE + | K_NULL + | K_UNDEFINED + ; NUMERIC_LITERAL - : ( '+' | '-' )? DIGIT+ ( '.' DIGIT* )? ( E [-+]? DIGIT+ )? - | ( '+' | '-' )? '.' DIGIT+ ( E [-+]? DIGIT+ )? - ; + : ( '+' | '-' )? DIGIT+ ( '.' DIGIT* )? ( E [-+]? DIGIT+ )? + | ( '+' | '-' )? '.' DIGIT+ ( E [-+]? DIGIT+ )? + ; STRING_LITERAL - : '"' (ESC | SAFECODEPOINTWITHDOUBLEQUOTATION)* '"' - | '\'' (ESC | SAFECODEPOINTWITHSINGLEQUOTATION)* '\'' - ; + : '"' (ESC | SAFECODEPOINTWITHDOUBLEQUOTATION)* '"' + | '\'' (ESC | SAFECODEPOINTWITHSINGLEQUOTATION)* '\'' + ; fragment ESC - : '\\' (["\\/bfnrt] | UNICODE) - ; + : '\\' (["\\/bfnrt] | UNICODE) + ; fragment UNICODE : 'u' HEX HEX HEX HEX @@ -255,21 +270,21 @@ fragment HEX ; fragment SAFECODEPOINTWITHSINGLEQUOTATION - : ~ ['\\\u0000-\u001F] - ; + : ~ ['\\\u0000-\u001F] + ; fragment SAFECODEPOINTWITHDOUBLEQUOTATION - : ~ ["\\\u0000-\u001F] - ; + : ~ ["\\\u0000-\u001F] + ; -IDENTIFIER - : - | [a-zA-Z_]([a-zA-Z_]|DIGIT)* - ; +LEX_IDENTIFIER + : + | [a-zA-Z_]([a-zA-Z_]|DIGIT)* + ; PARAMETER - : '@'IDENTIFIER - ; + : '@'LEX_IDENTIFIER + ; /*--------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------*/ diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs index 5a52445735..18003391b1 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs @@ -624,117 +624,145 @@ public virtual void EnterUnary_operator([NotNull] sqlParser.Unary_operatorContex /// The parse tree. public virtual void ExitUnary_operator([NotNull] sqlParser.Unary_operatorContext context) { } /// - /// Enter a parse tree produced by the SubqueryScalarExpression + /// Enter a parse tree produced by the AllScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context) { } + public virtual void EnterAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the SubqueryScalarExpression + /// Exit a parse tree produced by the AllScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context) { } + public virtual void ExitAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the PropertyRefScalarExpressionBase + /// Enter a parse tree produced by the LiteralScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { } + public virtual void EnterLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the PropertyRefScalarExpressionBase + /// Exit a parse tree produced by the LiteralScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { } + public virtual void ExitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the FunctionCallScalarExpression + /// Enter a parse tree produced by the ObjectCreateScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { } + public virtual void EnterObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the FunctionCallScalarExpression + /// Exit a parse tree produced by the ObjectCreateScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { } + public virtual void ExitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the LiteralScalarExpression + /// Enter a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context) { } + public virtual void EnterArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the LiteralScalarExpression + /// Exit a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context) { } + public virtual void ExitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the ObjectCreateScalarExpression + /// Enter a parse tree produced by the MemberIndexerScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { } + public virtual void EnterMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the ObjectCreateScalarExpression + /// Exit a parse tree produced by the MemberIndexerScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { } + public virtual void ExitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the ParenthesizedScalarExperession + /// Enter a parse tree produced by the SubqueryScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context) { } + public virtual void EnterSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the ParenthesizedScalarExperession + /// Exit a parse tree produced by the SubqueryScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context) { } + public virtual void ExitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the ParameterRefScalarExpression + /// Enter a parse tree produced by the PropertyRefScalarExpressionBase /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context) { } + public virtual void EnterPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { } /// - /// Exit a parse tree produced by the ParameterRefScalarExpression + /// Exit a parse tree produced by the PropertyRefScalarExpressionBase /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context) { } + public virtual void ExitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { } /// - /// Enter a parse tree produced by the ArrayCreateScalarExpression + /// Enter a parse tree produced by the FunctionCallScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { } + public virtual void EnterFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { } /// - /// Exit a parse tree produced by the ArrayCreateScalarExpression + /// Exit a parse tree produced by the FunctionCallScalarExpression /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { } + public virtual void ExitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { } + /// + /// Enter a parse tree produced by the ParenthesizedScalarExperession + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context) { } + /// + /// Exit a parse tree produced by the ParenthesizedScalarExperession + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context) { } + /// + /// Enter a parse tree produced by the ParameterRefScalarExpression + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context) { } + /// + /// Exit a parse tree produced by the ParameterRefScalarExpression + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context) { } /// /// Enter a parse tree produced by the ExistsScalarExpression /// labeled alternative in . @@ -764,33 +792,31 @@ public virtual void EnterArrayScalarExpression([NotNull] sqlParser.ArrayScalarEx /// The parse tree. public virtual void ExitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context) { } /// - /// Enter a parse tree produced by the MemberIndexerScalarExpression + /// Enter a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context) { } + public virtual void EnterPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { } /// - /// Exit a parse tree produced by the MemberIndexerScalarExpression + /// Exit a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context) { } + public virtual void ExitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { } /// - /// Enter a parse tree produced by the PropertyRefScalarExpressionRecursive - /// labeled alternative in . + /// Enter a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void EnterPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { } + public virtual void EnterFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context) { } /// - /// Exit a parse tree produced by the PropertyRefScalarExpressionRecursive - /// labeled alternative in . + /// Exit a parse tree produced by . /// The default implementation does nothing. /// /// The parse tree. - public virtual void ExitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { } + public virtual void ExitFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context) { } /// /// Enter a parse tree produced by . /// The default implementation does nothing. @@ -828,6 +854,18 @@ public virtual void EnterObject_property([NotNull] sqlParser.Object_propertyCont /// The parse tree. public virtual void ExitObject_property([NotNull] sqlParser.Object_propertyContext context) { } /// + /// Enter a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterIdentifier([NotNull] sqlParser.IdentifierContext context) { } + /// + /// Exit a parse tree produced by . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitIdentifier([NotNull] sqlParser.IdentifierContext context) { } + /// /// Enter a parse tree produced by . /// The default implementation does nothing. /// diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs index 287851e115..bb3b86379d 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs @@ -516,7 +516,7 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// The visitor result. public virtual Result VisitUnary_operator([NotNull] sqlParser.Unary_operatorContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the SubqueryScalarExpression + /// Visit a parse tree produced by the AllScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -525,9 +525,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitAllScalarExpression([NotNull] sqlParser.AllScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the PropertyRefScalarExpressionBase + /// Visit a parse tree produced by the LiteralScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -536,9 +536,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { return VisitChildren(context); } + public virtual Result VisitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the FunctionCallScalarExpression + /// Visit a parse tree produced by the ObjectCreateScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -547,9 +547,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the LiteralScalarExpression + /// Visit a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -558,9 +558,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitLiteralScalarExpression([NotNull] sqlParser.LiteralScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the ObjectCreateScalarExpression + /// Visit a parse tree produced by the MemberIndexerScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -569,9 +569,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the ParenthesizedScalarExperession + /// Visit a parse tree produced by the SubqueryScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -580,9 +580,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context) { return VisitChildren(context); } + public virtual Result VisitSubqueryScalarExpression([NotNull] sqlParser.SubqueryScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the ParameterRefScalarExpression + /// Visit a parse tree produced by the PropertyRefScalarExpressionBase /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -591,9 +591,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitPropertyRefScalarExpressionBase([NotNull] sqlParser.PropertyRefScalarExpressionBaseContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the ArrayCreateScalarExpression + /// Visit a parse tree produced by the FunctionCallScalarExpression /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -602,7 +602,29 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitArrayCreateScalarExpression([NotNull] sqlParser.ArrayCreateScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by the ParenthesizedScalarExperession + /// labeled alternative in . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitParenthesizedScalarExperession([NotNull] sqlParser.ParenthesizedScalarExperessionContext context) { return VisitChildren(context); } + /// + /// Visit a parse tree produced by the ParameterRefScalarExpression + /// labeled alternative in . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitParameterRefScalarExpression([NotNull] sqlParser.ParameterRefScalarExpressionContext context) { return VisitChildren(context); } /// /// Visit a parse tree produced by the ExistsScalarExpression /// labeled alternative in . @@ -626,7 +648,7 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// The visitor result. public virtual Result VisitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the MemberIndexerScalarExpression + /// Visit a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// /// The default implementation returns the result of calling @@ -635,10 +657,9 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitMemberIndexerScalarExpression([NotNull] sqlParser.MemberIndexerScalarExpressionContext context) { return VisitChildren(context); } + public virtual Result VisitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { return VisitChildren(context); } /// - /// Visit a parse tree produced by the PropertyRefScalarExpressionRecursive - /// labeled alternative in . + /// Visit a parse tree produced by . /// /// The default implementation returns the result of calling /// on . @@ -646,7 +667,7 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// /// The parse tree. /// The visitor result. - public virtual Result VisitPropertyRefScalarExpressionRecursive([NotNull] sqlParser.PropertyRefScalarExpressionRecursiveContext context) { return VisitChildren(context); } + public virtual Result VisitFunction_call_scalar_expression([NotNull] sqlParser.Function_call_scalar_expressionContext context) { return VisitChildren(context); } /// /// Visit a parse tree produced by . /// @@ -678,6 +699,16 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// The visitor result. public virtual Result VisitObject_property([NotNull] sqlParser.Object_propertyContext context) { return VisitChildren(context); } /// + /// Visit a parse tree produced by . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitIdentifier([NotNull] sqlParser.IdentifierContext context) { return VisitChildren(context); } + /// /// Visit a parse tree produced by . /// /// The default implementation returns the result of calling diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs index 23f23fbed2..1d5b7262bd 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs @@ -35,12 +35,13 @@ public const int T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, - T__24=25, T__25=26, T__26=27, K_AND=28, K_ARRAY=29, K_AS=30, K_ASC=31, - K_BETWEEN=32, K_BY=33, K_DESC=34, K_DISTINCT=35, K_ESCAPE=36, K_EXISTS=37, - K_FALSE=38, K_FROM=39, K_GROUP=40, K_IN=41, K_JOIN=42, K_LIKE=43, K_LIMIT=44, - K_NOT=45, K_NULL=46, K_OFFSET=47, K_OR=48, K_ORDER=49, K_SELECT=50, K_TOP=51, - K_TRUE=52, K_UDF=53, K_UNDEFINED=54, K_VALUE=55, K_WHERE=56, WS=57, NUMERIC_LITERAL=58, - STRING_LITERAL=59, IDENTIFIER=60, PARAMETER=61; + T__24=25, T__25=26, T__26=27, K_ALL=28, K_AND=29, K_ARRAY=30, K_AS=31, + K_ASC=32, K_BETWEEN=33, K_BY=34, K_DESC=35, K_DISTINCT=36, K_ESCAPE=37, + K_EXISTS=38, K_FALSE=39, K_FROM=40, K_GROUP=41, K_IN=42, K_JOIN=43, K_LEFT=44, + K_LIKE=45, K_LIMIT=46, K_NOT=47, K_NULL=48, K_OFFSET=49, K_OR=50, K_ORDER=51, + K_RIGHT=52, K_SELECT=53, K_TOP=54, K_TRUE=55, K_UDF=56, K_UNDEFINED=57, + K_VALUE=58, K_WHERE=59, WS=60, NUMERIC_LITERAL=61, STRING_LITERAL=62, + LEX_IDENTIFIER=63, PARAMETER=64; public static string[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -53,15 +54,15 @@ public const int "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", - "T__25", "T__26", "K_AND", "K_ARRAY", "K_AS", "K_ASC", "K_BETWEEN", "K_BY", - "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", "K_FROM", "K_GROUP", - "K_IN", "K_JOIN", "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", "K_OFFSET", - "K_OR", "K_ORDER", "K_SELECT", "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", - "K_VALUE", "K_WHERE", "WS", "NUMERIC_LITERAL", "STRING_LITERAL", "ESC", - "UNICODE", "HEX", "SAFECODEPOINTWITHSINGLEQUOTATION", "SAFECODEPOINTWITHDOUBLEQUOTATION", - "IDENTIFIER", "PARAMETER", "DIGIT", "A", "B", "C", "D", "E", "F", "G", - "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", - "V", "W", "X", "Y", "Z" + "T__25", "T__26", "K_ALL", "K_AND", "K_ARRAY", "K_AS", "K_ASC", "K_BETWEEN", + "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", "K_FROM", + "K_GROUP", "K_IN", "K_JOIN", "K_LEFT", "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", + "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", "K_TOP", "K_TRUE", + "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", "NUMERIC_LITERAL", + "STRING_LITERAL", "ESC", "UNICODE", "HEX", "SAFECODEPOINTWITHSINGLEQUOTATION", + "SAFECODEPOINTWITHDOUBLEQUOTATION", "LEX_IDENTIFIER", "PARAMETER", "DIGIT", + "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", + "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" }; @@ -78,19 +79,19 @@ public sqlLexer(ICharStream input, TextWriter output, TextWriter errorOutput) null, "'*'", "','", "'('", "')'", "'.'", "'['", "']'", "'?'", "':'", "'??'", "'/'", "'%'", "'+'", "'-'", "'<'", "'>'", "'>='", "'<='", "'='", "'!='", "'&'", "'^'", "'|'", "'||'", "'~'", "'{'", "'}'", null, null, null, null, - null, null, null, null, null, null, "'false'", null, null, null, null, - null, null, null, "'null'", null, null, null, null, null, "'true'", "'udf'", - "'undefined'" + null, null, null, null, null, null, null, "'false'", null, null, null, + null, null, null, null, null, "'null'", null, null, null, null, null, + null, "'true'", "'udf'", "'undefined'" }; private static readonly string[] _SymbolicNames = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, "K_AND", "K_ARRAY", "K_AS", "K_ASC", "K_BETWEEN", - "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", "K_FROM", - "K_GROUP", "K_IN", "K_JOIN", "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", "K_OFFSET", - "K_OR", "K_ORDER", "K_SELECT", "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", - "K_VALUE", "K_WHERE", "WS", "NUMERIC_LITERAL", "STRING_LITERAL", "IDENTIFIER", - "PARAMETER" + null, null, null, null, "K_ALL", "K_AND", "K_ARRAY", "K_AS", "K_ASC", + "K_BETWEEN", "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", + "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LEFT", "K_LIKE", "K_LIMIT", + "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", + "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", + "NUMERIC_LITERAL", "STRING_LITERAL", "LEX_IDENTIFIER", "PARAMETER" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -121,7 +122,7 @@ static sqlLexer() { } private static char[] _serializedATN = { '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786', - '\x5964', '\x2', '?', '\x239', '\b', '\x1', '\x4', '\x2', '\t', '\x2', + '\x5964', '\x2', '\x42', '\x24E', '\b', '\x1', '\x4', '\x2', '\t', '\x2', '\x4', '\x3', '\t', '\x3', '\x4', '\x4', '\t', '\x4', '\x4', '\x5', '\t', '\x5', '\x4', '\x6', '\t', '\x6', '\x4', '\a', '\t', '\a', '\x4', '\b', '\t', '\b', '\x4', '\t', '\t', '\t', '\x4', '\n', '\t', '\n', '\x4', '\v', @@ -154,6 +155,7 @@ static sqlLexer() { '\t', 'U', '\x4', 'V', '\t', 'V', '\x4', 'W', '\t', 'W', '\x4', 'X', '\t', 'X', '\x4', 'Y', '\t', 'Y', '\x4', 'Z', '\t', 'Z', '\x4', '[', '\t', '[', '\x4', '\\', '\t', '\\', '\x4', ']', '\t', ']', '\x4', '^', '\t', '^', + '\x4', '_', '\t', '_', '\x4', '`', '\t', '`', '\x4', '\x61', '\t', '\x61', '\x3', '\x2', '\x3', '\x2', '\x3', '\x3', '\x3', '\x3', '\x3', '\x4', '\x3', '\x4', '\x3', '\x5', '\x3', '\x5', '\x3', '\x6', '\x3', '\x6', '\x3', '\a', '\x3', '\a', '\x3', '\b', '\x3', '\b', '\x3', '\t', '\x3', @@ -167,56 +169,58 @@ static sqlLexer() { '\x19', '\x3', '\x19', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', - '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1F', '\x3', '\x1F', '\x3', - '\x1F', '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', '!', '\x3', - '!', '\x3', '!', '\x3', '!', '\x3', '!', '\x3', '!', '\x3', '!', '\x3', - '!', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '#', '\x3', '#', '\x3', + '\x1E', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3', + '\x1F', '\x3', '\x1F', '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', '!', + '\x3', '!', '\x3', '!', '\x3', '!', '\x3', '\"', '\x3', '\"', '\x3', '\"', + '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '#', '\x3', '#', '\x3', '#', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', - '$', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', - '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', - '%', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', - '&', '\x3', '&', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', - '\'', '\x3', '\'', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', - '(', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', - ')', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '+', '\x3', '+', '\x3', - '+', '\x3', '+', '\x3', '+', '\x3', ',', '\x3', ',', '\x3', ',', '\x3', - ',', '\x3', ',', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', - '-', '\x3', '-', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', - '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '\x30', '\x3', - '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', - '\x30', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x32', '\x3', - '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', - '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', - '\x33', '\x3', '\x33', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', - '\x34', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', - '\x35', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', - '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', - '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', - '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', - '\x38', '\x3', '\x39', '\x3', '\x39', '\x3', '\x39', '\x3', '\x39', '\x3', - '\x39', '\x3', '\x39', '\x3', ':', '\x6', ':', '\x199', '\n', ':', '\r', - ':', '\xE', ':', '\x19A', '\x3', ':', '\x3', ':', '\x3', ';', '\x5', ';', - '\x1A0', '\n', ';', '\x3', ';', '\x6', ';', '\x1A3', '\n', ';', '\r', - ';', '\xE', ';', '\x1A4', '\x3', ';', '\x3', ';', '\a', ';', '\x1A9', - '\n', ';', '\f', ';', '\xE', ';', '\x1AC', '\v', ';', '\x5', ';', '\x1AE', - '\n', ';', '\x3', ';', '\x3', ';', '\x5', ';', '\x1B2', '\n', ';', '\x3', - ';', '\x6', ';', '\x1B5', '\n', ';', '\r', ';', '\xE', ';', '\x1B6', '\x5', - ';', '\x1B9', '\n', ';', '\x3', ';', '\x5', ';', '\x1BC', '\n', ';', '\x3', - ';', '\x3', ';', '\x6', ';', '\x1C0', '\n', ';', '\r', ';', '\xE', ';', - '\x1C1', '\x3', ';', '\x3', ';', '\x5', ';', '\x1C6', '\n', ';', '\x3', - ';', '\x6', ';', '\x1C9', '\n', ';', '\r', ';', '\xE', ';', '\x1CA', '\x5', - ';', '\x1CD', '\n', ';', '\x5', ';', '\x1CF', '\n', ';', '\x3', '<', '\x3', - '<', '\x3', '<', '\a', '<', '\x1D4', '\n', '<', '\f', '<', '\xE', '<', - '\x1D7', '\v', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\a', - '<', '\x1DD', '\n', '<', '\f', '<', '\xE', '<', '\x1E0', '\v', '<', '\x3', - '<', '\x5', '<', '\x1E3', '\n', '<', '\x3', '=', '\x3', '=', '\x3', '=', - '\x5', '=', '\x1E8', '\n', '=', '\x3', '>', '\x3', '>', '\x3', '>', '\x3', - '>', '\x3', '>', '\x3', '>', '\x3', '?', '\x3', '?', '\x3', '@', '\x3', - '@', '\x3', '\x41', '\x3', '\x41', '\x3', '\x42', '\x3', '\x42', '\x3', - '\x42', '\x3', '\x42', '\a', '\x42', '\x1FA', '\n', '\x42', '\f', '\x42', - '\xE', '\x42', '\x1FD', '\v', '\x42', '\x5', '\x42', '\x1FF', '\n', '\x42', - '\x3', '\x43', '\x3', '\x43', '\x3', '\x43', '\x3', '\x44', '\x3', '\x44', - '\x3', '\x45', '\x3', '\x45', '\x3', '\x46', '\x3', '\x46', '\x3', 'G', + '$', '\x3', '$', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', + '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '&', '\x3', + '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', + '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', + '\x3', '\'', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', + '\x3', '(', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', + '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', + '\x3', '+', '\x3', '+', '\x3', '+', '\x3', ',', '\x3', ',', '\x3', ',', + '\x3', ',', '\x3', ',', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', + '\x3', '-', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', + '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', + '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x31', + '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x32', + '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', + '\x3', '\x32', '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x34', + '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', + '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', + '\x3', '\x35', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', + '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x37', '\x3', '\x37', + '\x3', '\x37', '\x3', '\x37', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', + '\x3', '\x38', '\x3', '\x38', '\x3', '\x39', '\x3', '\x39', '\x3', '\x39', + '\x3', '\x39', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', + ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', + ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', + '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', + '=', '\x6', '=', '\x1AE', '\n', '=', '\r', '=', '\xE', '=', '\x1AF', '\x3', + '=', '\x3', '=', '\x3', '>', '\x5', '>', '\x1B5', '\n', '>', '\x3', '>', + '\x6', '>', '\x1B8', '\n', '>', '\r', '>', '\xE', '>', '\x1B9', '\x3', + '>', '\x3', '>', '\a', '>', '\x1BE', '\n', '>', '\f', '>', '\xE', '>', + '\x1C1', '\v', '>', '\x5', '>', '\x1C3', '\n', '>', '\x3', '>', '\x3', + '>', '\x5', '>', '\x1C7', '\n', '>', '\x3', '>', '\x6', '>', '\x1CA', + '\n', '>', '\r', '>', '\xE', '>', '\x1CB', '\x5', '>', '\x1CE', '\n', + '>', '\x3', '>', '\x5', '>', '\x1D1', '\n', '>', '\x3', '>', '\x3', '>', + '\x6', '>', '\x1D5', '\n', '>', '\r', '>', '\xE', '>', '\x1D6', '\x3', + '>', '\x3', '>', '\x5', '>', '\x1DB', '\n', '>', '\x3', '>', '\x6', '>', + '\x1DE', '\n', '>', '\r', '>', '\xE', '>', '\x1DF', '\x5', '>', '\x1E2', + '\n', '>', '\x5', '>', '\x1E4', '\n', '>', '\x3', '?', '\x3', '?', '\x3', + '?', '\a', '?', '\x1E9', '\n', '?', '\f', '?', '\xE', '?', '\x1EC', '\v', + '?', '\x3', '?', '\x3', '?', '\x3', '?', '\x3', '?', '\a', '?', '\x1F2', + '\n', '?', '\f', '?', '\xE', '?', '\x1F5', '\v', '?', '\x3', '?', '\x5', + '?', '\x1F8', '\n', '?', '\x3', '@', '\x3', '@', '\x3', '@', '\x5', '@', + '\x1FD', '\n', '@', '\x3', '\x41', '\x3', '\x41', '\x3', '\x41', '\x3', + '\x41', '\x3', '\x41', '\x3', '\x41', '\x3', '\x42', '\x3', '\x42', '\x3', + '\x43', '\x3', '\x43', '\x3', '\x44', '\x3', '\x44', '\x3', '\x45', '\x3', + '\x45', '\x3', '\x45', '\x3', '\x45', '\a', '\x45', '\x20F', '\n', '\x45', + '\f', '\x45', '\xE', '\x45', '\x212', '\v', '\x45', '\x5', '\x45', '\x214', + '\n', '\x45', '\x3', '\x46', '\x3', '\x46', '\x3', '\x46', '\x3', 'G', '\x3', 'G', '\x3', 'H', '\x3', 'H', '\x3', 'I', '\x3', 'I', '\x3', 'J', '\x3', 'J', '\x3', 'K', '\x3', 'K', '\x3', 'L', '\x3', 'L', '\x3', 'M', '\x3', 'M', '\x3', 'N', '\x3', 'N', '\x3', 'O', '\x3', 'O', '\x3', 'P', @@ -224,382 +228,397 @@ static sqlLexer() { '\x3', 'S', '\x3', 'T', '\x3', 'T', '\x3', 'U', '\x3', 'U', '\x3', 'V', '\x3', 'V', '\x3', 'W', '\x3', 'W', '\x3', 'X', '\x3', 'X', '\x3', 'Y', '\x3', 'Y', '\x3', 'Z', '\x3', 'Z', '\x3', '[', '\x3', '[', '\x3', '\\', - '\x3', '\\', '\x3', ']', '\x3', ']', '\x3', '^', '\x3', '^', '\x2', '\x2', - '_', '\x3', '\x3', '\x5', '\x4', '\a', '\x5', '\t', '\x6', '\v', '\a', - '\r', '\b', '\xF', '\t', '\x11', '\n', '\x13', '\v', '\x15', '\f', '\x17', - '\r', '\x19', '\xE', '\x1B', '\xF', '\x1D', '\x10', '\x1F', '\x11', '!', - '\x12', '#', '\x13', '%', '\x14', '\'', '\x15', ')', '\x16', '+', '\x17', - '-', '\x18', '/', '\x19', '\x31', '\x1A', '\x33', '\x1B', '\x35', '\x1C', - '\x37', '\x1D', '\x39', '\x1E', ';', '\x1F', '=', ' ', '?', '!', '\x41', - '\"', '\x43', '#', '\x45', '$', 'G', '%', 'I', '&', 'K', '\'', 'M', '(', - 'O', ')', 'Q', '*', 'S', '+', 'U', ',', 'W', '-', 'Y', '.', '[', '/', - ']', '\x30', '_', '\x31', '\x61', '\x32', '\x63', '\x33', '\x65', '\x34', - 'g', '\x35', 'i', '\x36', 'k', '\x37', 'm', '\x38', 'o', '\x39', 'q', - ':', 's', ';', 'u', '<', 'w', '=', 'y', '\x2', '{', '\x2', '}', '\x2', - '\x7F', '\x2', '\x81', '\x2', '\x83', '>', '\x85', '?', '\x87', '\x2', - '\x89', '\x2', '\x8B', '\x2', '\x8D', '\x2', '\x8F', '\x2', '\x91', '\x2', - '\x93', '\x2', '\x95', '\x2', '\x97', '\x2', '\x99', '\x2', '\x9B', '\x2', - '\x9D', '\x2', '\x9F', '\x2', '\xA1', '\x2', '\xA3', '\x2', '\xA5', '\x2', - '\xA7', '\x2', '\xA9', '\x2', '\xAB', '\x2', '\xAD', '\x2', '\xAF', '\x2', - '\xB1', '\x2', '\xB3', '\x2', '\xB5', '\x2', '\xB7', '\x2', '\xB9', '\x2', - '\xBB', '\x2', '\x3', '\x2', '$', '\x5', '\x2', '\v', '\f', '\xF', '\xF', - '\"', '\"', '\x4', '\x2', '-', '-', '/', '/', '\n', '\x2', '$', '$', '\x31', - '\x31', '^', '^', '\x64', '\x64', 'h', 'h', 'p', 'p', 't', 't', 'v', 'v', - '\x5', '\x2', '\x32', ';', '\x43', 'H', '\x63', 'h', '\x5', '\x2', '\x2', - '!', ')', ')', '^', '^', '\x5', '\x2', '\x2', '!', '$', '$', '^', '^', - '\x5', '\x2', '\x43', '\\', '\x61', '\x61', '\x63', '|', '\x3', '\x2', - '\x32', ';', '\x4', '\x2', '\x43', '\x43', '\x63', '\x63', '\x4', '\x2', - '\x44', '\x44', '\x64', '\x64', '\x4', '\x2', '\x45', '\x45', '\x65', - '\x65', '\x4', '\x2', '\x46', '\x46', '\x66', '\x66', '\x4', '\x2', 'G', - 'G', 'g', 'g', '\x4', '\x2', 'H', 'H', 'h', 'h', '\x4', '\x2', 'I', 'I', - 'i', 'i', '\x4', '\x2', 'J', 'J', 'j', 'j', '\x4', '\x2', 'K', 'K', 'k', - 'k', '\x4', '\x2', 'L', 'L', 'l', 'l', '\x4', '\x2', 'M', 'M', 'm', 'm', - '\x4', '\x2', 'N', 'N', 'n', 'n', '\x4', '\x2', 'O', 'O', 'o', 'o', '\x4', - '\x2', 'P', 'P', 'p', 'p', '\x4', '\x2', 'Q', 'Q', 'q', 'q', '\x4', '\x2', - 'R', 'R', 'r', 'r', '\x4', '\x2', 'S', 'S', 's', 's', '\x4', '\x2', 'T', - 'T', 't', 't', '\x4', '\x2', 'U', 'U', 'u', 'u', '\x4', '\x2', 'V', 'V', - 'v', 'v', '\x4', '\x2', 'W', 'W', 'w', 'w', '\x4', '\x2', 'X', 'X', 'x', - 'x', '\x4', '\x2', 'Y', 'Y', 'y', 'y', '\x4', '\x2', 'Z', 'Z', 'z', 'z', - '\x4', '\x2', '[', '[', '{', '{', '\x4', '\x2', '\\', '\\', '|', '|', - '\x2', '\x22F', '\x2', '\x3', '\x3', '\x2', '\x2', '\x2', '\x2', '\x5', - '\x3', '\x2', '\x2', '\x2', '\x2', '\a', '\x3', '\x2', '\x2', '\x2', '\x2', - '\t', '\x3', '\x2', '\x2', '\x2', '\x2', '\v', '\x3', '\x2', '\x2', '\x2', - '\x2', '\r', '\x3', '\x2', '\x2', '\x2', '\x2', '\xF', '\x3', '\x2', '\x2', - '\x2', '\x2', '\x11', '\x3', '\x2', '\x2', '\x2', '\x2', '\x13', '\x3', - '\x2', '\x2', '\x2', '\x2', '\x15', '\x3', '\x2', '\x2', '\x2', '\x2', - '\x17', '\x3', '\x2', '\x2', '\x2', '\x2', '\x19', '\x3', '\x2', '\x2', - '\x2', '\x2', '\x1B', '\x3', '\x2', '\x2', '\x2', '\x2', '\x1D', '\x3', - '\x2', '\x2', '\x2', '\x2', '\x1F', '\x3', '\x2', '\x2', '\x2', '\x2', - '!', '\x3', '\x2', '\x2', '\x2', '\x2', '#', '\x3', '\x2', '\x2', '\x2', - '\x2', '%', '\x3', '\x2', '\x2', '\x2', '\x2', '\'', '\x3', '\x2', '\x2', - '\x2', '\x2', ')', '\x3', '\x2', '\x2', '\x2', '\x2', '+', '\x3', '\x2', - '\x2', '\x2', '\x2', '-', '\x3', '\x2', '\x2', '\x2', '\x2', '/', '\x3', - '\x2', '\x2', '\x2', '\x2', '\x31', '\x3', '\x2', '\x2', '\x2', '\x2', - '\x33', '\x3', '\x2', '\x2', '\x2', '\x2', '\x35', '\x3', '\x2', '\x2', - '\x2', '\x2', '\x37', '\x3', '\x2', '\x2', '\x2', '\x2', '\x39', '\x3', - '\x2', '\x2', '\x2', '\x2', ';', '\x3', '\x2', '\x2', '\x2', '\x2', '=', - '\x3', '\x2', '\x2', '\x2', '\x2', '?', '\x3', '\x2', '\x2', '\x2', '\x2', - '\x41', '\x3', '\x2', '\x2', '\x2', '\x2', '\x43', '\x3', '\x2', '\x2', - '\x2', '\x2', '\x45', '\x3', '\x2', '\x2', '\x2', '\x2', 'G', '\x3', '\x2', - '\x2', '\x2', '\x2', 'I', '\x3', '\x2', '\x2', '\x2', '\x2', 'K', '\x3', - '\x2', '\x2', '\x2', '\x2', 'M', '\x3', '\x2', '\x2', '\x2', '\x2', 'O', - '\x3', '\x2', '\x2', '\x2', '\x2', 'Q', '\x3', '\x2', '\x2', '\x2', '\x2', - 'S', '\x3', '\x2', '\x2', '\x2', '\x2', 'U', '\x3', '\x2', '\x2', '\x2', - '\x2', 'W', '\x3', '\x2', '\x2', '\x2', '\x2', 'Y', '\x3', '\x2', '\x2', - '\x2', '\x2', '[', '\x3', '\x2', '\x2', '\x2', '\x2', ']', '\x3', '\x2', - '\x2', '\x2', '\x2', '_', '\x3', '\x2', '\x2', '\x2', '\x2', '\x61', '\x3', - '\x2', '\x2', '\x2', '\x2', '\x63', '\x3', '\x2', '\x2', '\x2', '\x2', - '\x65', '\x3', '\x2', '\x2', '\x2', '\x2', 'g', '\x3', '\x2', '\x2', '\x2', - '\x2', 'i', '\x3', '\x2', '\x2', '\x2', '\x2', 'k', '\x3', '\x2', '\x2', - '\x2', '\x2', 'm', '\x3', '\x2', '\x2', '\x2', '\x2', 'o', '\x3', '\x2', - '\x2', '\x2', '\x2', 'q', '\x3', '\x2', '\x2', '\x2', '\x2', 's', '\x3', - '\x2', '\x2', '\x2', '\x2', 'u', '\x3', '\x2', '\x2', '\x2', '\x2', 'w', - '\x3', '\x2', '\x2', '\x2', '\x2', '\x83', '\x3', '\x2', '\x2', '\x2', - '\x2', '\x85', '\x3', '\x2', '\x2', '\x2', '\x3', '\xBD', '\x3', '\x2', - '\x2', '\x2', '\x5', '\xBF', '\x3', '\x2', '\x2', '\x2', '\a', '\xC1', - '\x3', '\x2', '\x2', '\x2', '\t', '\xC3', '\x3', '\x2', '\x2', '\x2', - '\v', '\xC5', '\x3', '\x2', '\x2', '\x2', '\r', '\xC7', '\x3', '\x2', - '\x2', '\x2', '\xF', '\xC9', '\x3', '\x2', '\x2', '\x2', '\x11', '\xCB', - '\x3', '\x2', '\x2', '\x2', '\x13', '\xCD', '\x3', '\x2', '\x2', '\x2', - '\x15', '\xCF', '\x3', '\x2', '\x2', '\x2', '\x17', '\xD2', '\x3', '\x2', - '\x2', '\x2', '\x19', '\xD4', '\x3', '\x2', '\x2', '\x2', '\x1B', '\xD6', - '\x3', '\x2', '\x2', '\x2', '\x1D', '\xD8', '\x3', '\x2', '\x2', '\x2', - '\x1F', '\xDA', '\x3', '\x2', '\x2', '\x2', '!', '\xDC', '\x3', '\x2', - '\x2', '\x2', '#', '\xDE', '\x3', '\x2', '\x2', '\x2', '%', '\xE1', '\x3', - '\x2', '\x2', '\x2', '\'', '\xE4', '\x3', '\x2', '\x2', '\x2', ')', '\xE6', - '\x3', '\x2', '\x2', '\x2', '+', '\xE9', '\x3', '\x2', '\x2', '\x2', '-', - '\xEB', '\x3', '\x2', '\x2', '\x2', '/', '\xED', '\x3', '\x2', '\x2', - '\x2', '\x31', '\xEF', '\x3', '\x2', '\x2', '\x2', '\x33', '\xF2', '\x3', - '\x2', '\x2', '\x2', '\x35', '\xF4', '\x3', '\x2', '\x2', '\x2', '\x37', - '\xF6', '\x3', '\x2', '\x2', '\x2', '\x39', '\xF8', '\x3', '\x2', '\x2', - '\x2', ';', '\xFC', '\x3', '\x2', '\x2', '\x2', '=', '\x102', '\x3', '\x2', - '\x2', '\x2', '?', '\x105', '\x3', '\x2', '\x2', '\x2', '\x41', '\x109', - '\x3', '\x2', '\x2', '\x2', '\x43', '\x111', '\x3', '\x2', '\x2', '\x2', - '\x45', '\x114', '\x3', '\x2', '\x2', '\x2', 'G', '\x119', '\x3', '\x2', - '\x2', '\x2', 'I', '\x122', '\x3', '\x2', '\x2', '\x2', 'K', '\x129', - '\x3', '\x2', '\x2', '\x2', 'M', '\x130', '\x3', '\x2', '\x2', '\x2', - 'O', '\x136', '\x3', '\x2', '\x2', '\x2', 'Q', '\x13B', '\x3', '\x2', - '\x2', '\x2', 'S', '\x141', '\x3', '\x2', '\x2', '\x2', 'U', '\x144', - '\x3', '\x2', '\x2', '\x2', 'W', '\x149', '\x3', '\x2', '\x2', '\x2', - 'Y', '\x14E', '\x3', '\x2', '\x2', '\x2', '[', '\x154', '\x3', '\x2', - '\x2', '\x2', ']', '\x158', '\x3', '\x2', '\x2', '\x2', '_', '\x15D', - '\x3', '\x2', '\x2', '\x2', '\x61', '\x164', '\x3', '\x2', '\x2', '\x2', - '\x63', '\x167', '\x3', '\x2', '\x2', '\x2', '\x65', '\x16D', '\x3', '\x2', - '\x2', '\x2', 'g', '\x174', '\x3', '\x2', '\x2', '\x2', 'i', '\x178', - '\x3', '\x2', '\x2', '\x2', 'k', '\x17D', '\x3', '\x2', '\x2', '\x2', - 'm', '\x181', '\x3', '\x2', '\x2', '\x2', 'o', '\x18B', '\x3', '\x2', - '\x2', '\x2', 'q', '\x191', '\x3', '\x2', '\x2', '\x2', 's', '\x198', - '\x3', '\x2', '\x2', '\x2', 'u', '\x1CE', '\x3', '\x2', '\x2', '\x2', - 'w', '\x1E2', '\x3', '\x2', '\x2', '\x2', 'y', '\x1E4', '\x3', '\x2', - '\x2', '\x2', '{', '\x1E9', '\x3', '\x2', '\x2', '\x2', '}', '\x1EF', - '\x3', '\x2', '\x2', '\x2', '\x7F', '\x1F1', '\x3', '\x2', '\x2', '\x2', - '\x81', '\x1F3', '\x3', '\x2', '\x2', '\x2', '\x83', '\x1FE', '\x3', '\x2', - '\x2', '\x2', '\x85', '\x200', '\x3', '\x2', '\x2', '\x2', '\x87', '\x203', - '\x3', '\x2', '\x2', '\x2', '\x89', '\x205', '\x3', '\x2', '\x2', '\x2', - '\x8B', '\x207', '\x3', '\x2', '\x2', '\x2', '\x8D', '\x209', '\x3', '\x2', - '\x2', '\x2', '\x8F', '\x20B', '\x3', '\x2', '\x2', '\x2', '\x91', '\x20D', - '\x3', '\x2', '\x2', '\x2', '\x93', '\x20F', '\x3', '\x2', '\x2', '\x2', - '\x95', '\x211', '\x3', '\x2', '\x2', '\x2', '\x97', '\x213', '\x3', '\x2', - '\x2', '\x2', '\x99', '\x215', '\x3', '\x2', '\x2', '\x2', '\x9B', '\x217', - '\x3', '\x2', '\x2', '\x2', '\x9D', '\x219', '\x3', '\x2', '\x2', '\x2', - '\x9F', '\x21B', '\x3', '\x2', '\x2', '\x2', '\xA1', '\x21D', '\x3', '\x2', - '\x2', '\x2', '\xA3', '\x21F', '\x3', '\x2', '\x2', '\x2', '\xA5', '\x221', - '\x3', '\x2', '\x2', '\x2', '\xA7', '\x223', '\x3', '\x2', '\x2', '\x2', - '\xA9', '\x225', '\x3', '\x2', '\x2', '\x2', '\xAB', '\x227', '\x3', '\x2', - '\x2', '\x2', '\xAD', '\x229', '\x3', '\x2', '\x2', '\x2', '\xAF', '\x22B', - '\x3', '\x2', '\x2', '\x2', '\xB1', '\x22D', '\x3', '\x2', '\x2', '\x2', - '\xB3', '\x22F', '\x3', '\x2', '\x2', '\x2', '\xB5', '\x231', '\x3', '\x2', - '\x2', '\x2', '\xB7', '\x233', '\x3', '\x2', '\x2', '\x2', '\xB9', '\x235', - '\x3', '\x2', '\x2', '\x2', '\xBB', '\x237', '\x3', '\x2', '\x2', '\x2', - '\xBD', '\xBE', '\a', ',', '\x2', '\x2', '\xBE', '\x4', '\x3', '\x2', - '\x2', '\x2', '\xBF', '\xC0', '\a', '.', '\x2', '\x2', '\xC0', '\x6', - '\x3', '\x2', '\x2', '\x2', '\xC1', '\xC2', '\a', '*', '\x2', '\x2', '\xC2', - '\b', '\x3', '\x2', '\x2', '\x2', '\xC3', '\xC4', '\a', '+', '\x2', '\x2', - '\xC4', '\n', '\x3', '\x2', '\x2', '\x2', '\xC5', '\xC6', '\a', '\x30', - '\x2', '\x2', '\xC6', '\f', '\x3', '\x2', '\x2', '\x2', '\xC7', '\xC8', - '\a', ']', '\x2', '\x2', '\xC8', '\xE', '\x3', '\x2', '\x2', '\x2', '\xC9', - '\xCA', '\a', '_', '\x2', '\x2', '\xCA', '\x10', '\x3', '\x2', '\x2', - '\x2', '\xCB', '\xCC', '\a', '\x41', '\x2', '\x2', '\xCC', '\x12', '\x3', - '\x2', '\x2', '\x2', '\xCD', '\xCE', '\a', '<', '\x2', '\x2', '\xCE', - '\x14', '\x3', '\x2', '\x2', '\x2', '\xCF', '\xD0', '\a', '\x41', '\x2', - '\x2', '\xD0', '\xD1', '\a', '\x41', '\x2', '\x2', '\xD1', '\x16', '\x3', - '\x2', '\x2', '\x2', '\xD2', '\xD3', '\a', '\x31', '\x2', '\x2', '\xD3', - '\x18', '\x3', '\x2', '\x2', '\x2', '\xD4', '\xD5', '\a', '\'', '\x2', - '\x2', '\xD5', '\x1A', '\x3', '\x2', '\x2', '\x2', '\xD6', '\xD7', '\a', - '-', '\x2', '\x2', '\xD7', '\x1C', '\x3', '\x2', '\x2', '\x2', '\xD8', - '\xD9', '\a', '/', '\x2', '\x2', '\xD9', '\x1E', '\x3', '\x2', '\x2', - '\x2', '\xDA', '\xDB', '\a', '>', '\x2', '\x2', '\xDB', ' ', '\x3', '\x2', - '\x2', '\x2', '\xDC', '\xDD', '\a', '@', '\x2', '\x2', '\xDD', '\"', '\x3', - '\x2', '\x2', '\x2', '\xDE', '\xDF', '\a', '@', '\x2', '\x2', '\xDF', - '\xE0', '\a', '?', '\x2', '\x2', '\xE0', '$', '\x3', '\x2', '\x2', '\x2', - '\xE1', '\xE2', '\a', '>', '\x2', '\x2', '\xE2', '\xE3', '\a', '?', '\x2', - '\x2', '\xE3', '&', '\x3', '\x2', '\x2', '\x2', '\xE4', '\xE5', '\a', - '?', '\x2', '\x2', '\xE5', '(', '\x3', '\x2', '\x2', '\x2', '\xE6', '\xE7', - '\a', '#', '\x2', '\x2', '\xE7', '\xE8', '\a', '?', '\x2', '\x2', '\xE8', - '*', '\x3', '\x2', '\x2', '\x2', '\xE9', '\xEA', '\a', '(', '\x2', '\x2', - '\xEA', ',', '\x3', '\x2', '\x2', '\x2', '\xEB', '\xEC', '\a', '`', '\x2', - '\x2', '\xEC', '.', '\x3', '\x2', '\x2', '\x2', '\xED', '\xEE', '\a', - '~', '\x2', '\x2', '\xEE', '\x30', '\x3', '\x2', '\x2', '\x2', '\xEF', - '\xF0', '\a', '~', '\x2', '\x2', '\xF0', '\xF1', '\a', '~', '\x2', '\x2', - '\xF1', '\x32', '\x3', '\x2', '\x2', '\x2', '\xF2', '\xF3', '\a', '\x80', - '\x2', '\x2', '\xF3', '\x34', '\x3', '\x2', '\x2', '\x2', '\xF4', '\xF5', - '\a', '}', '\x2', '\x2', '\xF5', '\x36', '\x3', '\x2', '\x2', '\x2', '\xF6', - '\xF7', '\a', '\x7F', '\x2', '\x2', '\xF7', '\x38', '\x3', '\x2', '\x2', - '\x2', '\xF8', '\xF9', '\x5', '\x89', '\x45', '\x2', '\xF9', '\xFA', '\x5', - '\xA3', 'R', '\x2', '\xFA', '\xFB', '\x5', '\x8F', 'H', '\x2', '\xFB', - ':', '\x3', '\x2', '\x2', '\x2', '\xFC', '\xFD', '\x5', '\x89', '\x45', - '\x2', '\xFD', '\xFE', '\x5', '\xAB', 'V', '\x2', '\xFE', '\xFF', '\x5', - '\xAB', 'V', '\x2', '\xFF', '\x100', '\x5', '\x89', '\x45', '\x2', '\x100', - '\x101', '\x5', '\xB9', ']', '\x2', '\x101', '<', '\x3', '\x2', '\x2', - '\x2', '\x102', '\x103', '\x5', '\x89', '\x45', '\x2', '\x103', '\x104', - '\x5', '\xAD', 'W', '\x2', '\x104', '>', '\x3', '\x2', '\x2', '\x2', '\x105', - '\x106', '\x5', '\x89', '\x45', '\x2', '\x106', '\x107', '\x5', '\xAD', - 'W', '\x2', '\x107', '\x108', '\x5', '\x8D', 'G', '\x2', '\x108', '@', - '\x3', '\x2', '\x2', '\x2', '\x109', '\x10A', '\x5', '\x8B', '\x46', '\x2', - '\x10A', '\x10B', '\x5', '\x91', 'I', '\x2', '\x10B', '\x10C', '\x5', - '\xAF', 'X', '\x2', '\x10C', '\x10D', '\x5', '\xB5', '[', '\x2', '\x10D', - '\x10E', '\x5', '\x91', 'I', '\x2', '\x10E', '\x10F', '\x5', '\x91', 'I', - '\x2', '\x10F', '\x110', '\x5', '\xA3', 'R', '\x2', '\x110', '\x42', '\x3', - '\x2', '\x2', '\x2', '\x111', '\x112', '\x5', '\x8B', '\x46', '\x2', '\x112', - '\x113', '\x5', '\xB9', ']', '\x2', '\x113', '\x44', '\x3', '\x2', '\x2', - '\x2', '\x114', '\x115', '\x5', '\x8F', 'H', '\x2', '\x115', '\x116', - '\x5', '\x91', 'I', '\x2', '\x116', '\x117', '\x5', '\xAD', 'W', '\x2', - '\x117', '\x118', '\x5', '\x8D', 'G', '\x2', '\x118', '\x46', '\x3', '\x2', - '\x2', '\x2', '\x119', '\x11A', '\x5', '\x8F', 'H', '\x2', '\x11A', '\x11B', - '\x5', '\x99', 'M', '\x2', '\x11B', '\x11C', '\x5', '\xAD', 'W', '\x2', - '\x11C', '\x11D', '\x5', '\xAF', 'X', '\x2', '\x11D', '\x11E', '\x5', - '\x99', 'M', '\x2', '\x11E', '\x11F', '\x5', '\xA3', 'R', '\x2', '\x11F', - '\x120', '\x5', '\x8D', 'G', '\x2', '\x120', '\x121', '\x5', '\xAF', 'X', - '\x2', '\x121', 'H', '\x3', '\x2', '\x2', '\x2', '\x122', '\x123', '\x5', - '\x91', 'I', '\x2', '\x123', '\x124', '\x5', '\xAD', 'W', '\x2', '\x124', - '\x125', '\x5', '\x8D', 'G', '\x2', '\x125', '\x126', '\x5', '\x89', '\x45', - '\x2', '\x126', '\x127', '\x5', '\xA7', 'T', '\x2', '\x127', '\x128', - '\x5', '\x91', 'I', '\x2', '\x128', 'J', '\x3', '\x2', '\x2', '\x2', '\x129', - '\x12A', '\x5', '\x91', 'I', '\x2', '\x12A', '\x12B', '\x5', '\xB7', '\\', - '\x2', '\x12B', '\x12C', '\x5', '\x99', 'M', '\x2', '\x12C', '\x12D', - '\x5', '\xAD', 'W', '\x2', '\x12D', '\x12E', '\x5', '\xAF', 'X', '\x2', - '\x12E', '\x12F', '\x5', '\xAD', 'W', '\x2', '\x12F', 'L', '\x3', '\x2', - '\x2', '\x2', '\x130', '\x131', '\a', 'h', '\x2', '\x2', '\x131', '\x132', - '\a', '\x63', '\x2', '\x2', '\x132', '\x133', '\a', 'n', '\x2', '\x2', - '\x133', '\x134', '\a', 'u', '\x2', '\x2', '\x134', '\x135', '\a', 'g', - '\x2', '\x2', '\x135', 'N', '\x3', '\x2', '\x2', '\x2', '\x136', '\x137', - '\x5', '\x93', 'J', '\x2', '\x137', '\x138', '\x5', '\xAB', 'V', '\x2', - '\x138', '\x139', '\x5', '\xA5', 'S', '\x2', '\x139', '\x13A', '\x5', - '\xA1', 'Q', '\x2', '\x13A', 'P', '\x3', '\x2', '\x2', '\x2', '\x13B', - '\x13C', '\x5', '\x95', 'K', '\x2', '\x13C', '\x13D', '\x5', '\xAB', 'V', - '\x2', '\x13D', '\x13E', '\x5', '\xA5', 'S', '\x2', '\x13E', '\x13F', - '\x5', '\xB1', 'Y', '\x2', '\x13F', '\x140', '\x5', '\xA7', 'T', '\x2', - '\x140', 'R', '\x3', '\x2', '\x2', '\x2', '\x141', '\x142', '\x5', '\x99', - 'M', '\x2', '\x142', '\x143', '\x5', '\xA3', 'R', '\x2', '\x143', 'T', - '\x3', '\x2', '\x2', '\x2', '\x144', '\x145', '\x5', '\x9B', 'N', '\x2', - '\x145', '\x146', '\x5', '\xA5', 'S', '\x2', '\x146', '\x147', '\x5', - '\x99', 'M', '\x2', '\x147', '\x148', '\x5', '\xA3', 'R', '\x2', '\x148', - 'V', '\x3', '\x2', '\x2', '\x2', '\x149', '\x14A', '\x5', '\x9F', 'P', - '\x2', '\x14A', '\x14B', '\x5', '\x99', 'M', '\x2', '\x14B', '\x14C', - '\x5', '\x9D', 'O', '\x2', '\x14C', '\x14D', '\x5', '\x91', 'I', '\x2', - '\x14D', 'X', '\x3', '\x2', '\x2', '\x2', '\x14E', '\x14F', '\x5', '\x9F', - 'P', '\x2', '\x14F', '\x150', '\x5', '\x99', 'M', '\x2', '\x150', '\x151', - '\x5', '\xA1', 'Q', '\x2', '\x151', '\x152', '\x5', '\x99', 'M', '\x2', - '\x152', '\x153', '\x5', '\xAF', 'X', '\x2', '\x153', 'Z', '\x3', '\x2', - '\x2', '\x2', '\x154', '\x155', '\x5', '\xA3', 'R', '\x2', '\x155', '\x156', - '\x5', '\xA5', 'S', '\x2', '\x156', '\x157', '\x5', '\xAF', 'X', '\x2', - '\x157', '\\', '\x3', '\x2', '\x2', '\x2', '\x158', '\x159', '\a', 'p', - '\x2', '\x2', '\x159', '\x15A', '\a', 'w', '\x2', '\x2', '\x15A', '\x15B', - '\a', 'n', '\x2', '\x2', '\x15B', '\x15C', '\a', 'n', '\x2', '\x2', '\x15C', - '^', '\x3', '\x2', '\x2', '\x2', '\x15D', '\x15E', '\x5', '\xA5', 'S', - '\x2', '\x15E', '\x15F', '\x5', '\x93', 'J', '\x2', '\x15F', '\x160', - '\x5', '\x93', 'J', '\x2', '\x160', '\x161', '\x5', '\xAD', 'W', '\x2', - '\x161', '\x162', '\x5', '\x91', 'I', '\x2', '\x162', '\x163', '\x5', - '\xAF', 'X', '\x2', '\x163', '`', '\x3', '\x2', '\x2', '\x2', '\x164', - '\x165', '\x5', '\xA5', 'S', '\x2', '\x165', '\x166', '\x5', '\xAB', 'V', - '\x2', '\x166', '\x62', '\x3', '\x2', '\x2', '\x2', '\x167', '\x168', - '\x5', '\xA5', 'S', '\x2', '\x168', '\x169', '\x5', '\xAB', 'V', '\x2', - '\x169', '\x16A', '\x5', '\x8F', 'H', '\x2', '\x16A', '\x16B', '\x5', - '\x91', 'I', '\x2', '\x16B', '\x16C', '\x5', '\xAB', 'V', '\x2', '\x16C', - '\x64', '\x3', '\x2', '\x2', '\x2', '\x16D', '\x16E', '\x5', '\xAD', 'W', - '\x2', '\x16E', '\x16F', '\x5', '\x91', 'I', '\x2', '\x16F', '\x170', - '\x5', '\x9F', 'P', '\x2', '\x170', '\x171', '\x5', '\x91', 'I', '\x2', - '\x171', '\x172', '\x5', '\x8D', 'G', '\x2', '\x172', '\x173', '\x5', - '\xAF', 'X', '\x2', '\x173', '\x66', '\x3', '\x2', '\x2', '\x2', '\x174', - '\x175', '\x5', '\xAF', 'X', '\x2', '\x175', '\x176', '\x5', '\xA5', 'S', - '\x2', '\x176', '\x177', '\x5', '\xA7', 'T', '\x2', '\x177', 'h', '\x3', - '\x2', '\x2', '\x2', '\x178', '\x179', '\a', 'v', '\x2', '\x2', '\x179', - '\x17A', '\a', 't', '\x2', '\x2', '\x17A', '\x17B', '\a', 'w', '\x2', - '\x2', '\x17B', '\x17C', '\a', 'g', '\x2', '\x2', '\x17C', 'j', '\x3', - '\x2', '\x2', '\x2', '\x17D', '\x17E', '\a', 'w', '\x2', '\x2', '\x17E', - '\x17F', '\a', '\x66', '\x2', '\x2', '\x17F', '\x180', '\a', 'h', '\x2', - '\x2', '\x180', 'l', '\x3', '\x2', '\x2', '\x2', '\x181', '\x182', '\a', - 'w', '\x2', '\x2', '\x182', '\x183', '\a', 'p', '\x2', '\x2', '\x183', - '\x184', '\a', '\x66', '\x2', '\x2', '\x184', '\x185', '\a', 'g', '\x2', - '\x2', '\x185', '\x186', '\a', 'h', '\x2', '\x2', '\x186', '\x187', '\a', - 'k', '\x2', '\x2', '\x187', '\x188', '\a', 'p', '\x2', '\x2', '\x188', - '\x189', '\a', 'g', '\x2', '\x2', '\x189', '\x18A', '\a', '\x66', '\x2', - '\x2', '\x18A', 'n', '\x3', '\x2', '\x2', '\x2', '\x18B', '\x18C', '\x5', - '\xB3', 'Z', '\x2', '\x18C', '\x18D', '\x5', '\x89', '\x45', '\x2', '\x18D', - '\x18E', '\x5', '\x9F', 'P', '\x2', '\x18E', '\x18F', '\x5', '\xB1', 'Y', - '\x2', '\x18F', '\x190', '\x5', '\x91', 'I', '\x2', '\x190', 'p', '\x3', - '\x2', '\x2', '\x2', '\x191', '\x192', '\x5', '\xB5', '[', '\x2', '\x192', - '\x193', '\x5', '\x97', 'L', '\x2', '\x193', '\x194', '\x5', '\x91', 'I', - '\x2', '\x194', '\x195', '\x5', '\xAB', 'V', '\x2', '\x195', '\x196', - '\x5', '\x91', 'I', '\x2', '\x196', 'r', '\x3', '\x2', '\x2', '\x2', '\x197', - '\x199', '\t', '\x2', '\x2', '\x2', '\x198', '\x197', '\x3', '\x2', '\x2', - '\x2', '\x199', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x19A', '\x198', - '\x3', '\x2', '\x2', '\x2', '\x19A', '\x19B', '\x3', '\x2', '\x2', '\x2', - '\x19B', '\x19C', '\x3', '\x2', '\x2', '\x2', '\x19C', '\x19D', '\b', - ':', '\x2', '\x2', '\x19D', 't', '\x3', '\x2', '\x2', '\x2', '\x19E', - '\x1A0', '\t', '\x3', '\x2', '\x2', '\x19F', '\x19E', '\x3', '\x2', '\x2', - '\x2', '\x19F', '\x1A0', '\x3', '\x2', '\x2', '\x2', '\x1A0', '\x1A2', - '\x3', '\x2', '\x2', '\x2', '\x1A1', '\x1A3', '\x5', '\x87', '\x44', '\x2', - '\x1A2', '\x1A1', '\x3', '\x2', '\x2', '\x2', '\x1A3', '\x1A4', '\x3', - '\x2', '\x2', '\x2', '\x1A4', '\x1A2', '\x3', '\x2', '\x2', '\x2', '\x1A4', - '\x1A5', '\x3', '\x2', '\x2', '\x2', '\x1A5', '\x1AD', '\x3', '\x2', '\x2', - '\x2', '\x1A6', '\x1AA', '\a', '\x30', '\x2', '\x2', '\x1A7', '\x1A9', - '\x5', '\x87', '\x44', '\x2', '\x1A8', '\x1A7', '\x3', '\x2', '\x2', '\x2', - '\x1A9', '\x1AC', '\x3', '\x2', '\x2', '\x2', '\x1AA', '\x1A8', '\x3', - '\x2', '\x2', '\x2', '\x1AA', '\x1AB', '\x3', '\x2', '\x2', '\x2', '\x1AB', - '\x1AE', '\x3', '\x2', '\x2', '\x2', '\x1AC', '\x1AA', '\x3', '\x2', '\x2', - '\x2', '\x1AD', '\x1A6', '\x3', '\x2', '\x2', '\x2', '\x1AD', '\x1AE', - '\x3', '\x2', '\x2', '\x2', '\x1AE', '\x1B8', '\x3', '\x2', '\x2', '\x2', - '\x1AF', '\x1B1', '\x5', '\x91', 'I', '\x2', '\x1B0', '\x1B2', '\t', '\x3', - '\x2', '\x2', '\x1B1', '\x1B0', '\x3', '\x2', '\x2', '\x2', '\x1B1', '\x1B2', - '\x3', '\x2', '\x2', '\x2', '\x1B2', '\x1B4', '\x3', '\x2', '\x2', '\x2', - '\x1B3', '\x1B5', '\x5', '\x87', '\x44', '\x2', '\x1B4', '\x1B3', '\x3', - '\x2', '\x2', '\x2', '\x1B5', '\x1B6', '\x3', '\x2', '\x2', '\x2', '\x1B6', - '\x1B4', '\x3', '\x2', '\x2', '\x2', '\x1B6', '\x1B7', '\x3', '\x2', '\x2', - '\x2', '\x1B7', '\x1B9', '\x3', '\x2', '\x2', '\x2', '\x1B8', '\x1AF', - '\x3', '\x2', '\x2', '\x2', '\x1B8', '\x1B9', '\x3', '\x2', '\x2', '\x2', - '\x1B9', '\x1CF', '\x3', '\x2', '\x2', '\x2', '\x1BA', '\x1BC', '\t', - '\x3', '\x2', '\x2', '\x1BB', '\x1BA', '\x3', '\x2', '\x2', '\x2', '\x1BB', - '\x1BC', '\x3', '\x2', '\x2', '\x2', '\x1BC', '\x1BD', '\x3', '\x2', '\x2', - '\x2', '\x1BD', '\x1BF', '\a', '\x30', '\x2', '\x2', '\x1BE', '\x1C0', - '\x5', '\x87', '\x44', '\x2', '\x1BF', '\x1BE', '\x3', '\x2', '\x2', '\x2', - '\x1C0', '\x1C1', '\x3', '\x2', '\x2', '\x2', '\x1C1', '\x1BF', '\x3', - '\x2', '\x2', '\x2', '\x1C1', '\x1C2', '\x3', '\x2', '\x2', '\x2', '\x1C2', - '\x1CC', '\x3', '\x2', '\x2', '\x2', '\x1C3', '\x1C5', '\x5', '\x91', - 'I', '\x2', '\x1C4', '\x1C6', '\t', '\x3', '\x2', '\x2', '\x1C5', '\x1C4', - '\x3', '\x2', '\x2', '\x2', '\x1C5', '\x1C6', '\x3', '\x2', '\x2', '\x2', - '\x1C6', '\x1C8', '\x3', '\x2', '\x2', '\x2', '\x1C7', '\x1C9', '\x5', - '\x87', '\x44', '\x2', '\x1C8', '\x1C7', '\x3', '\x2', '\x2', '\x2', '\x1C9', - '\x1CA', '\x3', '\x2', '\x2', '\x2', '\x1CA', '\x1C8', '\x3', '\x2', '\x2', - '\x2', '\x1CA', '\x1CB', '\x3', '\x2', '\x2', '\x2', '\x1CB', '\x1CD', - '\x3', '\x2', '\x2', '\x2', '\x1CC', '\x1C3', '\x3', '\x2', '\x2', '\x2', - '\x1CC', '\x1CD', '\x3', '\x2', '\x2', '\x2', '\x1CD', '\x1CF', '\x3', - '\x2', '\x2', '\x2', '\x1CE', '\x19F', '\x3', '\x2', '\x2', '\x2', '\x1CE', - '\x1BB', '\x3', '\x2', '\x2', '\x2', '\x1CF', 'v', '\x3', '\x2', '\x2', - '\x2', '\x1D0', '\x1D5', '\a', '$', '\x2', '\x2', '\x1D1', '\x1D4', '\x5', - 'y', '=', '\x2', '\x1D2', '\x1D4', '\x5', '\x81', '\x41', '\x2', '\x1D3', - '\x1D1', '\x3', '\x2', '\x2', '\x2', '\x1D3', '\x1D2', '\x3', '\x2', '\x2', - '\x2', '\x1D4', '\x1D7', '\x3', '\x2', '\x2', '\x2', '\x1D5', '\x1D3', - '\x3', '\x2', '\x2', '\x2', '\x1D5', '\x1D6', '\x3', '\x2', '\x2', '\x2', - '\x1D6', '\x1D8', '\x3', '\x2', '\x2', '\x2', '\x1D7', '\x1D5', '\x3', - '\x2', '\x2', '\x2', '\x1D8', '\x1E3', '\a', '$', '\x2', '\x2', '\x1D9', - '\x1DE', '\a', ')', '\x2', '\x2', '\x1DA', '\x1DD', '\x5', 'y', '=', '\x2', - '\x1DB', '\x1DD', '\x5', '\x7F', '@', '\x2', '\x1DC', '\x1DA', '\x3', - '\x2', '\x2', '\x2', '\x1DC', '\x1DB', '\x3', '\x2', '\x2', '\x2', '\x1DD', - '\x1E0', '\x3', '\x2', '\x2', '\x2', '\x1DE', '\x1DC', '\x3', '\x2', '\x2', - '\x2', '\x1DE', '\x1DF', '\x3', '\x2', '\x2', '\x2', '\x1DF', '\x1E1', - '\x3', '\x2', '\x2', '\x2', '\x1E0', '\x1DE', '\x3', '\x2', '\x2', '\x2', - '\x1E1', '\x1E3', '\a', ')', '\x2', '\x2', '\x1E2', '\x1D0', '\x3', '\x2', - '\x2', '\x2', '\x1E2', '\x1D9', '\x3', '\x2', '\x2', '\x2', '\x1E3', 'x', - '\x3', '\x2', '\x2', '\x2', '\x1E4', '\x1E7', '\a', '^', '\x2', '\x2', - '\x1E5', '\x1E8', '\t', '\x4', '\x2', '\x2', '\x1E6', '\x1E8', '\x5', - '{', '>', '\x2', '\x1E7', '\x1E5', '\x3', '\x2', '\x2', '\x2', '\x1E7', - '\x1E6', '\x3', '\x2', '\x2', '\x2', '\x1E8', 'z', '\x3', '\x2', '\x2', - '\x2', '\x1E9', '\x1EA', '\a', 'w', '\x2', '\x2', '\x1EA', '\x1EB', '\x5', - '}', '?', '\x2', '\x1EB', '\x1EC', '\x5', '}', '?', '\x2', '\x1EC', '\x1ED', - '\x5', '}', '?', '\x2', '\x1ED', '\x1EE', '\x5', '}', '?', '\x2', '\x1EE', - '|', '\x3', '\x2', '\x2', '\x2', '\x1EF', '\x1F0', '\t', '\x5', '\x2', - '\x2', '\x1F0', '~', '\x3', '\x2', '\x2', '\x2', '\x1F1', '\x1F2', '\n', - '\x6', '\x2', '\x2', '\x1F2', '\x80', '\x3', '\x2', '\x2', '\x2', '\x1F3', - '\x1F4', '\n', '\a', '\x2', '\x2', '\x1F4', '\x82', '\x3', '\x2', '\x2', - '\x2', '\x1F5', '\x1FF', '\x3', '\x2', '\x2', '\x2', '\x1F6', '\x1FB', - '\t', '\b', '\x2', '\x2', '\x1F7', '\x1FA', '\t', '\b', '\x2', '\x2', - '\x1F8', '\x1FA', '\x5', '\x87', '\x44', '\x2', '\x1F9', '\x1F7', '\x3', - '\x2', '\x2', '\x2', '\x1F9', '\x1F8', '\x3', '\x2', '\x2', '\x2', '\x1FA', - '\x1FD', '\x3', '\x2', '\x2', '\x2', '\x1FB', '\x1F9', '\x3', '\x2', '\x2', - '\x2', '\x1FB', '\x1FC', '\x3', '\x2', '\x2', '\x2', '\x1FC', '\x1FF', - '\x3', '\x2', '\x2', '\x2', '\x1FD', '\x1FB', '\x3', '\x2', '\x2', '\x2', - '\x1FE', '\x1F5', '\x3', '\x2', '\x2', '\x2', '\x1FE', '\x1F6', '\x3', - '\x2', '\x2', '\x2', '\x1FF', '\x84', '\x3', '\x2', '\x2', '\x2', '\x200', - '\x201', '\a', '\x42', '\x2', '\x2', '\x201', '\x202', '\x5', '\x83', - '\x42', '\x2', '\x202', '\x86', '\x3', '\x2', '\x2', '\x2', '\x203', '\x204', - '\t', '\t', '\x2', '\x2', '\x204', '\x88', '\x3', '\x2', '\x2', '\x2', - '\x205', '\x206', '\t', '\n', '\x2', '\x2', '\x206', '\x8A', '\x3', '\x2', - '\x2', '\x2', '\x207', '\x208', '\t', '\v', '\x2', '\x2', '\x208', '\x8C', - '\x3', '\x2', '\x2', '\x2', '\x209', '\x20A', '\t', '\f', '\x2', '\x2', - '\x20A', '\x8E', '\x3', '\x2', '\x2', '\x2', '\x20B', '\x20C', '\t', '\r', - '\x2', '\x2', '\x20C', '\x90', '\x3', '\x2', '\x2', '\x2', '\x20D', '\x20E', - '\t', '\xE', '\x2', '\x2', '\x20E', '\x92', '\x3', '\x2', '\x2', '\x2', - '\x20F', '\x210', '\t', '\xF', '\x2', '\x2', '\x210', '\x94', '\x3', '\x2', - '\x2', '\x2', '\x211', '\x212', '\t', '\x10', '\x2', '\x2', '\x212', '\x96', - '\x3', '\x2', '\x2', '\x2', '\x213', '\x214', '\t', '\x11', '\x2', '\x2', - '\x214', '\x98', '\x3', '\x2', '\x2', '\x2', '\x215', '\x216', '\t', '\x12', - '\x2', '\x2', '\x216', '\x9A', '\x3', '\x2', '\x2', '\x2', '\x217', '\x218', - '\t', '\x13', '\x2', '\x2', '\x218', '\x9C', '\x3', '\x2', '\x2', '\x2', - '\x219', '\x21A', '\t', '\x14', '\x2', '\x2', '\x21A', '\x9E', '\x3', - '\x2', '\x2', '\x2', '\x21B', '\x21C', '\t', '\x15', '\x2', '\x2', '\x21C', - '\xA0', '\x3', '\x2', '\x2', '\x2', '\x21D', '\x21E', '\t', '\x16', '\x2', - '\x2', '\x21E', '\xA2', '\x3', '\x2', '\x2', '\x2', '\x21F', '\x220', - '\t', '\x17', '\x2', '\x2', '\x220', '\xA4', '\x3', '\x2', '\x2', '\x2', - '\x221', '\x222', '\t', '\x18', '\x2', '\x2', '\x222', '\xA6', '\x3', - '\x2', '\x2', '\x2', '\x223', '\x224', '\t', '\x19', '\x2', '\x2', '\x224', - '\xA8', '\x3', '\x2', '\x2', '\x2', '\x225', '\x226', '\t', '\x1A', '\x2', - '\x2', '\x226', '\xAA', '\x3', '\x2', '\x2', '\x2', '\x227', '\x228', - '\t', '\x1B', '\x2', '\x2', '\x228', '\xAC', '\x3', '\x2', '\x2', '\x2', - '\x229', '\x22A', '\t', '\x1C', '\x2', '\x2', '\x22A', '\xAE', '\x3', - '\x2', '\x2', '\x2', '\x22B', '\x22C', '\t', '\x1D', '\x2', '\x2', '\x22C', - '\xB0', '\x3', '\x2', '\x2', '\x2', '\x22D', '\x22E', '\t', '\x1E', '\x2', - '\x2', '\x22E', '\xB2', '\x3', '\x2', '\x2', '\x2', '\x22F', '\x230', - '\t', '\x1F', '\x2', '\x2', '\x230', '\xB4', '\x3', '\x2', '\x2', '\x2', - '\x231', '\x232', '\t', ' ', '\x2', '\x2', '\x232', '\xB6', '\x3', '\x2', - '\x2', '\x2', '\x233', '\x234', '\t', '!', '\x2', '\x2', '\x234', '\xB8', - '\x3', '\x2', '\x2', '\x2', '\x235', '\x236', '\t', '\"', '\x2', '\x2', - '\x236', '\xBA', '\x3', '\x2', '\x2', '\x2', '\x237', '\x238', '\t', '#', - '\x2', '\x2', '\x238', '\xBC', '\x3', '\x2', '\x2', '\x2', '\x1A', '\x2', - '\x19A', '\x19F', '\x1A4', '\x1AA', '\x1AD', '\x1B1', '\x1B6', '\x1B8', - '\x1BB', '\x1C1', '\x1C5', '\x1CA', '\x1CC', '\x1CE', '\x1D3', '\x1D5', - '\x1DC', '\x1DE', '\x1E2', '\x1E7', '\x1F9', '\x1FB', '\x1FE', '\x3', - '\b', '\x2', '\x2', + '\x3', '\\', '\x3', ']', '\x3', ']', '\x3', '^', '\x3', '^', '\x3', '_', + '\x3', '_', '\x3', '`', '\x3', '`', '\x3', '\x61', '\x3', '\x61', '\x2', + '\x2', '\x62', '\x3', '\x3', '\x5', '\x4', '\a', '\x5', '\t', '\x6', '\v', + '\a', '\r', '\b', '\xF', '\t', '\x11', '\n', '\x13', '\v', '\x15', '\f', + '\x17', '\r', '\x19', '\xE', '\x1B', '\xF', '\x1D', '\x10', '\x1F', '\x11', + '!', '\x12', '#', '\x13', '%', '\x14', '\'', '\x15', ')', '\x16', '+', + '\x17', '-', '\x18', '/', '\x19', '\x31', '\x1A', '\x33', '\x1B', '\x35', + '\x1C', '\x37', '\x1D', '\x39', '\x1E', ';', '\x1F', '=', ' ', '?', '!', + '\x41', '\"', '\x43', '#', '\x45', '$', 'G', '%', 'I', '&', 'K', '\'', + 'M', '(', 'O', ')', 'Q', '*', 'S', '+', 'U', ',', 'W', '-', 'Y', '.', + '[', '/', ']', '\x30', '_', '\x31', '\x61', '\x32', '\x63', '\x33', '\x65', + '\x34', 'g', '\x35', 'i', '\x36', 'k', '\x37', 'm', '\x38', 'o', '\x39', + 'q', ':', 's', ';', 'u', '<', 'w', '=', 'y', '>', '{', '?', '}', '@', + '\x7F', '\x2', '\x81', '\x2', '\x83', '\x2', '\x85', '\x2', '\x87', '\x2', + '\x89', '\x41', '\x8B', '\x42', '\x8D', '\x2', '\x8F', '\x2', '\x91', + '\x2', '\x93', '\x2', '\x95', '\x2', '\x97', '\x2', '\x99', '\x2', '\x9B', + '\x2', '\x9D', '\x2', '\x9F', '\x2', '\xA1', '\x2', '\xA3', '\x2', '\xA5', + '\x2', '\xA7', '\x2', '\xA9', '\x2', '\xAB', '\x2', '\xAD', '\x2', '\xAF', + '\x2', '\xB1', '\x2', '\xB3', '\x2', '\xB5', '\x2', '\xB7', '\x2', '\xB9', + '\x2', '\xBB', '\x2', '\xBD', '\x2', '\xBF', '\x2', '\xC1', '\x2', '\x3', + '\x2', '$', '\x5', '\x2', '\v', '\f', '\xF', '\xF', '\"', '\"', '\x4', + '\x2', '-', '-', '/', '/', '\n', '\x2', '$', '$', '\x31', '\x31', '^', + '^', '\x64', '\x64', 'h', 'h', 'p', 'p', 't', 't', 'v', 'v', '\x5', '\x2', + '\x32', ';', '\x43', 'H', '\x63', 'h', '\x5', '\x2', '\x2', '!', ')', + ')', '^', '^', '\x5', '\x2', '\x2', '!', '$', '$', '^', '^', '\x5', '\x2', + '\x43', '\\', '\x61', '\x61', '\x63', '|', '\x3', '\x2', '\x32', ';', + '\x4', '\x2', '\x43', '\x43', '\x63', '\x63', '\x4', '\x2', '\x44', '\x44', + '\x64', '\x64', '\x4', '\x2', '\x45', '\x45', '\x65', '\x65', '\x4', '\x2', + '\x46', '\x46', '\x66', '\x66', '\x4', '\x2', 'G', 'G', 'g', 'g', '\x4', + '\x2', 'H', 'H', 'h', 'h', '\x4', '\x2', 'I', 'I', 'i', 'i', '\x4', '\x2', + 'J', 'J', 'j', 'j', '\x4', '\x2', 'K', 'K', 'k', 'k', '\x4', '\x2', 'L', + 'L', 'l', 'l', '\x4', '\x2', 'M', 'M', 'm', 'm', '\x4', '\x2', 'N', 'N', + 'n', 'n', '\x4', '\x2', 'O', 'O', 'o', 'o', '\x4', '\x2', 'P', 'P', 'p', + 'p', '\x4', '\x2', 'Q', 'Q', 'q', 'q', '\x4', '\x2', 'R', 'R', 'r', 'r', + '\x4', '\x2', 'S', 'S', 's', 's', '\x4', '\x2', 'T', 'T', 't', 't', '\x4', + '\x2', 'U', 'U', 'u', 'u', '\x4', '\x2', 'V', 'V', 'v', 'v', '\x4', '\x2', + 'W', 'W', 'w', 'w', '\x4', '\x2', 'X', 'X', 'x', 'x', '\x4', '\x2', 'Y', + 'Y', 'y', 'y', '\x4', '\x2', 'Z', 'Z', 'z', 'z', '\x4', '\x2', '[', '[', + '{', '{', '\x4', '\x2', '\\', '\\', '|', '|', '\x2', '\x244', '\x2', '\x3', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x5', '\x3', '\x2', '\x2', '\x2', + '\x2', '\a', '\x3', '\x2', '\x2', '\x2', '\x2', '\t', '\x3', '\x2', '\x2', + '\x2', '\x2', '\v', '\x3', '\x2', '\x2', '\x2', '\x2', '\r', '\x3', '\x2', + '\x2', '\x2', '\x2', '\xF', '\x3', '\x2', '\x2', '\x2', '\x2', '\x11', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x13', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x15', '\x3', '\x2', '\x2', '\x2', '\x2', '\x17', '\x3', '\x2', + '\x2', '\x2', '\x2', '\x19', '\x3', '\x2', '\x2', '\x2', '\x2', '\x1B', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x1D', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x1F', '\x3', '\x2', '\x2', '\x2', '\x2', '!', '\x3', '\x2', '\x2', + '\x2', '\x2', '#', '\x3', '\x2', '\x2', '\x2', '\x2', '%', '\x3', '\x2', + '\x2', '\x2', '\x2', '\'', '\x3', '\x2', '\x2', '\x2', '\x2', ')', '\x3', + '\x2', '\x2', '\x2', '\x2', '+', '\x3', '\x2', '\x2', '\x2', '\x2', '-', + '\x3', '\x2', '\x2', '\x2', '\x2', '/', '\x3', '\x2', '\x2', '\x2', '\x2', + '\x31', '\x3', '\x2', '\x2', '\x2', '\x2', '\x33', '\x3', '\x2', '\x2', + '\x2', '\x2', '\x35', '\x3', '\x2', '\x2', '\x2', '\x2', '\x37', '\x3', + '\x2', '\x2', '\x2', '\x2', '\x39', '\x3', '\x2', '\x2', '\x2', '\x2', + ';', '\x3', '\x2', '\x2', '\x2', '\x2', '=', '\x3', '\x2', '\x2', '\x2', + '\x2', '?', '\x3', '\x2', '\x2', '\x2', '\x2', '\x41', '\x3', '\x2', '\x2', + '\x2', '\x2', '\x43', '\x3', '\x2', '\x2', '\x2', '\x2', '\x45', '\x3', + '\x2', '\x2', '\x2', '\x2', 'G', '\x3', '\x2', '\x2', '\x2', '\x2', 'I', + '\x3', '\x2', '\x2', '\x2', '\x2', 'K', '\x3', '\x2', '\x2', '\x2', '\x2', + 'M', '\x3', '\x2', '\x2', '\x2', '\x2', 'O', '\x3', '\x2', '\x2', '\x2', + '\x2', 'Q', '\x3', '\x2', '\x2', '\x2', '\x2', 'S', '\x3', '\x2', '\x2', + '\x2', '\x2', 'U', '\x3', '\x2', '\x2', '\x2', '\x2', 'W', '\x3', '\x2', + '\x2', '\x2', '\x2', 'Y', '\x3', '\x2', '\x2', '\x2', '\x2', '[', '\x3', + '\x2', '\x2', '\x2', '\x2', ']', '\x3', '\x2', '\x2', '\x2', '\x2', '_', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x61', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x63', '\x3', '\x2', '\x2', '\x2', '\x2', '\x65', '\x3', '\x2', + '\x2', '\x2', '\x2', 'g', '\x3', '\x2', '\x2', '\x2', '\x2', 'i', '\x3', + '\x2', '\x2', '\x2', '\x2', 'k', '\x3', '\x2', '\x2', '\x2', '\x2', 'm', + '\x3', '\x2', '\x2', '\x2', '\x2', 'o', '\x3', '\x2', '\x2', '\x2', '\x2', + 'q', '\x3', '\x2', '\x2', '\x2', '\x2', 's', '\x3', '\x2', '\x2', '\x2', + '\x2', 'u', '\x3', '\x2', '\x2', '\x2', '\x2', 'w', '\x3', '\x2', '\x2', + '\x2', '\x2', 'y', '\x3', '\x2', '\x2', '\x2', '\x2', '{', '\x3', '\x2', + '\x2', '\x2', '\x2', '}', '\x3', '\x2', '\x2', '\x2', '\x2', '\x89', '\x3', + '\x2', '\x2', '\x2', '\x2', '\x8B', '\x3', '\x2', '\x2', '\x2', '\x3', + '\xC3', '\x3', '\x2', '\x2', '\x2', '\x5', '\xC5', '\x3', '\x2', '\x2', + '\x2', '\a', '\xC7', '\x3', '\x2', '\x2', '\x2', '\t', '\xC9', '\x3', + '\x2', '\x2', '\x2', '\v', '\xCB', '\x3', '\x2', '\x2', '\x2', '\r', '\xCD', + '\x3', '\x2', '\x2', '\x2', '\xF', '\xCF', '\x3', '\x2', '\x2', '\x2', + '\x11', '\xD1', '\x3', '\x2', '\x2', '\x2', '\x13', '\xD3', '\x3', '\x2', + '\x2', '\x2', '\x15', '\xD5', '\x3', '\x2', '\x2', '\x2', '\x17', '\xD8', + '\x3', '\x2', '\x2', '\x2', '\x19', '\xDA', '\x3', '\x2', '\x2', '\x2', + '\x1B', '\xDC', '\x3', '\x2', '\x2', '\x2', '\x1D', '\xDE', '\x3', '\x2', + '\x2', '\x2', '\x1F', '\xE0', '\x3', '\x2', '\x2', '\x2', '!', '\xE2', + '\x3', '\x2', '\x2', '\x2', '#', '\xE4', '\x3', '\x2', '\x2', '\x2', '%', + '\xE7', '\x3', '\x2', '\x2', '\x2', '\'', '\xEA', '\x3', '\x2', '\x2', + '\x2', ')', '\xEC', '\x3', '\x2', '\x2', '\x2', '+', '\xEF', '\x3', '\x2', + '\x2', '\x2', '-', '\xF1', '\x3', '\x2', '\x2', '\x2', '/', '\xF3', '\x3', + '\x2', '\x2', '\x2', '\x31', '\xF5', '\x3', '\x2', '\x2', '\x2', '\x33', + '\xF8', '\x3', '\x2', '\x2', '\x2', '\x35', '\xFA', '\x3', '\x2', '\x2', + '\x2', '\x37', '\xFC', '\x3', '\x2', '\x2', '\x2', '\x39', '\xFE', '\x3', + '\x2', '\x2', '\x2', ';', '\x102', '\x3', '\x2', '\x2', '\x2', '=', '\x106', + '\x3', '\x2', '\x2', '\x2', '?', '\x10C', '\x3', '\x2', '\x2', '\x2', + '\x41', '\x10F', '\x3', '\x2', '\x2', '\x2', '\x43', '\x113', '\x3', '\x2', + '\x2', '\x2', '\x45', '\x11B', '\x3', '\x2', '\x2', '\x2', 'G', '\x11E', + '\x3', '\x2', '\x2', '\x2', 'I', '\x123', '\x3', '\x2', '\x2', '\x2', + 'K', '\x12C', '\x3', '\x2', '\x2', '\x2', 'M', '\x133', '\x3', '\x2', + '\x2', '\x2', 'O', '\x13A', '\x3', '\x2', '\x2', '\x2', 'Q', '\x140', + '\x3', '\x2', '\x2', '\x2', 'S', '\x145', '\x3', '\x2', '\x2', '\x2', + 'U', '\x14B', '\x3', '\x2', '\x2', '\x2', 'W', '\x14E', '\x3', '\x2', + '\x2', '\x2', 'Y', '\x153', '\x3', '\x2', '\x2', '\x2', '[', '\x158', + '\x3', '\x2', '\x2', '\x2', ']', '\x15D', '\x3', '\x2', '\x2', '\x2', + '_', '\x163', '\x3', '\x2', '\x2', '\x2', '\x61', '\x167', '\x3', '\x2', + '\x2', '\x2', '\x63', '\x16C', '\x3', '\x2', '\x2', '\x2', '\x65', '\x173', + '\x3', '\x2', '\x2', '\x2', 'g', '\x176', '\x3', '\x2', '\x2', '\x2', + 'i', '\x17C', '\x3', '\x2', '\x2', '\x2', 'k', '\x182', '\x3', '\x2', + '\x2', '\x2', 'm', '\x189', '\x3', '\x2', '\x2', '\x2', 'o', '\x18D', + '\x3', '\x2', '\x2', '\x2', 'q', '\x192', '\x3', '\x2', '\x2', '\x2', + 's', '\x196', '\x3', '\x2', '\x2', '\x2', 'u', '\x1A0', '\x3', '\x2', + '\x2', '\x2', 'w', '\x1A6', '\x3', '\x2', '\x2', '\x2', 'y', '\x1AD', + '\x3', '\x2', '\x2', '\x2', '{', '\x1E3', '\x3', '\x2', '\x2', '\x2', + '}', '\x1F7', '\x3', '\x2', '\x2', '\x2', '\x7F', '\x1F9', '\x3', '\x2', + '\x2', '\x2', '\x81', '\x1FE', '\x3', '\x2', '\x2', '\x2', '\x83', '\x204', + '\x3', '\x2', '\x2', '\x2', '\x85', '\x206', '\x3', '\x2', '\x2', '\x2', + '\x87', '\x208', '\x3', '\x2', '\x2', '\x2', '\x89', '\x213', '\x3', '\x2', + '\x2', '\x2', '\x8B', '\x215', '\x3', '\x2', '\x2', '\x2', '\x8D', '\x218', + '\x3', '\x2', '\x2', '\x2', '\x8F', '\x21A', '\x3', '\x2', '\x2', '\x2', + '\x91', '\x21C', '\x3', '\x2', '\x2', '\x2', '\x93', '\x21E', '\x3', '\x2', + '\x2', '\x2', '\x95', '\x220', '\x3', '\x2', '\x2', '\x2', '\x97', '\x222', + '\x3', '\x2', '\x2', '\x2', '\x99', '\x224', '\x3', '\x2', '\x2', '\x2', + '\x9B', '\x226', '\x3', '\x2', '\x2', '\x2', '\x9D', '\x228', '\x3', '\x2', + '\x2', '\x2', '\x9F', '\x22A', '\x3', '\x2', '\x2', '\x2', '\xA1', '\x22C', + '\x3', '\x2', '\x2', '\x2', '\xA3', '\x22E', '\x3', '\x2', '\x2', '\x2', + '\xA5', '\x230', '\x3', '\x2', '\x2', '\x2', '\xA7', '\x232', '\x3', '\x2', + '\x2', '\x2', '\xA9', '\x234', '\x3', '\x2', '\x2', '\x2', '\xAB', '\x236', + '\x3', '\x2', '\x2', '\x2', '\xAD', '\x238', '\x3', '\x2', '\x2', '\x2', + '\xAF', '\x23A', '\x3', '\x2', '\x2', '\x2', '\xB1', '\x23C', '\x3', '\x2', + '\x2', '\x2', '\xB3', '\x23E', '\x3', '\x2', '\x2', '\x2', '\xB5', '\x240', + '\x3', '\x2', '\x2', '\x2', '\xB7', '\x242', '\x3', '\x2', '\x2', '\x2', + '\xB9', '\x244', '\x3', '\x2', '\x2', '\x2', '\xBB', '\x246', '\x3', '\x2', + '\x2', '\x2', '\xBD', '\x248', '\x3', '\x2', '\x2', '\x2', '\xBF', '\x24A', + '\x3', '\x2', '\x2', '\x2', '\xC1', '\x24C', '\x3', '\x2', '\x2', '\x2', + '\xC3', '\xC4', '\a', ',', '\x2', '\x2', '\xC4', '\x4', '\x3', '\x2', + '\x2', '\x2', '\xC5', '\xC6', '\a', '.', '\x2', '\x2', '\xC6', '\x6', + '\x3', '\x2', '\x2', '\x2', '\xC7', '\xC8', '\a', '*', '\x2', '\x2', '\xC8', + '\b', '\x3', '\x2', '\x2', '\x2', '\xC9', '\xCA', '\a', '+', '\x2', '\x2', + '\xCA', '\n', '\x3', '\x2', '\x2', '\x2', '\xCB', '\xCC', '\a', '\x30', + '\x2', '\x2', '\xCC', '\f', '\x3', '\x2', '\x2', '\x2', '\xCD', '\xCE', + '\a', ']', '\x2', '\x2', '\xCE', '\xE', '\x3', '\x2', '\x2', '\x2', '\xCF', + '\xD0', '\a', '_', '\x2', '\x2', '\xD0', '\x10', '\x3', '\x2', '\x2', + '\x2', '\xD1', '\xD2', '\a', '\x41', '\x2', '\x2', '\xD2', '\x12', '\x3', + '\x2', '\x2', '\x2', '\xD3', '\xD4', '\a', '<', '\x2', '\x2', '\xD4', + '\x14', '\x3', '\x2', '\x2', '\x2', '\xD5', '\xD6', '\a', '\x41', '\x2', + '\x2', '\xD6', '\xD7', '\a', '\x41', '\x2', '\x2', '\xD7', '\x16', '\x3', + '\x2', '\x2', '\x2', '\xD8', '\xD9', '\a', '\x31', '\x2', '\x2', '\xD9', + '\x18', '\x3', '\x2', '\x2', '\x2', '\xDA', '\xDB', '\a', '\'', '\x2', + '\x2', '\xDB', '\x1A', '\x3', '\x2', '\x2', '\x2', '\xDC', '\xDD', '\a', + '-', '\x2', '\x2', '\xDD', '\x1C', '\x3', '\x2', '\x2', '\x2', '\xDE', + '\xDF', '\a', '/', '\x2', '\x2', '\xDF', '\x1E', '\x3', '\x2', '\x2', + '\x2', '\xE0', '\xE1', '\a', '>', '\x2', '\x2', '\xE1', ' ', '\x3', '\x2', + '\x2', '\x2', '\xE2', '\xE3', '\a', '@', '\x2', '\x2', '\xE3', '\"', '\x3', + '\x2', '\x2', '\x2', '\xE4', '\xE5', '\a', '@', '\x2', '\x2', '\xE5', + '\xE6', '\a', '?', '\x2', '\x2', '\xE6', '$', '\x3', '\x2', '\x2', '\x2', + '\xE7', '\xE8', '\a', '>', '\x2', '\x2', '\xE8', '\xE9', '\a', '?', '\x2', + '\x2', '\xE9', '&', '\x3', '\x2', '\x2', '\x2', '\xEA', '\xEB', '\a', + '?', '\x2', '\x2', '\xEB', '(', '\x3', '\x2', '\x2', '\x2', '\xEC', '\xED', + '\a', '#', '\x2', '\x2', '\xED', '\xEE', '\a', '?', '\x2', '\x2', '\xEE', + '*', '\x3', '\x2', '\x2', '\x2', '\xEF', '\xF0', '\a', '(', '\x2', '\x2', + '\xF0', ',', '\x3', '\x2', '\x2', '\x2', '\xF1', '\xF2', '\a', '`', '\x2', + '\x2', '\xF2', '.', '\x3', '\x2', '\x2', '\x2', '\xF3', '\xF4', '\a', + '~', '\x2', '\x2', '\xF4', '\x30', '\x3', '\x2', '\x2', '\x2', '\xF5', + '\xF6', '\a', '~', '\x2', '\x2', '\xF6', '\xF7', '\a', '~', '\x2', '\x2', + '\xF7', '\x32', '\x3', '\x2', '\x2', '\x2', '\xF8', '\xF9', '\a', '\x80', + '\x2', '\x2', '\xF9', '\x34', '\x3', '\x2', '\x2', '\x2', '\xFA', '\xFB', + '\a', '}', '\x2', '\x2', '\xFB', '\x36', '\x3', '\x2', '\x2', '\x2', '\xFC', + '\xFD', '\a', '\x7F', '\x2', '\x2', '\xFD', '\x38', '\x3', '\x2', '\x2', + '\x2', '\xFE', '\xFF', '\x5', '\x8F', 'H', '\x2', '\xFF', '\x100', '\x5', + '\xA5', 'S', '\x2', '\x100', '\x101', '\x5', '\xA5', 'S', '\x2', '\x101', + ':', '\x3', '\x2', '\x2', '\x2', '\x102', '\x103', '\x5', '\x8F', 'H', + '\x2', '\x103', '\x104', '\x5', '\xA9', 'U', '\x2', '\x104', '\x105', + '\x5', '\x95', 'K', '\x2', '\x105', '<', '\x3', '\x2', '\x2', '\x2', '\x106', + '\x107', '\x5', '\x8F', 'H', '\x2', '\x107', '\x108', '\x5', '\xB1', 'Y', + '\x2', '\x108', '\x109', '\x5', '\xB1', 'Y', '\x2', '\x109', '\x10A', + '\x5', '\x8F', 'H', '\x2', '\x10A', '\x10B', '\x5', '\xBF', '`', '\x2', + '\x10B', '>', '\x3', '\x2', '\x2', '\x2', '\x10C', '\x10D', '\x5', '\x8F', + 'H', '\x2', '\x10D', '\x10E', '\x5', '\xB3', 'Z', '\x2', '\x10E', '@', + '\x3', '\x2', '\x2', '\x2', '\x10F', '\x110', '\x5', '\x8F', 'H', '\x2', + '\x110', '\x111', '\x5', '\xB3', 'Z', '\x2', '\x111', '\x112', '\x5', + '\x93', 'J', '\x2', '\x112', '\x42', '\x3', '\x2', '\x2', '\x2', '\x113', + '\x114', '\x5', '\x91', 'I', '\x2', '\x114', '\x115', '\x5', '\x97', 'L', + '\x2', '\x115', '\x116', '\x5', '\xB5', '[', '\x2', '\x116', '\x117', + '\x5', '\xBB', '^', '\x2', '\x117', '\x118', '\x5', '\x97', 'L', '\x2', + '\x118', '\x119', '\x5', '\x97', 'L', '\x2', '\x119', '\x11A', '\x5', + '\xA9', 'U', '\x2', '\x11A', '\x44', '\x3', '\x2', '\x2', '\x2', '\x11B', + '\x11C', '\x5', '\x91', 'I', '\x2', '\x11C', '\x11D', '\x5', '\xBF', '`', + '\x2', '\x11D', '\x46', '\x3', '\x2', '\x2', '\x2', '\x11E', '\x11F', + '\x5', '\x95', 'K', '\x2', '\x11F', '\x120', '\x5', '\x97', 'L', '\x2', + '\x120', '\x121', '\x5', '\xB3', 'Z', '\x2', '\x121', '\x122', '\x5', + '\x93', 'J', '\x2', '\x122', 'H', '\x3', '\x2', '\x2', '\x2', '\x123', + '\x124', '\x5', '\x95', 'K', '\x2', '\x124', '\x125', '\x5', '\x9F', 'P', + '\x2', '\x125', '\x126', '\x5', '\xB3', 'Z', '\x2', '\x126', '\x127', + '\x5', '\xB5', '[', '\x2', '\x127', '\x128', '\x5', '\x9F', 'P', '\x2', + '\x128', '\x129', '\x5', '\xA9', 'U', '\x2', '\x129', '\x12A', '\x5', + '\x93', 'J', '\x2', '\x12A', '\x12B', '\x5', '\xB5', '[', '\x2', '\x12B', + 'J', '\x3', '\x2', '\x2', '\x2', '\x12C', '\x12D', '\x5', '\x97', 'L', + '\x2', '\x12D', '\x12E', '\x5', '\xB3', 'Z', '\x2', '\x12E', '\x12F', + '\x5', '\x93', 'J', '\x2', '\x12F', '\x130', '\x5', '\x8F', 'H', '\x2', + '\x130', '\x131', '\x5', '\xAD', 'W', '\x2', '\x131', '\x132', '\x5', + '\x97', 'L', '\x2', '\x132', 'L', '\x3', '\x2', '\x2', '\x2', '\x133', + '\x134', '\x5', '\x97', 'L', '\x2', '\x134', '\x135', '\x5', '\xBD', '_', + '\x2', '\x135', '\x136', '\x5', '\x9F', 'P', '\x2', '\x136', '\x137', + '\x5', '\xB3', 'Z', '\x2', '\x137', '\x138', '\x5', '\xB5', '[', '\x2', + '\x138', '\x139', '\x5', '\xB3', 'Z', '\x2', '\x139', 'N', '\x3', '\x2', + '\x2', '\x2', '\x13A', '\x13B', '\a', 'h', '\x2', '\x2', '\x13B', '\x13C', + '\a', '\x63', '\x2', '\x2', '\x13C', '\x13D', '\a', 'n', '\x2', '\x2', + '\x13D', '\x13E', '\a', 'u', '\x2', '\x2', '\x13E', '\x13F', '\a', 'g', + '\x2', '\x2', '\x13F', 'P', '\x3', '\x2', '\x2', '\x2', '\x140', '\x141', + '\x5', '\x99', 'M', '\x2', '\x141', '\x142', '\x5', '\xB1', 'Y', '\x2', + '\x142', '\x143', '\x5', '\xAB', 'V', '\x2', '\x143', '\x144', '\x5', + '\xA7', 'T', '\x2', '\x144', 'R', '\x3', '\x2', '\x2', '\x2', '\x145', + '\x146', '\x5', '\x9B', 'N', '\x2', '\x146', '\x147', '\x5', '\xB1', 'Y', + '\x2', '\x147', '\x148', '\x5', '\xAB', 'V', '\x2', '\x148', '\x149', + '\x5', '\xB7', '\\', '\x2', '\x149', '\x14A', '\x5', '\xAD', 'W', '\x2', + '\x14A', 'T', '\x3', '\x2', '\x2', '\x2', '\x14B', '\x14C', '\x5', '\x9F', + 'P', '\x2', '\x14C', '\x14D', '\x5', '\xA9', 'U', '\x2', '\x14D', 'V', + '\x3', '\x2', '\x2', '\x2', '\x14E', '\x14F', '\x5', '\xA1', 'Q', '\x2', + '\x14F', '\x150', '\x5', '\xAB', 'V', '\x2', '\x150', '\x151', '\x5', + '\x9F', 'P', '\x2', '\x151', '\x152', '\x5', '\xA9', 'U', '\x2', '\x152', + 'X', '\x3', '\x2', '\x2', '\x2', '\x153', '\x154', '\x5', '\xA5', 'S', + '\x2', '\x154', '\x155', '\x5', '\x97', 'L', '\x2', '\x155', '\x156', + '\x5', '\x99', 'M', '\x2', '\x156', '\x157', '\x5', '\xB5', '[', '\x2', + '\x157', 'Z', '\x3', '\x2', '\x2', '\x2', '\x158', '\x159', '\x5', '\xA5', + 'S', '\x2', '\x159', '\x15A', '\x5', '\x9F', 'P', '\x2', '\x15A', '\x15B', + '\x5', '\xA3', 'R', '\x2', '\x15B', '\x15C', '\x5', '\x97', 'L', '\x2', + '\x15C', '\\', '\x3', '\x2', '\x2', '\x2', '\x15D', '\x15E', '\x5', '\xA5', + 'S', '\x2', '\x15E', '\x15F', '\x5', '\x9F', 'P', '\x2', '\x15F', '\x160', + '\x5', '\xA7', 'T', '\x2', '\x160', '\x161', '\x5', '\x9F', 'P', '\x2', + '\x161', '\x162', '\x5', '\xB5', '[', '\x2', '\x162', '^', '\x3', '\x2', + '\x2', '\x2', '\x163', '\x164', '\x5', '\xA9', 'U', '\x2', '\x164', '\x165', + '\x5', '\xAB', 'V', '\x2', '\x165', '\x166', '\x5', '\xB5', '[', '\x2', + '\x166', '`', '\x3', '\x2', '\x2', '\x2', '\x167', '\x168', '\a', 'p', + '\x2', '\x2', '\x168', '\x169', '\a', 'w', '\x2', '\x2', '\x169', '\x16A', + '\a', 'n', '\x2', '\x2', '\x16A', '\x16B', '\a', 'n', '\x2', '\x2', '\x16B', + '\x62', '\x3', '\x2', '\x2', '\x2', '\x16C', '\x16D', '\x5', '\xAB', 'V', + '\x2', '\x16D', '\x16E', '\x5', '\x99', 'M', '\x2', '\x16E', '\x16F', + '\x5', '\x99', 'M', '\x2', '\x16F', '\x170', '\x5', '\xB3', 'Z', '\x2', + '\x170', '\x171', '\x5', '\x97', 'L', '\x2', '\x171', '\x172', '\x5', + '\xB5', '[', '\x2', '\x172', '\x64', '\x3', '\x2', '\x2', '\x2', '\x173', + '\x174', '\x5', '\xAB', 'V', '\x2', '\x174', '\x175', '\x5', '\xB1', 'Y', + '\x2', '\x175', '\x66', '\x3', '\x2', '\x2', '\x2', '\x176', '\x177', + '\x5', '\xAB', 'V', '\x2', '\x177', '\x178', '\x5', '\xB1', 'Y', '\x2', + '\x178', '\x179', '\x5', '\x95', 'K', '\x2', '\x179', '\x17A', '\x5', + '\x97', 'L', '\x2', '\x17A', '\x17B', '\x5', '\xB1', 'Y', '\x2', '\x17B', + 'h', '\x3', '\x2', '\x2', '\x2', '\x17C', '\x17D', '\x5', '\xB1', 'Y', + '\x2', '\x17D', '\x17E', '\x5', '\x9F', 'P', '\x2', '\x17E', '\x17F', + '\x5', '\x9B', 'N', '\x2', '\x17F', '\x180', '\x5', '\x9D', 'O', '\x2', + '\x180', '\x181', '\x5', '\xB5', '[', '\x2', '\x181', 'j', '\x3', '\x2', + '\x2', '\x2', '\x182', '\x183', '\x5', '\xB3', 'Z', '\x2', '\x183', '\x184', + '\x5', '\x97', 'L', '\x2', '\x184', '\x185', '\x5', '\xA5', 'S', '\x2', + '\x185', '\x186', '\x5', '\x97', 'L', '\x2', '\x186', '\x187', '\x5', + '\x93', 'J', '\x2', '\x187', '\x188', '\x5', '\xB5', '[', '\x2', '\x188', + 'l', '\x3', '\x2', '\x2', '\x2', '\x189', '\x18A', '\x5', '\xB5', '[', + '\x2', '\x18A', '\x18B', '\x5', '\xAB', 'V', '\x2', '\x18B', '\x18C', + '\x5', '\xAD', 'W', '\x2', '\x18C', 'n', '\x3', '\x2', '\x2', '\x2', '\x18D', + '\x18E', '\a', 'v', '\x2', '\x2', '\x18E', '\x18F', '\a', 't', '\x2', + '\x2', '\x18F', '\x190', '\a', 'w', '\x2', '\x2', '\x190', '\x191', '\a', + 'g', '\x2', '\x2', '\x191', 'p', '\x3', '\x2', '\x2', '\x2', '\x192', + '\x193', '\a', 'w', '\x2', '\x2', '\x193', '\x194', '\a', '\x66', '\x2', + '\x2', '\x194', '\x195', '\a', 'h', '\x2', '\x2', '\x195', 'r', '\x3', + '\x2', '\x2', '\x2', '\x196', '\x197', '\a', 'w', '\x2', '\x2', '\x197', + '\x198', '\a', 'p', '\x2', '\x2', '\x198', '\x199', '\a', '\x66', '\x2', + '\x2', '\x199', '\x19A', '\a', 'g', '\x2', '\x2', '\x19A', '\x19B', '\a', + 'h', '\x2', '\x2', '\x19B', '\x19C', '\a', 'k', '\x2', '\x2', '\x19C', + '\x19D', '\a', 'p', '\x2', '\x2', '\x19D', '\x19E', '\a', 'g', '\x2', + '\x2', '\x19E', '\x19F', '\a', '\x66', '\x2', '\x2', '\x19F', 't', '\x3', + '\x2', '\x2', '\x2', '\x1A0', '\x1A1', '\x5', '\xB9', ']', '\x2', '\x1A1', + '\x1A2', '\x5', '\x8F', 'H', '\x2', '\x1A2', '\x1A3', '\x5', '\xA5', 'S', + '\x2', '\x1A3', '\x1A4', '\x5', '\xB7', '\\', '\x2', '\x1A4', '\x1A5', + '\x5', '\x97', 'L', '\x2', '\x1A5', 'v', '\x3', '\x2', '\x2', '\x2', '\x1A6', + '\x1A7', '\x5', '\xBB', '^', '\x2', '\x1A7', '\x1A8', '\x5', '\x9D', 'O', + '\x2', '\x1A8', '\x1A9', '\x5', '\x97', 'L', '\x2', '\x1A9', '\x1AA', + '\x5', '\xB1', 'Y', '\x2', '\x1AA', '\x1AB', '\x5', '\x97', 'L', '\x2', + '\x1AB', 'x', '\x3', '\x2', '\x2', '\x2', '\x1AC', '\x1AE', '\t', '\x2', + '\x2', '\x2', '\x1AD', '\x1AC', '\x3', '\x2', '\x2', '\x2', '\x1AE', '\x1AF', + '\x3', '\x2', '\x2', '\x2', '\x1AF', '\x1AD', '\x3', '\x2', '\x2', '\x2', + '\x1AF', '\x1B0', '\x3', '\x2', '\x2', '\x2', '\x1B0', '\x1B1', '\x3', + '\x2', '\x2', '\x2', '\x1B1', '\x1B2', '\b', '=', '\x2', '\x2', '\x1B2', + 'z', '\x3', '\x2', '\x2', '\x2', '\x1B3', '\x1B5', '\t', '\x3', '\x2', + '\x2', '\x1B4', '\x1B3', '\x3', '\x2', '\x2', '\x2', '\x1B4', '\x1B5', + '\x3', '\x2', '\x2', '\x2', '\x1B5', '\x1B7', '\x3', '\x2', '\x2', '\x2', + '\x1B6', '\x1B8', '\x5', '\x8D', 'G', '\x2', '\x1B7', '\x1B6', '\x3', + '\x2', '\x2', '\x2', '\x1B8', '\x1B9', '\x3', '\x2', '\x2', '\x2', '\x1B9', + '\x1B7', '\x3', '\x2', '\x2', '\x2', '\x1B9', '\x1BA', '\x3', '\x2', '\x2', + '\x2', '\x1BA', '\x1C2', '\x3', '\x2', '\x2', '\x2', '\x1BB', '\x1BF', + '\a', '\x30', '\x2', '\x2', '\x1BC', '\x1BE', '\x5', '\x8D', 'G', '\x2', + '\x1BD', '\x1BC', '\x3', '\x2', '\x2', '\x2', '\x1BE', '\x1C1', '\x3', + '\x2', '\x2', '\x2', '\x1BF', '\x1BD', '\x3', '\x2', '\x2', '\x2', '\x1BF', + '\x1C0', '\x3', '\x2', '\x2', '\x2', '\x1C0', '\x1C3', '\x3', '\x2', '\x2', + '\x2', '\x1C1', '\x1BF', '\x3', '\x2', '\x2', '\x2', '\x1C2', '\x1BB', + '\x3', '\x2', '\x2', '\x2', '\x1C2', '\x1C3', '\x3', '\x2', '\x2', '\x2', + '\x1C3', '\x1CD', '\x3', '\x2', '\x2', '\x2', '\x1C4', '\x1C6', '\x5', + '\x97', 'L', '\x2', '\x1C5', '\x1C7', '\t', '\x3', '\x2', '\x2', '\x1C6', + '\x1C5', '\x3', '\x2', '\x2', '\x2', '\x1C6', '\x1C7', '\x3', '\x2', '\x2', + '\x2', '\x1C7', '\x1C9', '\x3', '\x2', '\x2', '\x2', '\x1C8', '\x1CA', + '\x5', '\x8D', 'G', '\x2', '\x1C9', '\x1C8', '\x3', '\x2', '\x2', '\x2', + '\x1CA', '\x1CB', '\x3', '\x2', '\x2', '\x2', '\x1CB', '\x1C9', '\x3', + '\x2', '\x2', '\x2', '\x1CB', '\x1CC', '\x3', '\x2', '\x2', '\x2', '\x1CC', + '\x1CE', '\x3', '\x2', '\x2', '\x2', '\x1CD', '\x1C4', '\x3', '\x2', '\x2', + '\x2', '\x1CD', '\x1CE', '\x3', '\x2', '\x2', '\x2', '\x1CE', '\x1E4', + '\x3', '\x2', '\x2', '\x2', '\x1CF', '\x1D1', '\t', '\x3', '\x2', '\x2', + '\x1D0', '\x1CF', '\x3', '\x2', '\x2', '\x2', '\x1D0', '\x1D1', '\x3', + '\x2', '\x2', '\x2', '\x1D1', '\x1D2', '\x3', '\x2', '\x2', '\x2', '\x1D2', + '\x1D4', '\a', '\x30', '\x2', '\x2', '\x1D3', '\x1D5', '\x5', '\x8D', + 'G', '\x2', '\x1D4', '\x1D3', '\x3', '\x2', '\x2', '\x2', '\x1D5', '\x1D6', + '\x3', '\x2', '\x2', '\x2', '\x1D6', '\x1D4', '\x3', '\x2', '\x2', '\x2', + '\x1D6', '\x1D7', '\x3', '\x2', '\x2', '\x2', '\x1D7', '\x1E1', '\x3', + '\x2', '\x2', '\x2', '\x1D8', '\x1DA', '\x5', '\x97', 'L', '\x2', '\x1D9', + '\x1DB', '\t', '\x3', '\x2', '\x2', '\x1DA', '\x1D9', '\x3', '\x2', '\x2', + '\x2', '\x1DA', '\x1DB', '\x3', '\x2', '\x2', '\x2', '\x1DB', '\x1DD', + '\x3', '\x2', '\x2', '\x2', '\x1DC', '\x1DE', '\x5', '\x8D', 'G', '\x2', + '\x1DD', '\x1DC', '\x3', '\x2', '\x2', '\x2', '\x1DE', '\x1DF', '\x3', + '\x2', '\x2', '\x2', '\x1DF', '\x1DD', '\x3', '\x2', '\x2', '\x2', '\x1DF', + '\x1E0', '\x3', '\x2', '\x2', '\x2', '\x1E0', '\x1E2', '\x3', '\x2', '\x2', + '\x2', '\x1E1', '\x1D8', '\x3', '\x2', '\x2', '\x2', '\x1E1', '\x1E2', + '\x3', '\x2', '\x2', '\x2', '\x1E2', '\x1E4', '\x3', '\x2', '\x2', '\x2', + '\x1E3', '\x1B4', '\x3', '\x2', '\x2', '\x2', '\x1E3', '\x1D0', '\x3', + '\x2', '\x2', '\x2', '\x1E4', '|', '\x3', '\x2', '\x2', '\x2', '\x1E5', + '\x1EA', '\a', '$', '\x2', '\x2', '\x1E6', '\x1E9', '\x5', '\x7F', '@', + '\x2', '\x1E7', '\x1E9', '\x5', '\x87', '\x44', '\x2', '\x1E8', '\x1E6', + '\x3', '\x2', '\x2', '\x2', '\x1E8', '\x1E7', '\x3', '\x2', '\x2', '\x2', + '\x1E9', '\x1EC', '\x3', '\x2', '\x2', '\x2', '\x1EA', '\x1E8', '\x3', + '\x2', '\x2', '\x2', '\x1EA', '\x1EB', '\x3', '\x2', '\x2', '\x2', '\x1EB', + '\x1ED', '\x3', '\x2', '\x2', '\x2', '\x1EC', '\x1EA', '\x3', '\x2', '\x2', + '\x2', '\x1ED', '\x1F8', '\a', '$', '\x2', '\x2', '\x1EE', '\x1F3', '\a', + ')', '\x2', '\x2', '\x1EF', '\x1F2', '\x5', '\x7F', '@', '\x2', '\x1F0', + '\x1F2', '\x5', '\x85', '\x43', '\x2', '\x1F1', '\x1EF', '\x3', '\x2', + '\x2', '\x2', '\x1F1', '\x1F0', '\x3', '\x2', '\x2', '\x2', '\x1F2', '\x1F5', + '\x3', '\x2', '\x2', '\x2', '\x1F3', '\x1F1', '\x3', '\x2', '\x2', '\x2', + '\x1F3', '\x1F4', '\x3', '\x2', '\x2', '\x2', '\x1F4', '\x1F6', '\x3', + '\x2', '\x2', '\x2', '\x1F5', '\x1F3', '\x3', '\x2', '\x2', '\x2', '\x1F6', + '\x1F8', '\a', ')', '\x2', '\x2', '\x1F7', '\x1E5', '\x3', '\x2', '\x2', + '\x2', '\x1F7', '\x1EE', '\x3', '\x2', '\x2', '\x2', '\x1F8', '~', '\x3', + '\x2', '\x2', '\x2', '\x1F9', '\x1FC', '\a', '^', '\x2', '\x2', '\x1FA', + '\x1FD', '\t', '\x4', '\x2', '\x2', '\x1FB', '\x1FD', '\x5', '\x81', '\x41', + '\x2', '\x1FC', '\x1FA', '\x3', '\x2', '\x2', '\x2', '\x1FC', '\x1FB', + '\x3', '\x2', '\x2', '\x2', '\x1FD', '\x80', '\x3', '\x2', '\x2', '\x2', + '\x1FE', '\x1FF', '\a', 'w', '\x2', '\x2', '\x1FF', '\x200', '\x5', '\x83', + '\x42', '\x2', '\x200', '\x201', '\x5', '\x83', '\x42', '\x2', '\x201', + '\x202', '\x5', '\x83', '\x42', '\x2', '\x202', '\x203', '\x5', '\x83', + '\x42', '\x2', '\x203', '\x82', '\x3', '\x2', '\x2', '\x2', '\x204', '\x205', + '\t', '\x5', '\x2', '\x2', '\x205', '\x84', '\x3', '\x2', '\x2', '\x2', + '\x206', '\x207', '\n', '\x6', '\x2', '\x2', '\x207', '\x86', '\x3', '\x2', + '\x2', '\x2', '\x208', '\x209', '\n', '\a', '\x2', '\x2', '\x209', '\x88', + '\x3', '\x2', '\x2', '\x2', '\x20A', '\x214', '\x3', '\x2', '\x2', '\x2', + '\x20B', '\x210', '\t', '\b', '\x2', '\x2', '\x20C', '\x20F', '\t', '\b', + '\x2', '\x2', '\x20D', '\x20F', '\x5', '\x8D', 'G', '\x2', '\x20E', '\x20C', + '\x3', '\x2', '\x2', '\x2', '\x20E', '\x20D', '\x3', '\x2', '\x2', '\x2', + '\x20F', '\x212', '\x3', '\x2', '\x2', '\x2', '\x210', '\x20E', '\x3', + '\x2', '\x2', '\x2', '\x210', '\x211', '\x3', '\x2', '\x2', '\x2', '\x211', + '\x214', '\x3', '\x2', '\x2', '\x2', '\x212', '\x210', '\x3', '\x2', '\x2', + '\x2', '\x213', '\x20A', '\x3', '\x2', '\x2', '\x2', '\x213', '\x20B', + '\x3', '\x2', '\x2', '\x2', '\x214', '\x8A', '\x3', '\x2', '\x2', '\x2', + '\x215', '\x216', '\a', '\x42', '\x2', '\x2', '\x216', '\x217', '\x5', + '\x89', '\x45', '\x2', '\x217', '\x8C', '\x3', '\x2', '\x2', '\x2', '\x218', + '\x219', '\t', '\t', '\x2', '\x2', '\x219', '\x8E', '\x3', '\x2', '\x2', + '\x2', '\x21A', '\x21B', '\t', '\n', '\x2', '\x2', '\x21B', '\x90', '\x3', + '\x2', '\x2', '\x2', '\x21C', '\x21D', '\t', '\v', '\x2', '\x2', '\x21D', + '\x92', '\x3', '\x2', '\x2', '\x2', '\x21E', '\x21F', '\t', '\f', '\x2', + '\x2', '\x21F', '\x94', '\x3', '\x2', '\x2', '\x2', '\x220', '\x221', + '\t', '\r', '\x2', '\x2', '\x221', '\x96', '\x3', '\x2', '\x2', '\x2', + '\x222', '\x223', '\t', '\xE', '\x2', '\x2', '\x223', '\x98', '\x3', '\x2', + '\x2', '\x2', '\x224', '\x225', '\t', '\xF', '\x2', '\x2', '\x225', '\x9A', + '\x3', '\x2', '\x2', '\x2', '\x226', '\x227', '\t', '\x10', '\x2', '\x2', + '\x227', '\x9C', '\x3', '\x2', '\x2', '\x2', '\x228', '\x229', '\t', '\x11', + '\x2', '\x2', '\x229', '\x9E', '\x3', '\x2', '\x2', '\x2', '\x22A', '\x22B', + '\t', '\x12', '\x2', '\x2', '\x22B', '\xA0', '\x3', '\x2', '\x2', '\x2', + '\x22C', '\x22D', '\t', '\x13', '\x2', '\x2', '\x22D', '\xA2', '\x3', + '\x2', '\x2', '\x2', '\x22E', '\x22F', '\t', '\x14', '\x2', '\x2', '\x22F', + '\xA4', '\x3', '\x2', '\x2', '\x2', '\x230', '\x231', '\t', '\x15', '\x2', + '\x2', '\x231', '\xA6', '\x3', '\x2', '\x2', '\x2', '\x232', '\x233', + '\t', '\x16', '\x2', '\x2', '\x233', '\xA8', '\x3', '\x2', '\x2', '\x2', + '\x234', '\x235', '\t', '\x17', '\x2', '\x2', '\x235', '\xAA', '\x3', + '\x2', '\x2', '\x2', '\x236', '\x237', '\t', '\x18', '\x2', '\x2', '\x237', + '\xAC', '\x3', '\x2', '\x2', '\x2', '\x238', '\x239', '\t', '\x19', '\x2', + '\x2', '\x239', '\xAE', '\x3', '\x2', '\x2', '\x2', '\x23A', '\x23B', + '\t', '\x1A', '\x2', '\x2', '\x23B', '\xB0', '\x3', '\x2', '\x2', '\x2', + '\x23C', '\x23D', '\t', '\x1B', '\x2', '\x2', '\x23D', '\xB2', '\x3', + '\x2', '\x2', '\x2', '\x23E', '\x23F', '\t', '\x1C', '\x2', '\x2', '\x23F', + '\xB4', '\x3', '\x2', '\x2', '\x2', '\x240', '\x241', '\t', '\x1D', '\x2', + '\x2', '\x241', '\xB6', '\x3', '\x2', '\x2', '\x2', '\x242', '\x243', + '\t', '\x1E', '\x2', '\x2', '\x243', '\xB8', '\x3', '\x2', '\x2', '\x2', + '\x244', '\x245', '\t', '\x1F', '\x2', '\x2', '\x245', '\xBA', '\x3', + '\x2', '\x2', '\x2', '\x246', '\x247', '\t', ' ', '\x2', '\x2', '\x247', + '\xBC', '\x3', '\x2', '\x2', '\x2', '\x248', '\x249', '\t', '!', '\x2', + '\x2', '\x249', '\xBE', '\x3', '\x2', '\x2', '\x2', '\x24A', '\x24B', + '\t', '\"', '\x2', '\x2', '\x24B', '\xC0', '\x3', '\x2', '\x2', '\x2', + '\x24C', '\x24D', '\t', '#', '\x2', '\x2', '\x24D', '\xC2', '\x3', '\x2', + '\x2', '\x2', '\x1A', '\x2', '\x1AF', '\x1B4', '\x1B9', '\x1BF', '\x1C2', + '\x1C6', '\x1CB', '\x1CD', '\x1D0', '\x1D6', '\x1DA', '\x1DF', '\x1E1', + '\x1E3', '\x1E8', '\x1EA', '\x1F1', '\x1F3', '\x1F7', '\x1FC', '\x20E', + '\x210', '\x213', '\x3', '\b', '\x2', '\x2', }; public static readonly ATN _ATN = diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs index 5de50b9faa..53293f9382 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs @@ -38,12 +38,13 @@ public const int T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, - T__24=25, T__25=26, T__26=27, K_AND=28, K_ARRAY=29, K_AS=30, K_ASC=31, - K_BETWEEN=32, K_BY=33, K_DESC=34, K_DISTINCT=35, K_ESCAPE=36, K_EXISTS=37, - K_FALSE=38, K_FROM=39, K_GROUP=40, K_IN=41, K_JOIN=42, K_LIKE=43, K_LIMIT=44, - K_NOT=45, K_NULL=46, K_OFFSET=47, K_OR=48, K_ORDER=49, K_SELECT=50, K_TOP=51, - K_TRUE=52, K_UDF=53, K_UNDEFINED=54, K_VALUE=55, K_WHERE=56, WS=57, NUMERIC_LITERAL=58, - STRING_LITERAL=59, IDENTIFIER=60, PARAMETER=61; + T__24=25, T__25=26, T__26=27, K_ALL=28, K_AND=29, K_ARRAY=30, K_AS=31, + K_ASC=32, K_BETWEEN=33, K_BY=34, K_DESC=35, K_DISTINCT=36, K_ESCAPE=37, + K_EXISTS=38, K_FALSE=39, K_FROM=40, K_GROUP=41, K_IN=42, K_JOIN=43, K_LEFT=44, + K_LIKE=45, K_LIMIT=46, K_NOT=47, K_NULL=48, K_OFFSET=49, K_OR=50, K_ORDER=51, + K_RIGHT=52, K_SELECT=53, K_TOP=54, K_TRUE=55, K_UDF=56, K_UNDEFINED=57, + K_VALUE=58, K_WHERE=59, WS=60, NUMERIC_LITERAL=61, STRING_LITERAL=62, + LEX_IDENTIFIER=63, PARAMETER=64; public const int RULE_program = 0, RULE_sql_query = 1, RULE_select_clause = 2, RULE_top_spec = 3, RULE_selection = 4, RULE_select_star_spec = 5, RULE_select_value_spec = 6, @@ -58,8 +59,9 @@ public const int RULE_equality_operator = 31, RULE_bitwise_and_operator = 32, RULE_bitwise_exclusive_or_operator = 33, RULE_bitwise_inclusive_or_operator = 34, RULE_string_concat_operator = 35, RULE_unary_scalar_expression = 36, RULE_unary_operator = 37, RULE_primary_expression = 38, - RULE_scalar_expression_list = 39, RULE_object_property_list = 40, RULE_object_property = 41, - RULE_literal = 42; + RULE_function_call_scalar_expression = 39, RULE_scalar_expression_list = 40, + RULE_object_property_list = 41, RULE_object_property = 42, RULE_identifier = 43, + RULE_literal = 44; public static readonly string[] ruleNames = { "program", "sql_query", "select_clause", "top_spec", "selection", "select_star_spec", "select_value_spec", "select_list_spec", "select_item", "from_clause", @@ -70,27 +72,28 @@ public const int "escape_expression", "binary_scalar_expression", "multiplicative_operator", "additive_operator", "relational_operator", "equality_operator", "bitwise_and_operator", "bitwise_exclusive_or_operator", "bitwise_inclusive_or_operator", "string_concat_operator", - "unary_scalar_expression", "unary_operator", "primary_expression", "scalar_expression_list", - "object_property_list", "object_property", "literal" + "unary_scalar_expression", "unary_operator", "primary_expression", "function_call_scalar_expression", + "scalar_expression_list", "object_property_list", "object_property", "identifier", + "literal" }; private static readonly string[] _LiteralNames = { null, "'*'", "','", "'('", "')'", "'.'", "'['", "']'", "'?'", "':'", "'??'", "'/'", "'%'", "'+'", "'-'", "'<'", "'>'", "'>='", "'<='", "'='", "'!='", "'&'", "'^'", "'|'", "'||'", "'~'", "'{'", "'}'", null, null, null, null, - null, null, null, null, null, null, "'false'", null, null, null, null, - null, null, null, "'null'", null, null, null, null, null, "'true'", "'udf'", - "'undefined'" + null, null, null, null, null, null, null, "'false'", null, null, null, + null, null, null, null, null, "'null'", null, null, null, null, null, + null, "'true'", "'udf'", "'undefined'" }; private static readonly string[] _SymbolicNames = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, "K_AND", "K_ARRAY", "K_AS", "K_ASC", "K_BETWEEN", - "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", "K_FROM", - "K_GROUP", "K_IN", "K_JOIN", "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", "K_OFFSET", - "K_OR", "K_ORDER", "K_SELECT", "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", - "K_VALUE", "K_WHERE", "WS", "NUMERIC_LITERAL", "STRING_LITERAL", "IDENTIFIER", - "PARAMETER" + null, null, null, null, "K_ALL", "K_AND", "K_ARRAY", "K_AS", "K_ASC", + "K_BETWEEN", "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", + "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LEFT", "K_LIKE", "K_LIMIT", + "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", + "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", + "NUMERIC_LITERAL", "STRING_LITERAL", "LEX_IDENTIFIER", "PARAMETER" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -123,7 +126,6 @@ public sqlParser(ITokenStream input, TextWriter output, TextWriter errorOutput) { Interpreter = new ParserATNSimulator(this, _ATN, decisionToDFA, sharedContextCache); } - public partial class ProgramContext : ParserRuleContext { public Sql_queryContext sql_query() { return GetRuleContext(0); @@ -156,8 +158,8 @@ public ProgramContext program() { try { EnterOuterAlt(_localctx, 1); { - State = 86; sql_query(); - State = 87; Match(Eof); + State = 90; sql_query(); + State = 91; Match(Eof); } } catch (RecognitionException re) { @@ -218,49 +220,49 @@ public Sql_queryContext sql_query() { try { EnterOuterAlt(_localctx, 1); { - State = 89; select_clause(); - State = 91; + State = 93; select_clause(); + State = 95; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_FROM) { { - State = 90; from_clause(); + State = 94; from_clause(); } } - State = 94; + State = 98; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_WHERE) { { - State = 93; where_clause(); + State = 97; where_clause(); } } - State = 97; + State = 101; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_GROUP) { { - State = 96; group_by_clause(); + State = 100; group_by_clause(); } } - State = 100; + State = 104; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_ORDER) { { - State = 99; order_by_clause(); + State = 103; order_by_clause(); } } - State = 103; + State = 107; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_OFFSET) { { - State = 102; offset_limit_clause(); + State = 106; offset_limit_clause(); } } @@ -314,26 +316,26 @@ public Select_clauseContext select_clause() { try { EnterOuterAlt(_localctx, 1); { - State = 105; Match(K_SELECT); - State = 107; + State = 109; Match(K_SELECT); + State = 111; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_DISTINCT) { { - State = 106; Match(K_DISTINCT); + State = 110; Match(K_DISTINCT); } } - State = 110; + State = 114; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_TOP) { { - State = 109; top_spec(); + State = 113; top_spec(); } } - State = 112; selection(); + State = 116; selection(); } } catch (RecognitionException re) { @@ -379,8 +381,8 @@ public Top_specContext top_spec() { try { EnterOuterAlt(_localctx, 1); { - State = 114; Match(K_TOP); - State = 115; + State = 118; Match(K_TOP); + State = 119; _la = TokenStream.LA(1); if ( !(_la==NUMERIC_LITERAL || _la==PARAMETER) ) { ErrorHandler.RecoverInline(this); @@ -437,19 +439,19 @@ public SelectionContext selection() { SelectionContext _localctx = new SelectionContext(Context, State); EnterRule(_localctx, 8, RULE_selection); try { - State = 120; + State = 124; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case T__0: EnterOuterAlt(_localctx, 1); { - State = 117; select_star_spec(); + State = 121; select_star_spec(); } break; case K_VALUE: EnterOuterAlt(_localctx, 2); { - State = 118; select_value_spec(); + State = 122; select_value_spec(); } break; case T__2: @@ -458,21 +460,24 @@ public SelectionContext selection() { case T__13: case T__24: case T__25: + case K_ALL: case K_ARRAY: case K_EXISTS: case K_FALSE: + case K_LEFT: case K_NOT: case K_NULL: + case K_RIGHT: case K_TRUE: case K_UDF: case K_UNDEFINED: case NUMERIC_LITERAL: case STRING_LITERAL: - case IDENTIFIER: + case LEX_IDENTIFIER: case PARAMETER: EnterOuterAlt(_localctx, 3); { - State = 119; select_list_spec(); + State = 123; select_list_spec(); } break; default: @@ -518,7 +523,7 @@ public Select_star_specContext select_star_spec() { try { EnterOuterAlt(_localctx, 1); { - State = 122; Match(T__0); + State = 126; Match(T__0); } } catch (RecognitionException re) { @@ -564,8 +569,8 @@ public Select_value_specContext select_value_spec() { try { EnterOuterAlt(_localctx, 1); { - State = 124; Match(K_VALUE); - State = 125; scalar_expression(0); + State = 128; Match(K_VALUE); + State = 129; scalar_expression(0); } } catch (RecognitionException re) { @@ -614,18 +619,18 @@ public Select_list_specContext select_list_spec() { try { EnterOuterAlt(_localctx, 1); { - State = 127; select_item(); - State = 132; + State = 131; select_item(); + State = 136; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==T__1) { { { - State = 128; Match(T__1); - State = 129; select_item(); + State = 132; Match(T__1); + State = 133; select_item(); } } - State = 134; + State = 138; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -647,7 +652,9 @@ public Scalar_expressionContext scalar_expression() { return GetRuleContext(0); } public ITerminalNode K_AS() { return GetToken(sqlParser.K_AS, 0); } - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return GetRuleContext(0); + } public Select_itemContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -676,14 +683,14 @@ public Select_itemContext select_item() { try { EnterOuterAlt(_localctx, 1); { - State = 135; scalar_expression(0); - State = 138; + State = 139; scalar_expression(0); + State = 142; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_AS) { { - State = 136; Match(K_AS); - State = 137; Match(IDENTIFIER); + State = 140; Match(K_AS); + State = 141; identifier(); } } @@ -732,8 +739,8 @@ public From_clauseContext from_clause() { try { EnterOuterAlt(_localctx, 1); { - State = 140; Match(K_FROM); - State = 141; collection_expression(0); + State = 144; Match(K_FROM); + State = 145; collection_expression(0); } } catch (RecognitionException re) { @@ -786,7 +793,9 @@ public partial class AliasedCollectionExpressionContext : Collection_expressionC public CollectionContext collection() { return GetRuleContext(0); } - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return GetRuleContext(0); + } public ITerminalNode K_AS() { return GetToken(sqlParser.K_AS, 0); } public AliasedCollectionExpressionContext(Collection_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { @@ -804,7 +813,9 @@ public override TResult Accept(IParseTreeVisitor visitor) { } } public partial class ArrayIteratorCollectionExpressionContext : Collection_expressionContext { - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return GetRuleContext(0); + } public ITerminalNode K_IN() { return GetToken(sqlParser.K_IN, 0); } public CollectionContext collection() { return GetRuleContext(0); @@ -842,7 +853,7 @@ private Collection_expressionContext collection_expression(int _p) { int _alt; EnterOuterAlt(_localctx, 1); { - State = 154; + State = 159; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,12,Context) ) { case 1: @@ -851,22 +862,22 @@ private Collection_expressionContext collection_expression(int _p) { Context = _localctx; _prevctx = _localctx; - State = 144; collection(); - State = 149; + State = 148; collection(); + State = 153; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,11,Context) ) { case 1: { - State = 146; + State = 150; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_AS) { { - State = 145; Match(K_AS); + State = 149; Match(K_AS); } } - State = 148; Match(IDENTIFIER); + State = 152; identifier(); } break; } @@ -877,14 +888,14 @@ private Collection_expressionContext collection_expression(int _p) { _localctx = new ArrayIteratorCollectionExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 151; Match(IDENTIFIER); - State = 152; Match(K_IN); - State = 153; collection(); + State = 155; identifier(); + State = 156; Match(K_IN); + State = 157; collection(); } break; } Context.Stop = TokenStream.LT(-1); - State = 161; + State = 166; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,13,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { @@ -896,14 +907,14 @@ private Collection_expressionContext collection_expression(int _p) { { _localctx = new JoinCollectionExpressionContext(new Collection_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_collection_expression); - State = 156; + State = 161; if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)"); - State = 157; Match(K_JOIN); - State = 158; collection_expression(2); + State = 162; Match(K_JOIN); + State = 163; collection_expression(2); } } } - State = 163; + State = 168; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,13,Context); } @@ -933,7 +944,9 @@ public virtual void CopyFrom(CollectionContext context) { } } public partial class InputPathCollectionContext : CollectionContext { - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return GetRuleContext(0); + } public Path_expressionContext path_expression() { return GetRuleContext(0); } @@ -977,20 +990,21 @@ public CollectionContext collection() { CollectionContext _localctx = new CollectionContext(Context, State); EnterRule(_localctx, 22, RULE_collection); try { - State = 172; + State = 177; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { - case IDENTIFIER: + case K_ALL: + case LEX_IDENTIFIER: _localctx = new InputPathCollectionContext(_localctx); EnterOuterAlt(_localctx, 1); { - State = 164; Match(IDENTIFIER); - State = 166; + State = 169; identifier(); + State = 171; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,14,Context) ) { case 1: { - State = 165; path_expression(0); + State = 170; path_expression(0); } break; } @@ -1000,9 +1014,9 @@ public CollectionContext collection() { _localctx = new SubqueryCollectionContext(_localctx); EnterOuterAlt(_localctx, 2); { - State = 168; Match(T__2); - State = 169; sql_query(); - State = 170; Match(T__3); + State = 173; Match(T__2); + State = 174; sql_query(); + State = 175; Match(T__3); } break; default: @@ -1072,7 +1086,9 @@ public partial class IdentifierPathExpressionContext : Path_expressionContext { public Path_expressionContext path_expression() { return GetRuleContext(0); } - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return GetRuleContext(0); + } public IdentifierPathExpressionContext(Path_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; @@ -1132,7 +1148,7 @@ private Path_expressionContext path_expression(int _p) { } Context.Stop = TokenStream.LT(-1); - State = 188; + State = 193; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,17,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { @@ -1141,45 +1157,45 @@ private Path_expressionContext path_expression(int _p) { TriggerExitRuleEvent(); _prevctx = _localctx; { - State = 186; + State = 191; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,16,Context) ) { case 1: { _localctx = new IdentifierPathExpressionContext(new Path_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_path_expression); - State = 175; + State = 180; if (!(Precpred(Context, 4))) throw new FailedPredicateException(this, "Precpred(Context, 4)"); - State = 176; Match(T__4); - State = 177; Match(IDENTIFIER); + State = 181; Match(T__4); + State = 182; identifier(); } break; case 2: { _localctx = new NumberPathExpressionContext(new Path_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_path_expression); - State = 178; + State = 183; if (!(Precpred(Context, 3))) throw new FailedPredicateException(this, "Precpred(Context, 3)"); - State = 179; Match(T__5); - State = 180; Match(NUMERIC_LITERAL); - State = 181; Match(T__6); + State = 184; Match(T__5); + State = 185; Match(NUMERIC_LITERAL); + State = 186; Match(T__6); } break; case 3: { _localctx = new StringPathExpressionContext(new Path_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_path_expression); - State = 182; + State = 187; if (!(Precpred(Context, 2))) throw new FailedPredicateException(this, "Precpred(Context, 2)"); - State = 183; Match(T__5); - State = 184; Match(STRING_LITERAL); - State = 185; Match(T__6); + State = 188; Match(T__5); + State = 189; Match(STRING_LITERAL); + State = 190; Match(T__6); } break; } } } - State = 190; + State = 195; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,17,Context); } @@ -1228,8 +1244,8 @@ public Where_clauseContext where_clause() { try { EnterOuterAlt(_localctx, 1); { - State = 191; Match(K_WHERE); - State = 192; scalar_expression(0); + State = 196; Match(K_WHERE); + State = 197; scalar_expression(0); } } catch (RecognitionException re) { @@ -1276,9 +1292,9 @@ public Group_by_clauseContext group_by_clause() { try { EnterOuterAlt(_localctx, 1); { - State = 194; Match(K_GROUP); - State = 195; Match(K_BY); - State = 196; scalar_expression_list(); + State = 199; Match(K_GROUP); + State = 200; Match(K_BY); + State = 201; scalar_expression_list(); } } catch (RecognitionException re) { @@ -1325,9 +1341,9 @@ public Order_by_clauseContext order_by_clause() { try { EnterOuterAlt(_localctx, 1); { - State = 198; Match(K_ORDER); - State = 199; Match(K_BY); - State = 200; order_by_items(); + State = 203; Match(K_ORDER); + State = 204; Match(K_BY); + State = 205; order_by_items(); } } catch (RecognitionException re) { @@ -1376,18 +1392,18 @@ public Order_by_itemsContext order_by_items() { try { EnterOuterAlt(_localctx, 1); { - State = 202; order_by_item(); - State = 207; + State = 207; order_by_item(); + State = 212; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==T__1) { { { - State = 203; Match(T__1); - State = 204; order_by_item(); + State = 208; Match(T__1); + State = 209; order_by_item(); } } - State = 209; + State = 214; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -1439,13 +1455,13 @@ public Order_by_itemContext order_by_item() { try { EnterOuterAlt(_localctx, 1); { - State = 210; scalar_expression(0); - State = 212; + State = 215; scalar_expression(0); + State = 217; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_ASC || _la==K_DESC) { { - State = 211; sort_order(); + State = 216; sort_order(); } } @@ -1493,7 +1509,7 @@ public Sort_orderContext sort_order() { try { EnterOuterAlt(_localctx, 1); { - State = 214; + State = 219; _la = TokenStream.LA(1); if ( !(_la==K_ASC || _la==K_DESC) ) { ErrorHandler.RecoverInline(this); @@ -1551,10 +1567,10 @@ public Offset_limit_clauseContext offset_limit_clause() { try { EnterOuterAlt(_localctx, 1); { - State = 216; Match(K_OFFSET); - State = 217; offset_count(); - State = 218; Match(K_LIMIT); - State = 219; limit_count(); + State = 221; Match(K_OFFSET); + State = 222; offset_count(); + State = 223; Match(K_LIMIT); + State = 224; limit_count(); } } catch (RecognitionException re) { @@ -1599,7 +1615,7 @@ public Offset_countContext offset_count() { try { EnterOuterAlt(_localctx, 1); { - State = 221; + State = 226; _la = TokenStream.LA(1); if ( !(_la==NUMERIC_LITERAL || _la==PARAMETER) ) { ErrorHandler.RecoverInline(this); @@ -1652,7 +1668,7 @@ public Limit_countContext limit_count() { try { EnterOuterAlt(_localctx, 1); { - State = 223; + State = 228; _la = TokenStream.LA(1); if ( !(_la==NUMERIC_LITERAL || _la==PARAMETER) ) { ErrorHandler.RecoverInline(this); @@ -1792,7 +1808,7 @@ private Scalar_expressionContext scalar_expression(int _p) { int _alt; EnterOuterAlt(_localctx, 1); { - State = 236; + State = 241; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,21,Context) ) { case 1: @@ -1801,7 +1817,7 @@ private Scalar_expressionContext scalar_expression(int _p) { Context = _localctx; _prevctx = _localctx; - State = 226; logical_scalar_expression(0); + State = 231; logical_scalar_expression(0); } break; case 2: @@ -1809,25 +1825,25 @@ private Scalar_expressionContext scalar_expression(int _p) { _localctx = new BetweenScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 227; binary_scalar_expression(0); - State = 229; + State = 232; binary_scalar_expression(0); + State = 234; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_NOT) { { - State = 228; Match(K_NOT); + State = 233; Match(K_NOT); } } - State = 231; Match(K_BETWEEN); - State = 232; binary_scalar_expression(0); - State = 233; Match(K_AND); - State = 234; binary_scalar_expression(0); + State = 236; Match(K_BETWEEN); + State = 237; binary_scalar_expression(0); + State = 238; Match(K_AND); + State = 239; binary_scalar_expression(0); } break; } Context.Stop = TokenStream.LT(-1); - State = 249; + State = 254; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,23,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { @@ -1836,35 +1852,35 @@ private Scalar_expressionContext scalar_expression(int _p) { TriggerExitRuleEvent(); _prevctx = _localctx; { - State = 247; + State = 252; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,22,Context) ) { case 1: { _localctx = new ConditionalScalarExpressionContext(new Scalar_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_scalar_expression); - State = 238; + State = 243; if (!(Precpred(Context, 4))) throw new FailedPredicateException(this, "Precpred(Context, 4)"); - State = 239; Match(T__7); - State = 240; scalar_expression(0); - State = 241; Match(T__8); - State = 242; scalar_expression(5); + State = 244; Match(T__7); + State = 245; scalar_expression(0); + State = 246; Match(T__8); + State = 247; scalar_expression(5); } break; case 2: { _localctx = new CoalesceScalarExpressionContext(new Scalar_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_scalar_expression); - State = 244; + State = 249; if (!(Precpred(Context, 3))) throw new FailedPredicateException(this, "Precpred(Context, 3)"); - State = 245; Match(T__9); - State = 246; scalar_expression(4); + State = 250; Match(T__9); + State = 251; scalar_expression(4); } break; } } } - State = 251; + State = 256; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,23,Context); } @@ -1935,27 +1951,27 @@ private Logical_scalar_expressionContext logical_scalar_expression(int _p) { int _alt; EnterOuterAlt(_localctx, 1); { - State = 256; + State = 261; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,24,Context) ) { case 1: { - State = 253; binary_scalar_expression(0); + State = 258; binary_scalar_expression(0); } break; case 2: { - State = 254; in_scalar_expression(); + State = 259; in_scalar_expression(); } break; case 3: { - State = 255; like_scalar_expression(); + State = 260; like_scalar_expression(); } break; } Context.Stop = TokenStream.LT(-1); - State = 266; + State = 271; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,26,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { @@ -1964,33 +1980,33 @@ private Logical_scalar_expressionContext logical_scalar_expression(int _p) { TriggerExitRuleEvent(); _prevctx = _localctx; { - State = 264; + State = 269; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,25,Context) ) { case 1: { _localctx = new Logical_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_logical_scalar_expression); - State = 258; + State = 263; if (!(Precpred(Context, 2))) throw new FailedPredicateException(this, "Precpred(Context, 2)"); - State = 259; Match(K_AND); - State = 260; logical_scalar_expression(3); + State = 264; Match(K_AND); + State = 265; logical_scalar_expression(3); } break; case 2: { _localctx = new Logical_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_logical_scalar_expression); - State = 261; + State = 266; if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)"); - State = 262; Match(K_OR); - State = 263; logical_scalar_expression(2); + State = 267; Match(K_OR); + State = 268; logical_scalar_expression(2); } break; } } } - State = 268; + State = 273; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,26,Context); } @@ -2044,20 +2060,20 @@ public In_scalar_expressionContext in_scalar_expression() { try { EnterOuterAlt(_localctx, 1); { - State = 269; binary_scalar_expression(0); - State = 271; + State = 274; binary_scalar_expression(0); + State = 276; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_NOT) { { - State = 270; Match(K_NOT); + State = 275; Match(K_NOT); } } - State = 273; Match(K_IN); - State = 274; Match(T__2); - State = 275; scalar_expression_list(); - State = 276; Match(T__3); + State = 278; Match(K_IN); + State = 279; Match(T__2); + State = 280; scalar_expression_list(); + State = 281; Match(T__3); } } catch (RecognitionException re) { @@ -2111,24 +2127,24 @@ public Like_scalar_expressionContext like_scalar_expression() { try { EnterOuterAlt(_localctx, 1); { - State = 278; binary_scalar_expression(0); - State = 280; + State = 283; binary_scalar_expression(0); + State = 285; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_NOT) { { - State = 279; Match(K_NOT); + State = 284; Match(K_NOT); } } - State = 282; Match(K_LIKE); - State = 283; binary_scalar_expression(0); - State = 285; + State = 287; Match(K_LIKE); + State = 288; binary_scalar_expression(0); + State = 290; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,29,Context) ) { case 1: { - State = 284; escape_expression(); + State = 289; escape_expression(); } break; } @@ -2175,8 +2191,8 @@ public Escape_expressionContext escape_expression() { try { EnterOuterAlt(_localctx, 1); { - State = 287; Match(K_ESCAPE); - State = 288; Match(STRING_LITERAL); + State = 292; Match(K_ESCAPE); + State = 293; Match(STRING_LITERAL); } } catch (RecognitionException re) { @@ -2261,10 +2277,10 @@ private Binary_scalar_expressionContext binary_scalar_expression(int _p) { EnterOuterAlt(_localctx, 1); { { - State = 291; unary_scalar_expression(); + State = 296; unary_scalar_expression(); } Context.Stop = TokenStream.LT(-1); - State = 327; + State = 332; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,31,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { @@ -2273,93 +2289,93 @@ private Binary_scalar_expressionContext binary_scalar_expression(int _p) { TriggerExitRuleEvent(); _prevctx = _localctx; { - State = 325; + State = 330; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,30,Context) ) { case 1: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 293; + State = 298; if (!(Precpred(Context, 8))) throw new FailedPredicateException(this, "Precpred(Context, 8)"); - State = 294; multiplicative_operator(); - State = 295; binary_scalar_expression(9); + State = 299; multiplicative_operator(); + State = 300; binary_scalar_expression(9); } break; case 2: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 297; + State = 302; if (!(Precpred(Context, 7))) throw new FailedPredicateException(this, "Precpred(Context, 7)"); - State = 298; additive_operator(); - State = 299; binary_scalar_expression(8); + State = 303; additive_operator(); + State = 304; binary_scalar_expression(8); } break; case 3: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 301; + State = 306; if (!(Precpred(Context, 6))) throw new FailedPredicateException(this, "Precpred(Context, 6)"); - State = 302; relational_operator(); - State = 303; binary_scalar_expression(7); + State = 307; relational_operator(); + State = 308; binary_scalar_expression(7); } break; case 4: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 305; + State = 310; if (!(Precpred(Context, 5))) throw new FailedPredicateException(this, "Precpred(Context, 5)"); - State = 306; equality_operator(); - State = 307; binary_scalar_expression(6); + State = 311; equality_operator(); + State = 312; binary_scalar_expression(6); } break; case 5: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 309; + State = 314; if (!(Precpred(Context, 4))) throw new FailedPredicateException(this, "Precpred(Context, 4)"); - State = 310; bitwise_and_operator(); - State = 311; binary_scalar_expression(5); + State = 315; bitwise_and_operator(); + State = 316; binary_scalar_expression(5); } break; case 6: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 313; + State = 318; if (!(Precpred(Context, 3))) throw new FailedPredicateException(this, "Precpred(Context, 3)"); - State = 314; bitwise_exclusive_or_operator(); - State = 315; binary_scalar_expression(4); + State = 319; bitwise_exclusive_or_operator(); + State = 320; binary_scalar_expression(4); } break; case 7: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 317; + State = 322; if (!(Precpred(Context, 2))) throw new FailedPredicateException(this, "Precpred(Context, 2)"); - State = 318; bitwise_inclusive_or_operator(); - State = 319; binary_scalar_expression(3); + State = 323; bitwise_inclusive_or_operator(); + State = 324; binary_scalar_expression(3); } break; case 8: { _localctx = new Binary_scalar_expressionContext(_parentctx, _parentState); PushNewRecursionContext(_localctx, _startState, RULE_binary_scalar_expression); - State = 321; + State = 326; if (!(Precpred(Context, 1))) throw new FailedPredicateException(this, "Precpred(Context, 1)"); - State = 322; string_concat_operator(); - State = 323; binary_scalar_expression(2); + State = 327; string_concat_operator(); + State = 328; binary_scalar_expression(2); } break; } } } - State = 329; + State = 334; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,31,Context); } @@ -2405,7 +2421,7 @@ public Multiplicative_operatorContext multiplicative_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 330; + State = 335; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__0) | (1L << T__10) | (1L << T__11))) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -2456,7 +2472,7 @@ public Additive_operatorContext additive_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 332; + State = 337; _la = TokenStream.LA(1); if ( !(_la==T__12 || _la==T__13) ) { ErrorHandler.RecoverInline(this); @@ -2507,7 +2523,7 @@ public Relational_operatorContext relational_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 334; + State = 339; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__14) | (1L << T__15) | (1L << T__16) | (1L << T__17))) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -2558,7 +2574,7 @@ public Equality_operatorContext equality_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 336; + State = 341; _la = TokenStream.LA(1); if ( !(_la==T__18 || _la==T__19) ) { ErrorHandler.RecoverInline(this); @@ -2608,7 +2624,7 @@ public Bitwise_and_operatorContext bitwise_and_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 338; Match(T__20); + State = 343; Match(T__20); } } catch (RecognitionException re) { @@ -2650,7 +2666,7 @@ public Bitwise_exclusive_or_operatorContext bitwise_exclusive_or_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 340; Match(T__21); + State = 345; Match(T__21); } } catch (RecognitionException re) { @@ -2692,7 +2708,7 @@ public Bitwise_inclusive_or_operatorContext bitwise_inclusive_or_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 342; Match(T__22); + State = 347; Match(T__22); } } catch (RecognitionException re) { @@ -2734,7 +2750,7 @@ public String_concat_operatorContext string_concat_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 344; Match(T__23); + State = 349; Match(T__23); } } catch (RecognitionException re) { @@ -2783,26 +2799,29 @@ public Unary_scalar_expressionContext unary_scalar_expression() { Unary_scalar_expressionContext _localctx = new Unary_scalar_expressionContext(Context, State); EnterRule(_localctx, 72, RULE_unary_scalar_expression); try { - State = 350; + State = 355; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case T__2: case T__5: case T__25: + case K_ALL: case K_ARRAY: case K_EXISTS: case K_FALSE: + case K_LEFT: case K_NULL: + case K_RIGHT: case K_TRUE: case K_UDF: case K_UNDEFINED: case NUMERIC_LITERAL: case STRING_LITERAL: - case IDENTIFIER: + case LEX_IDENTIFIER: case PARAMETER: EnterOuterAlt(_localctx, 1); { - State = 346; primary_expression(0); + State = 351; primary_expression(0); } break; case T__12: @@ -2811,8 +2830,8 @@ public Unary_scalar_expressionContext unary_scalar_expression() { case K_NOT: EnterOuterAlt(_localctx, 2); { - State = 347; unary_operator(); - State = 348; unary_scalar_expression(); + State = 352; unary_operator(); + State = 353; unary_scalar_expression(); } break; default: @@ -2860,7 +2879,7 @@ public Unary_operatorContext unary_operator() { try { EnterOuterAlt(_localctx, 1); { - State = 352; + State = 357; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__12) | (1L << T__13) | (1L << T__24) | (1L << K_NOT))) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -2894,98 +2913,159 @@ public virtual void CopyFrom(Primary_expressionContext context) { base.CopyFrom(context); } } - public partial class SubqueryScalarExpressionContext : Primary_expressionContext { + public partial class AllScalarExpressionContext : Primary_expressionContext { + public ITerminalNode K_ALL() { return GetToken(sqlParser.K_ALL, 0); } public Sql_queryContext sql_query() { return GetRuleContext(0); } - public SubqueryScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public AllScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterSubqueryScalarExpression(this); + if (typedListener != null) typedListener.EnterAllScalarExpression(this); } public override void ExitRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitSubqueryScalarExpression(this); + if (typedListener != null) typedListener.ExitAllScalarExpression(this); } public override TResult Accept(IParseTreeVisitor visitor) { IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitSubqueryScalarExpression(this); + if (typedVisitor != null) return typedVisitor.VisitAllScalarExpression(this); else return visitor.VisitChildren(this); } } - public partial class PropertyRefScalarExpressionBaseContext : Primary_expressionContext { - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } - public PropertyRefScalarExpressionBaseContext(Primary_expressionContext context) { CopyFrom(context); } + public partial class LiteralScalarExpressionContext : Primary_expressionContext { + public LiteralContext literal() { + return GetRuleContext(0); + } + public LiteralScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterPropertyRefScalarExpressionBase(this); + if (typedListener != null) typedListener.EnterLiteralScalarExpression(this); } public override void ExitRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitPropertyRefScalarExpressionBase(this); + if (typedListener != null) typedListener.ExitLiteralScalarExpression(this); } public override TResult Accept(IParseTreeVisitor visitor) { IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitPropertyRefScalarExpressionBase(this); + if (typedVisitor != null) return typedVisitor.VisitLiteralScalarExpression(this); else return visitor.VisitChildren(this); } } - public partial class FunctionCallScalarExpressionContext : Primary_expressionContext { - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } - public ITerminalNode K_UDF() { return GetToken(sqlParser.K_UDF, 0); } + public partial class ObjectCreateScalarExpressionContext : Primary_expressionContext { + public Object_property_listContext object_property_list() { + return GetRuleContext(0); + } + public ObjectCreateScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterObjectCreateScalarExpression(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitObjectCreateScalarExpression(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitObjectCreateScalarExpression(this); + else return visitor.VisitChildren(this); + } + } + public partial class ArrayCreateScalarExpressionContext : Primary_expressionContext { public Scalar_expression_listContext scalar_expression_list() { return GetRuleContext(0); } - public FunctionCallScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public ArrayCreateScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterFunctionCallScalarExpression(this); + if (typedListener != null) typedListener.EnterArrayCreateScalarExpression(this); } public override void ExitRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitFunctionCallScalarExpression(this); + if (typedListener != null) typedListener.ExitArrayCreateScalarExpression(this); } public override TResult Accept(IParseTreeVisitor visitor) { IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitFunctionCallScalarExpression(this); + if (typedVisitor != null) return typedVisitor.VisitArrayCreateScalarExpression(this); else return visitor.VisitChildren(this); } } - public partial class LiteralScalarExpressionContext : Primary_expressionContext { - public LiteralContext literal() { - return GetRuleContext(0); + public partial class MemberIndexerScalarExpressionContext : Primary_expressionContext { + public Primary_expressionContext primary_expression() { + return GetRuleContext(0); } - public LiteralScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public Scalar_expressionContext scalar_expression() { + return GetRuleContext(0); + } + public MemberIndexerScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterLiteralScalarExpression(this); + if (typedListener != null) typedListener.EnterMemberIndexerScalarExpression(this); } public override void ExitRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitLiteralScalarExpression(this); + if (typedListener != null) typedListener.ExitMemberIndexerScalarExpression(this); } public override TResult Accept(IParseTreeVisitor visitor) { IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitLiteralScalarExpression(this); + if (typedVisitor != null) return typedVisitor.VisitMemberIndexerScalarExpression(this); else return visitor.VisitChildren(this); } } - public partial class ObjectCreateScalarExpressionContext : Primary_expressionContext { - public Object_property_listContext object_property_list() { - return GetRuleContext(0); + public partial class SubqueryScalarExpressionContext : Primary_expressionContext { + public Sql_queryContext sql_query() { + return GetRuleContext(0); } - public ObjectCreateScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public SubqueryScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterObjectCreateScalarExpression(this); + if (typedListener != null) typedListener.EnterSubqueryScalarExpression(this); } public override void ExitRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitObjectCreateScalarExpression(this); + if (typedListener != null) typedListener.ExitSubqueryScalarExpression(this); } public override TResult Accept(IParseTreeVisitor visitor) { IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitObjectCreateScalarExpression(this); + if (typedVisitor != null) return typedVisitor.VisitSubqueryScalarExpression(this); + else return visitor.VisitChildren(this); + } + } + public partial class PropertyRefScalarExpressionBaseContext : Primary_expressionContext { + public IdentifierContext identifier() { + return GetRuleContext(0); + } + public PropertyRefScalarExpressionBaseContext(Primary_expressionContext context) { CopyFrom(context); } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterPropertyRefScalarExpressionBase(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitPropertyRefScalarExpressionBase(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitPropertyRefScalarExpressionBase(this); + else return visitor.VisitChildren(this); + } + } + public partial class FunctionCallScalarExpressionContext : Primary_expressionContext { + public Function_call_scalar_expressionContext function_call_scalar_expression() { + return GetRuleContext(0); + } + public FunctionCallScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterFunctionCallScalarExpression(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitFunctionCallScalarExpression(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunctionCallScalarExpression(this); else return visitor.VisitChildren(this); } } @@ -3025,25 +3105,6 @@ public override TResult Accept(IParseTreeVisitor visitor) { else return visitor.VisitChildren(this); } } - public partial class ArrayCreateScalarExpressionContext : Primary_expressionContext { - public Scalar_expression_listContext scalar_expression_list() { - return GetRuleContext(0); - } - public ArrayCreateScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } - public override void EnterRule(IParseTreeListener listener) { - IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterArrayCreateScalarExpression(this); - } - public override void ExitRule(IParseTreeListener listener) { - IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitArrayCreateScalarExpression(this); - } - public override TResult Accept(IParseTreeVisitor visitor) { - IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitArrayCreateScalarExpression(this); - else return visitor.VisitChildren(this); - } - } public partial class ExistsScalarExpressionContext : Primary_expressionContext { public ITerminalNode K_EXISTS() { return GetToken(sqlParser.K_EXISTS, 0); } public Sql_queryContext sql_query() { @@ -3084,33 +3145,13 @@ public override TResult Accept(IParseTreeVisitor visitor) { else return visitor.VisitChildren(this); } } - public partial class MemberIndexerScalarExpressionContext : Primary_expressionContext { - public Primary_expressionContext primary_expression() { - return GetRuleContext(0); - } - public Scalar_expressionContext scalar_expression() { - return GetRuleContext(0); - } - public MemberIndexerScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } - public override void EnterRule(IParseTreeListener listener) { - IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.EnterMemberIndexerScalarExpression(this); - } - public override void ExitRule(IParseTreeListener listener) { - IsqlListener typedListener = listener as IsqlListener; - if (typedListener != null) typedListener.ExitMemberIndexerScalarExpression(this); - } - public override TResult Accept(IParseTreeVisitor visitor) { - IsqlVisitor typedVisitor = visitor as IsqlVisitor; - if (typedVisitor != null) return typedVisitor.VisitMemberIndexerScalarExpression(this); - else return visitor.VisitChildren(this); - } - } public partial class PropertyRefScalarExpressionRecursiveContext : Primary_expressionContext { public Primary_expressionContext primary_expression() { return GetRuleContext(0); } - public ITerminalNode IDENTIFIER() { return GetToken(sqlParser.IDENTIFIER, 0); } + public IdentifierContext identifier() { + return GetRuleContext(0); + } public PropertyRefScalarExpressionRecursiveContext(Primary_expressionContext context) { CopyFrom(context); } public override void EnterRule(IParseTreeListener listener) { IsqlListener typedListener = listener as IsqlListener; @@ -3144,16 +3185,16 @@ private Primary_expressionContext primary_expression(int _p) { int _alt; EnterOuterAlt(_localctx, 1); { - State = 396; + State = 397; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,37,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,35,Context) ) { case 1: { _localctx = new PropertyRefScalarExpressionBaseContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 355; Match(IDENTIFIER); + State = 360; identifier(); } break; case 2: @@ -3161,7 +3202,7 @@ private Primary_expressionContext primary_expression(int _p) { _localctx = new ParameterRefScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 356; Match(PARAMETER); + State = 361; Match(PARAMETER); } break; case 3: @@ -3169,7 +3210,7 @@ private Primary_expressionContext primary_expression(int _p) { _localctx = new LiteralScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 357; literal(); + State = 362; literal(); } break; case 4: @@ -3177,17 +3218,17 @@ private Primary_expressionContext primary_expression(int _p) { _localctx = new ArrayCreateScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 358; Match(T__5); - State = 360; + State = 363; Match(T__5); + State = 365; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__5) | (1L << T__12) | (1L << T__13) | (1L << T__24) | (1L << T__25) | (1L << K_ARRAY) | (1L << K_EXISTS) | (1L << K_FALSE) | (1L << K_NOT) | (1L << K_NULL) | (1L << K_TRUE) | (1L << K_UDF) | (1L << K_UNDEFINED) | (1L << NUMERIC_LITERAL) | (1L << STRING_LITERAL) | (1L << IDENTIFIER) | (1L << PARAMETER))) != 0)) { + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { { - State = 359; scalar_expression_list(); + State = 364; scalar_expression_list(); } } - State = 362; Match(T__6); + State = 367; Match(T__6); } break; case 5: @@ -3195,63 +3236,45 @@ private Primary_expressionContext primary_expression(int _p) { _localctx = new ObjectCreateScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 363; Match(T__25); - State = 365; + State = 368; Match(T__25); + State = 370; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==STRING_LITERAL) { { - State = 364; object_property_list(); + State = 369; object_property_list(); } } - State = 367; Match(T__26); + State = 372; Match(T__26); } break; case 6: { - _localctx = new FunctionCallScalarExpressionContext(_localctx); + _localctx = new ParenthesizedScalarExperessionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 370; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if (_la==K_UDF) { - { - State = 368; Match(K_UDF); - State = 369; Match(T__4); - } - } - - State = 372; Match(IDENTIFIER); State = 373; Match(T__2); - State = 375; - ErrorHandler.Sync(this); - _la = TokenStream.LA(1); - if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__2) | (1L << T__5) | (1L << T__12) | (1L << T__13) | (1L << T__24) | (1L << T__25) | (1L << K_ARRAY) | (1L << K_EXISTS) | (1L << K_FALSE) | (1L << K_NOT) | (1L << K_NULL) | (1L << K_TRUE) | (1L << K_UDF) | (1L << K_UNDEFINED) | (1L << NUMERIC_LITERAL) | (1L << STRING_LITERAL) | (1L << IDENTIFIER) | (1L << PARAMETER))) != 0)) { - { - State = 374; scalar_expression_list(); - } - } - - State = 377; Match(T__3); + State = 374; scalar_expression(0); + State = 375; Match(T__3); } break; case 7: { - _localctx = new ParenthesizedScalarExperessionContext(_localctx); + _localctx = new SubqueryScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 378; Match(T__2); - State = 379; scalar_expression(0); - State = 380; Match(T__3); + State = 377; Match(T__2); + State = 378; sql_query(); + State = 379; Match(T__3); } break; case 8: { - _localctx = new SubqueryScalarExpressionContext(_localctx); + _localctx = new ExistsScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; + State = 381; Match(K_EXISTS); State = 382; Match(T__2); State = 383; sql_query(); State = 384; Match(T__3); @@ -3259,10 +3282,10 @@ private Primary_expressionContext primary_expression(int _p) { break; case 9: { - _localctx = new ExistsScalarExpressionContext(_localctx); + _localctx = new ArrayScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 386; Match(K_EXISTS); + State = 386; Match(K_ARRAY); State = 387; Match(T__2); State = 388; sql_query(); State = 389; Match(T__3); @@ -3270,56 +3293,64 @@ private Primary_expressionContext primary_expression(int _p) { break; case 10: { - _localctx = new ArrayScalarExpressionContext(_localctx); + _localctx = new AllScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 391; Match(K_ARRAY); + State = 391; Match(K_ALL); State = 392; Match(T__2); State = 393; sql_query(); State = 394; Match(T__3); } break; + case 11: + { + _localctx = new FunctionCallScalarExpressionContext(_localctx); + Context = _localctx; + _prevctx = _localctx; + State = 396; function_call_scalar_expression(); + } + break; } Context.Stop = TokenStream.LT(-1); - State = 408; + State = 409; ErrorHandler.Sync(this); - _alt = Interpreter.AdaptivePredict(TokenStream,39,Context); + _alt = Interpreter.AdaptivePredict(TokenStream,37,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { if ( _alt==1 ) { if ( ParseListeners!=null ) TriggerExitRuleEvent(); _prevctx = _localctx; { - State = 406; + State = 407; ErrorHandler.Sync(this); - switch ( Interpreter.AdaptivePredict(TokenStream,38,Context) ) { + switch ( Interpreter.AdaptivePredict(TokenStream,36,Context) ) { case 1: { _localctx = new PropertyRefScalarExpressionRecursiveContext(new Primary_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_primary_expression); - State = 398; - if (!(Precpred(Context, 4))) throw new FailedPredicateException(this, "Precpred(Context, 4)"); - State = 399; Match(T__4); - State = 400; Match(IDENTIFIER); + State = 399; + if (!(Precpred(Context, 6))) throw new FailedPredicateException(this, "Precpred(Context, 6)"); + State = 400; Match(T__4); + State = 401; identifier(); } break; case 2: { _localctx = new MemberIndexerScalarExpressionContext(new Primary_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_primary_expression); - State = 401; - if (!(Precpred(Context, 3))) throw new FailedPredicateException(this, "Precpred(Context, 3)"); - State = 402; Match(T__5); - State = 403; scalar_expression(0); - State = 404; Match(T__6); + State = 402; + if (!(Precpred(Context, 5))) throw new FailedPredicateException(this, "Precpred(Context, 5)"); + State = 403; Match(T__5); + State = 404; scalar_expression(0); + State = 405; Match(T__6); } break; } } } - State = 410; + State = 411; ErrorHandler.Sync(this); - _alt = Interpreter.AdaptivePredict(TokenStream,39,Context); + _alt = Interpreter.AdaptivePredict(TokenStream,37,Context); } } } @@ -3334,6 +3365,123 @@ private Primary_expressionContext primary_expression(int _p) { return _localctx; } + public partial class Function_call_scalar_expressionContext : ParserRuleContext { + public IdentifierContext identifier() { + return GetRuleContext(0); + } + public ITerminalNode K_UDF() { return GetToken(sqlParser.K_UDF, 0); } + public Scalar_expression_listContext scalar_expression_list() { + return GetRuleContext(0); + } + public ITerminalNode K_LEFT() { return GetToken(sqlParser.K_LEFT, 0); } + public ITerminalNode K_RIGHT() { return GetToken(sqlParser.K_RIGHT, 0); } + public Function_call_scalar_expressionContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_function_call_scalar_expression; } } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterFunction_call_scalar_expression(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitFunction_call_scalar_expression(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitFunction_call_scalar_expression(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public Function_call_scalar_expressionContext function_call_scalar_expression() { + Function_call_scalar_expressionContext _localctx = new Function_call_scalar_expressionContext(Context, State); + EnterRule(_localctx, 78, RULE_function_call_scalar_expression); + int _la; + try { + State = 435; + ErrorHandler.Sync(this); + switch (TokenStream.LA(1)) { + case K_ALL: + case K_UDF: + case LEX_IDENTIFIER: + EnterOuterAlt(_localctx, 1); + { + State = 414; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (_la==K_UDF) { + { + State = 412; Match(K_UDF); + State = 413; Match(T__4); + } + } + + State = 416; identifier(); + State = 417; Match(T__2); + State = 419; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + { + State = 418; scalar_expression_list(); + } + } + + State = 421; Match(T__3); + } + break; + case K_LEFT: + EnterOuterAlt(_localctx, 2); + { + State = 423; Match(K_LEFT); + State = 424; Match(T__2); + State = 426; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + { + State = 425; scalar_expression_list(); + } + } + + State = 428; Match(T__3); + } + break; + case K_RIGHT: + EnterOuterAlt(_localctx, 3); + { + State = 429; Match(K_RIGHT); + State = 430; Match(T__2); + State = 432; + ErrorHandler.Sync(this); + _la = TokenStream.LA(1); + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + { + State = 431; scalar_expression_list(); + } + } + + State = 434; Match(T__3); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + public partial class Scalar_expression_listContext : ParserRuleContext { public Scalar_expressionContext[] scalar_expression() { return GetRuleContexts(); @@ -3364,23 +3512,23 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public Scalar_expression_listContext scalar_expression_list() { Scalar_expression_listContext _localctx = new Scalar_expression_listContext(Context, State); - EnterRule(_localctx, 78, RULE_scalar_expression_list); + EnterRule(_localctx, 80, RULE_scalar_expression_list); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 411; scalar_expression(0); - State = 416; + State = 437; scalar_expression(0); + State = 442; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==T__1) { { { - State = 412; Match(T__1); - State = 413; scalar_expression(0); + State = 438; Match(T__1); + State = 439; scalar_expression(0); } } - State = 418; + State = 444; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -3427,23 +3575,23 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public Object_property_listContext object_property_list() { Object_property_listContext _localctx = new Object_property_listContext(Context, State); - EnterRule(_localctx, 80, RULE_object_property_list); + EnterRule(_localctx, 82, RULE_object_property_list); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 419; object_property(); - State = 424; + State = 445; object_property(); + State = 450; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==T__1) { { { - State = 420; Match(T__1); - State = 421; object_property(); + State = 446; Match(T__1); + State = 447; object_property(); } } - State = 426; + State = 452; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -3488,13 +3636,66 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public Object_propertyContext object_property() { Object_propertyContext _localctx = new Object_propertyContext(Context, State); - EnterRule(_localctx, 82, RULE_object_property); + EnterRule(_localctx, 84, RULE_object_property); try { EnterOuterAlt(_localctx, 1); { - State = 427; Match(STRING_LITERAL); - State = 428; Match(T__8); - State = 429; scalar_expression(0); + State = 453; Match(STRING_LITERAL); + State = 454; Match(T__8); + State = 455; scalar_expression(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + ErrorHandler.ReportError(this, re); + ErrorHandler.Recover(this, re); + } + finally { + ExitRule(); + } + return _localctx; + } + + public partial class IdentifierContext : ParserRuleContext { + public ITerminalNode LEX_IDENTIFIER() { return GetToken(sqlParser.LEX_IDENTIFIER, 0); } + public ITerminalNode K_ALL() { return GetToken(sqlParser.K_ALL, 0); } + public IdentifierContext(ParserRuleContext parent, int invokingState) + : base(parent, invokingState) + { + } + public override int RuleIndex { get { return RULE_identifier; } } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterIdentifier(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitIdentifier(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitIdentifier(this); + else return visitor.VisitChildren(this); + } + } + + [RuleVersion(0)] + public IdentifierContext identifier() { + IdentifierContext _localctx = new IdentifierContext(Context, State); + EnterRule(_localctx, 86, RULE_identifier); + int _la; + try { + EnterOuterAlt(_localctx, 1); + { + State = 457; + _la = TokenStream.LA(1); + if ( !(_la==K_ALL || _la==LEX_IDENTIFIER) ) { + ErrorHandler.RecoverInline(this); + } + else { + ErrorHandler.ReportMatch(this); + Consume(); + } } } catch (RecognitionException re) { @@ -3538,12 +3739,12 @@ public override TResult Accept(IParseTreeVisitor visitor) { [RuleVersion(0)] public LiteralContext literal() { LiteralContext _localctx = new LiteralContext(Context, State); - EnterRule(_localctx, 84, RULE_literal); + EnterRule(_localctx, 88, RULE_literal); int _la; try { EnterOuterAlt(_localctx, 1); { - State = 431; + State = 459; _la = TokenStream.LA(1); if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_FALSE) | (1L << K_NULL) | (1L << K_TRUE) | (1L << K_UNDEFINED) | (1L << NUMERIC_LITERAL) | (1L << STRING_LITERAL))) != 0)) ) { ErrorHandler.RecoverInline(this); @@ -3619,15 +3820,15 @@ private bool binary_scalar_expression_sempred(Binary_scalar_expressionContext _l } private bool primary_expression_sempred(Primary_expressionContext _localctx, int predIndex) { switch (predIndex) { - case 16: return Precpred(Context, 4); - case 17: return Precpred(Context, 3); + case 16: return Precpred(Context, 6); + case 17: return Precpred(Context, 5); } return true; } private static char[] _serializedATN = { '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786', - '\x5964', '\x3', '?', '\x1B4', '\x4', '\x2', '\t', '\x2', '\x4', '\x3', + '\x5964', '\x3', '\x42', '\x1D0', '\x4', '\x2', '\t', '\x2', '\x4', '\x3', '\t', '\x3', '\x4', '\x4', '\t', '\x4', '\x4', '\x5', '\t', '\x5', '\x4', '\x6', '\t', '\x6', '\x4', '\a', '\t', '\a', '\x4', '\b', '\t', '\b', '\x4', '\t', '\t', '\t', '\x4', '\n', '\t', '\n', '\x4', '\v', '\t', '\v', @@ -3643,358 +3844,383 @@ private bool primary_expression_sempred(Primary_expressionContext _localctx, int '#', '\t', '#', '\x4', '$', '\t', '$', '\x4', '%', '\t', '%', '\x4', '&', '\t', '&', '\x4', '\'', '\t', '\'', '\x4', '(', '\t', '(', '\x4', ')', '\t', ')', '\x4', '*', '\t', '*', '\x4', '+', '\t', '+', '\x4', ',', '\t', - ',', '\x3', '\x2', '\x3', '\x2', '\x3', '\x2', '\x3', '\x3', '\x3', '\x3', - '\x5', '\x3', '^', '\n', '\x3', '\x3', '\x3', '\x5', '\x3', '\x61', '\n', - '\x3', '\x3', '\x3', '\x5', '\x3', '\x64', '\n', '\x3', '\x3', '\x3', - '\x5', '\x3', 'g', '\n', '\x3', '\x3', '\x3', '\x5', '\x3', 'j', '\n', - '\x3', '\x3', '\x4', '\x3', '\x4', '\x5', '\x4', 'n', '\n', '\x4', '\x3', - '\x4', '\x5', '\x4', 'q', '\n', '\x4', '\x3', '\x4', '\x3', '\x4', '\x3', - '\x5', '\x3', '\x5', '\x3', '\x5', '\x3', '\x6', '\x3', '\x6', '\x3', - '\x6', '\x5', '\x6', '{', '\n', '\x6', '\x3', '\a', '\x3', '\a', '\x3', - '\b', '\x3', '\b', '\x3', '\b', '\x3', '\t', '\x3', '\t', '\x3', '\t', - '\a', '\t', '\x85', '\n', '\t', '\f', '\t', '\xE', '\t', '\x88', '\v', - '\t', '\x3', '\n', '\x3', '\n', '\x3', '\n', '\x5', '\n', '\x8D', '\n', - '\n', '\x3', '\v', '\x3', '\v', '\x3', '\v', '\x3', '\f', '\x3', '\f', - '\x3', '\f', '\x5', '\f', '\x95', '\n', '\f', '\x3', '\f', '\x5', '\f', - '\x98', '\n', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x5', '\f', - '\x9D', '\n', '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\a', '\f', - '\xA2', '\n', '\f', '\f', '\f', '\xE', '\f', '\xA5', '\v', '\f', '\x3', - '\r', '\x3', '\r', '\x5', '\r', '\xA9', '\n', '\r', '\x3', '\r', '\x3', - '\r', '\x3', '\r', '\x3', '\r', '\x5', '\r', '\xAF', '\n', '\r', '\x3', + ',', '\x4', '-', '\t', '-', '\x4', '.', '\t', '.', '\x3', '\x2', '\x3', + '\x2', '\x3', '\x2', '\x3', '\x3', '\x3', '\x3', '\x5', '\x3', '\x62', + '\n', '\x3', '\x3', '\x3', '\x5', '\x3', '\x65', '\n', '\x3', '\x3', '\x3', + '\x5', '\x3', 'h', '\n', '\x3', '\x3', '\x3', '\x5', '\x3', 'k', '\n', + '\x3', '\x3', '\x3', '\x5', '\x3', 'n', '\n', '\x3', '\x3', '\x4', '\x3', + '\x4', '\x5', '\x4', 'r', '\n', '\x4', '\x3', '\x4', '\x5', '\x4', 'u', + '\n', '\x4', '\x3', '\x4', '\x3', '\x4', '\x3', '\x5', '\x3', '\x5', '\x3', + '\x5', '\x3', '\x6', '\x3', '\x6', '\x3', '\x6', '\x5', '\x6', '\x7F', + '\n', '\x6', '\x3', '\a', '\x3', '\a', '\x3', '\b', '\x3', '\b', '\x3', + '\b', '\x3', '\t', '\x3', '\t', '\x3', '\t', '\a', '\t', '\x89', '\n', + '\t', '\f', '\t', '\xE', '\t', '\x8C', '\v', '\t', '\x3', '\n', '\x3', + '\n', '\x3', '\n', '\x5', '\n', '\x91', '\n', '\n', '\x3', '\v', '\x3', + '\v', '\x3', '\v', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x5', '\f', + '\x99', '\n', '\f', '\x3', '\f', '\x5', '\f', '\x9C', '\n', '\f', '\x3', + '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\x5', '\f', '\xA2', '\n', + '\f', '\x3', '\f', '\x3', '\f', '\x3', '\f', '\a', '\f', '\xA7', '\n', + '\f', '\f', '\f', '\xE', '\f', '\xAA', '\v', '\f', '\x3', '\r', '\x3', + '\r', '\x5', '\r', '\xAE', '\n', '\r', '\x3', '\r', '\x3', '\r', '\x3', + '\r', '\x3', '\r', '\x5', '\r', '\xB4', '\n', '\r', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', '\xE', '\x3', - '\xE', '\x3', '\xE', '\a', '\xE', '\xBD', '\n', '\xE', '\f', '\xE', '\xE', - '\xE', '\xC0', '\v', '\xE', '\x3', '\xF', '\x3', '\xF', '\x3', '\xF', - '\x3', '\x10', '\x3', '\x10', '\x3', '\x10', '\x3', '\x10', '\x3', '\x11', - '\x3', '\x11', '\x3', '\x11', '\x3', '\x11', '\x3', '\x12', '\x3', '\x12', - '\x3', '\x12', '\a', '\x12', '\xD0', '\n', '\x12', '\f', '\x12', '\xE', - '\x12', '\xD3', '\v', '\x12', '\x3', '\x13', '\x3', '\x13', '\x5', '\x13', - '\xD7', '\n', '\x13', '\x3', '\x14', '\x3', '\x14', '\x3', '\x15', '\x3', - '\x15', '\x3', '\x15', '\x3', '\x15', '\x3', '\x15', '\x3', '\x16', '\x3', - '\x16', '\x3', '\x17', '\x3', '\x17', '\x3', '\x18', '\x3', '\x18', '\x3', - '\x18', '\x3', '\x18', '\x5', '\x18', '\xE8', '\n', '\x18', '\x3', '\x18', - '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x5', '\x18', - '\xEF', '\n', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', + '\xE', '\a', '\xE', '\xC2', '\n', '\xE', '\f', '\xE', '\xE', '\xE', '\xC5', + '\v', '\xE', '\x3', '\xF', '\x3', '\xF', '\x3', '\xF', '\x3', '\x10', + '\x3', '\x10', '\x3', '\x10', '\x3', '\x10', '\x3', '\x11', '\x3', '\x11', + '\x3', '\x11', '\x3', '\x11', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', + '\a', '\x12', '\xD5', '\n', '\x12', '\f', '\x12', '\xE', '\x12', '\xD8', + '\v', '\x12', '\x3', '\x13', '\x3', '\x13', '\x5', '\x13', '\xDC', '\n', + '\x13', '\x3', '\x14', '\x3', '\x14', '\x3', '\x15', '\x3', '\x15', '\x3', + '\x15', '\x3', '\x15', '\x3', '\x15', '\x3', '\x16', '\x3', '\x16', '\x3', + '\x17', '\x3', '\x17', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', + '\x18', '\x5', '\x18', '\xED', '\n', '\x18', '\x3', '\x18', '\x3', '\x18', + '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x5', '\x18', '\xF4', '\n', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', - '\x18', '\a', '\x18', '\xFA', '\n', '\x18', '\f', '\x18', '\xE', '\x18', - '\xFD', '\v', '\x18', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\x3', - '\x19', '\x5', '\x19', '\x103', '\n', '\x19', '\x3', '\x19', '\x3', '\x19', - '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\a', '\x19', - '\x10B', '\n', '\x19', '\f', '\x19', '\xE', '\x19', '\x10E', '\v', '\x19', - '\x3', '\x1A', '\x3', '\x1A', '\x5', '\x1A', '\x112', '\n', '\x1A', '\x3', - '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', - '\x1B', '\x3', '\x1B', '\x5', '\x1B', '\x11B', '\n', '\x1B', '\x3', '\x1B', - '\x3', '\x1B', '\x3', '\x1B', '\x5', '\x1B', '\x120', '\n', '\x1B', '\x3', - '\x1C', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1D', '\x3', '\x1D', '\x3', + '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\x3', '\x18', '\a', + '\x18', '\xFF', '\n', '\x18', '\f', '\x18', '\xE', '\x18', '\x102', '\v', + '\x18', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\x5', + '\x19', '\x108', '\n', '\x19', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', + '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', '\a', '\x19', '\x110', '\n', + '\x19', '\f', '\x19', '\xE', '\x19', '\x113', '\v', '\x19', '\x3', '\x1A', + '\x3', '\x1A', '\x5', '\x1A', '\x117', '\n', '\x1A', '\x3', '\x1A', '\x3', + '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1B', '\x3', + '\x1B', '\x5', '\x1B', '\x120', '\n', '\x1B', '\x3', '\x1B', '\x3', '\x1B', + '\x3', '\x1B', '\x5', '\x1B', '\x125', '\n', '\x1B', '\x3', '\x1C', '\x3', + '\x1C', '\x3', '\x1C', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', - '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\a', '\x1D', '\x148', '\n', '\x1D', - '\f', '\x1D', '\xE', '\x1D', '\x14B', '\v', '\x1D', '\x3', '\x1E', '\x3', - '\x1E', '\x3', '\x1F', '\x3', '\x1F', '\x3', ' ', '\x3', ' ', '\x3', '!', - '\x3', '!', '\x3', '\"', '\x3', '\"', '\x3', '#', '\x3', '#', '\x3', '$', - '\x3', '$', '\x3', '%', '\x3', '%', '\x3', '&', '\x3', '&', '\x3', '&', - '\x3', '&', '\x5', '&', '\x161', '\n', '&', '\x3', '\'', '\x3', '\'', - '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', - '\x5', '(', '\x16B', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x5', - '(', '\x170', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x5', '(', - '\x175', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x5', '(', '\x17A', + '\x1D', '\x3', '\x1D', '\a', '\x1D', '\x14D', '\n', '\x1D', '\f', '\x1D', + '\xE', '\x1D', '\x150', '\v', '\x1D', '\x3', '\x1E', '\x3', '\x1E', '\x3', + '\x1F', '\x3', '\x1F', '\x3', ' ', '\x3', ' ', '\x3', '!', '\x3', '!', + '\x3', '\"', '\x3', '\"', '\x3', '#', '\x3', '#', '\x3', '$', '\x3', '$', + '\x3', '%', '\x3', '%', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', + '\x5', '&', '\x166', '\n', '&', '\x3', '\'', '\x3', '\'', '\x3', '(', + '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x5', '(', + '\x170', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x5', '(', '\x175', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', - '\x3', '(', '\x3', '(', '\x5', '(', '\x18F', '\n', '(', '\x3', '(', '\x3', + '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', + '\x3', '(', '\x3', '(', '\x5', '(', '\x190', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', - '(', '\a', '(', '\x199', '\n', '(', '\f', '(', '\xE', '(', '\x19C', '\v', - '(', '\x3', ')', '\x3', ')', '\x3', ')', '\a', ')', '\x1A1', '\n', ')', - '\f', ')', '\xE', ')', '\x1A4', '\v', ')', '\x3', '*', '\x3', '*', '\x3', - '*', '\a', '*', '\x1A9', '\n', '*', '\f', '*', '\xE', '*', '\x1AC', '\v', - '*', '\x3', '+', '\x3', '+', '\x3', '+', '\x3', '+', '\x3', ',', '\x3', - ',', '\x3', ',', '\x2', '\b', '\x16', '\x1A', '.', '\x30', '\x38', 'N', - '-', '\x2', '\x4', '\x6', '\b', '\n', '\f', '\xE', '\x10', '\x12', '\x14', + '(', '\a', '(', '\x19A', '\n', '(', '\f', '(', '\xE', '(', '\x19D', '\v', + '(', '\x3', ')', '\x3', ')', '\x5', ')', '\x1A1', '\n', ')', '\x3', ')', + '\x3', ')', '\x3', ')', '\x5', ')', '\x1A6', '\n', ')', '\x3', ')', '\x3', + ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x5', ')', '\x1AD', '\n', ')', + '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x5', ')', '\x1B3', '\n', + ')', '\x3', ')', '\x5', ')', '\x1B6', '\n', ')', '\x3', '*', '\x3', '*', + '\x3', '*', '\a', '*', '\x1BB', '\n', '*', '\f', '*', '\xE', '*', '\x1BE', + '\v', '*', '\x3', '+', '\x3', '+', '\x3', '+', '\a', '+', '\x1C3', '\n', + '+', '\f', '+', '\xE', '+', '\x1C6', '\v', '+', '\x3', ',', '\x3', ',', + '\x3', ',', '\x3', ',', '\x3', '-', '\x3', '-', '\x3', '.', '\x3', '.', + '\x3', '.', '\x2', '\b', '\x16', '\x1A', '.', '\x30', '\x38', 'N', '/', + '\x2', '\x4', '\x6', '\b', '\n', '\f', '\xE', '\x10', '\x12', '\x14', '\x16', '\x18', '\x1A', '\x1C', '\x1E', ' ', '\"', '$', '&', '(', '*', ',', '.', '\x30', '\x32', '\x34', '\x36', '\x38', ':', '<', '>', '@', - '\x42', '\x44', '\x46', 'H', 'J', 'L', 'N', 'P', 'R', 'T', 'V', '\x2', - '\n', '\x4', '\x2', '<', '<', '?', '?', '\x4', '\x2', '!', '!', '$', '$', - '\x4', '\x2', '\x3', '\x3', '\r', '\xE', '\x3', '\x2', '\xF', '\x10', - '\x3', '\x2', '\x11', '\x14', '\x3', '\x2', '\x15', '\x16', '\x5', '\x2', - '\xF', '\x10', '\x1B', '\x1B', '/', '/', '\a', '\x2', '(', '(', '\x30', - '\x30', '\x36', '\x36', '\x38', '\x38', '<', '=', '\x2', '\x1C3', '\x2', - 'X', '\x3', '\x2', '\x2', '\x2', '\x4', '[', '\x3', '\x2', '\x2', '\x2', - '\x6', 'k', '\x3', '\x2', '\x2', '\x2', '\b', 't', '\x3', '\x2', '\x2', - '\x2', '\n', 'z', '\x3', '\x2', '\x2', '\x2', '\f', '|', '\x3', '\x2', - '\x2', '\x2', '\xE', '~', '\x3', '\x2', '\x2', '\x2', '\x10', '\x81', - '\x3', '\x2', '\x2', '\x2', '\x12', '\x89', '\x3', '\x2', '\x2', '\x2', - '\x14', '\x8E', '\x3', '\x2', '\x2', '\x2', '\x16', '\x9C', '\x3', '\x2', - '\x2', '\x2', '\x18', '\xAE', '\x3', '\x2', '\x2', '\x2', '\x1A', '\xB0', - '\x3', '\x2', '\x2', '\x2', '\x1C', '\xC1', '\x3', '\x2', '\x2', '\x2', - '\x1E', '\xC4', '\x3', '\x2', '\x2', '\x2', ' ', '\xC8', '\x3', '\x2', - '\x2', '\x2', '\"', '\xCC', '\x3', '\x2', '\x2', '\x2', '$', '\xD4', '\x3', - '\x2', '\x2', '\x2', '&', '\xD8', '\x3', '\x2', '\x2', '\x2', '(', '\xDA', - '\x3', '\x2', '\x2', '\x2', '*', '\xDF', '\x3', '\x2', '\x2', '\x2', ',', - '\xE1', '\x3', '\x2', '\x2', '\x2', '.', '\xEE', '\x3', '\x2', '\x2', - '\x2', '\x30', '\x102', '\x3', '\x2', '\x2', '\x2', '\x32', '\x10F', '\x3', - '\x2', '\x2', '\x2', '\x34', '\x118', '\x3', '\x2', '\x2', '\x2', '\x36', - '\x121', '\x3', '\x2', '\x2', '\x2', '\x38', '\x124', '\x3', '\x2', '\x2', - '\x2', ':', '\x14C', '\x3', '\x2', '\x2', '\x2', '<', '\x14E', '\x3', - '\x2', '\x2', '\x2', '>', '\x150', '\x3', '\x2', '\x2', '\x2', '@', '\x152', - '\x3', '\x2', '\x2', '\x2', '\x42', '\x154', '\x3', '\x2', '\x2', '\x2', - '\x44', '\x156', '\x3', '\x2', '\x2', '\x2', '\x46', '\x158', '\x3', '\x2', - '\x2', '\x2', 'H', '\x15A', '\x3', '\x2', '\x2', '\x2', 'J', '\x160', - '\x3', '\x2', '\x2', '\x2', 'L', '\x162', '\x3', '\x2', '\x2', '\x2', - 'N', '\x18E', '\x3', '\x2', '\x2', '\x2', 'P', '\x19D', '\x3', '\x2', - '\x2', '\x2', 'R', '\x1A5', '\x3', '\x2', '\x2', '\x2', 'T', '\x1AD', - '\x3', '\x2', '\x2', '\x2', 'V', '\x1B1', '\x3', '\x2', '\x2', '\x2', - 'X', 'Y', '\x5', '\x4', '\x3', '\x2', 'Y', 'Z', '\a', '\x2', '\x2', '\x3', - 'Z', '\x3', '\x3', '\x2', '\x2', '\x2', '[', ']', '\x5', '\x6', '\x4', - '\x2', '\\', '^', '\x5', '\x14', '\v', '\x2', ']', '\\', '\x3', '\x2', - '\x2', '\x2', ']', '^', '\x3', '\x2', '\x2', '\x2', '^', '`', '\x3', '\x2', - '\x2', '\x2', '_', '\x61', '\x5', '\x1C', '\xF', '\x2', '`', '_', '\x3', - '\x2', '\x2', '\x2', '`', '\x61', '\x3', '\x2', '\x2', '\x2', '\x61', - '\x63', '\x3', '\x2', '\x2', '\x2', '\x62', '\x64', '\x5', '\x1E', '\x10', - '\x2', '\x63', '\x62', '\x3', '\x2', '\x2', '\x2', '\x63', '\x64', '\x3', - '\x2', '\x2', '\x2', '\x64', '\x66', '\x3', '\x2', '\x2', '\x2', '\x65', - 'g', '\x5', ' ', '\x11', '\x2', '\x66', '\x65', '\x3', '\x2', '\x2', '\x2', - '\x66', 'g', '\x3', '\x2', '\x2', '\x2', 'g', 'i', '\x3', '\x2', '\x2', - '\x2', 'h', 'j', '\x5', '(', '\x15', '\x2', 'i', 'h', '\x3', '\x2', '\x2', - '\x2', 'i', 'j', '\x3', '\x2', '\x2', '\x2', 'j', '\x5', '\x3', '\x2', - '\x2', '\x2', 'k', 'm', '\a', '\x34', '\x2', '\x2', 'l', 'n', '\a', '%', - '\x2', '\x2', 'm', 'l', '\x3', '\x2', '\x2', '\x2', 'm', 'n', '\x3', '\x2', - '\x2', '\x2', 'n', 'p', '\x3', '\x2', '\x2', '\x2', 'o', 'q', '\x5', '\b', - '\x5', '\x2', 'p', 'o', '\x3', '\x2', '\x2', '\x2', 'p', 'q', '\x3', '\x2', - '\x2', '\x2', 'q', 'r', '\x3', '\x2', '\x2', '\x2', 'r', 's', '\x5', '\n', - '\x6', '\x2', 's', '\a', '\x3', '\x2', '\x2', '\x2', 't', 'u', '\a', '\x35', - '\x2', '\x2', 'u', 'v', '\t', '\x2', '\x2', '\x2', 'v', '\t', '\x3', '\x2', - '\x2', '\x2', 'w', '{', '\x5', '\f', '\a', '\x2', 'x', '{', '\x5', '\xE', - '\b', '\x2', 'y', '{', '\x5', '\x10', '\t', '\x2', 'z', 'w', '\x3', '\x2', - '\x2', '\x2', 'z', 'x', '\x3', '\x2', '\x2', '\x2', 'z', 'y', '\x3', '\x2', - '\x2', '\x2', '{', '\v', '\x3', '\x2', '\x2', '\x2', '|', '}', '\a', '\x3', - '\x2', '\x2', '}', '\r', '\x3', '\x2', '\x2', '\x2', '~', '\x7F', '\a', - '\x39', '\x2', '\x2', '\x7F', '\x80', '\x5', '.', '\x18', '\x2', '\x80', - '\xF', '\x3', '\x2', '\x2', '\x2', '\x81', '\x86', '\x5', '\x12', '\n', - '\x2', '\x82', '\x83', '\a', '\x4', '\x2', '\x2', '\x83', '\x85', '\x5', - '\x12', '\n', '\x2', '\x84', '\x82', '\x3', '\x2', '\x2', '\x2', '\x85', - '\x88', '\x3', '\x2', '\x2', '\x2', '\x86', '\x84', '\x3', '\x2', '\x2', - '\x2', '\x86', '\x87', '\x3', '\x2', '\x2', '\x2', '\x87', '\x11', '\x3', - '\x2', '\x2', '\x2', '\x88', '\x86', '\x3', '\x2', '\x2', '\x2', '\x89', - '\x8C', '\x5', '.', '\x18', '\x2', '\x8A', '\x8B', '\a', ' ', '\x2', '\x2', - '\x8B', '\x8D', '\a', '>', '\x2', '\x2', '\x8C', '\x8A', '\x3', '\x2', - '\x2', '\x2', '\x8C', '\x8D', '\x3', '\x2', '\x2', '\x2', '\x8D', '\x13', - '\x3', '\x2', '\x2', '\x2', '\x8E', '\x8F', '\a', ')', '\x2', '\x2', '\x8F', - '\x90', '\x5', '\x16', '\f', '\x2', '\x90', '\x15', '\x3', '\x2', '\x2', - '\x2', '\x91', '\x92', '\b', '\f', '\x1', '\x2', '\x92', '\x97', '\x5', - '\x18', '\r', '\x2', '\x93', '\x95', '\a', ' ', '\x2', '\x2', '\x94', - '\x93', '\x3', '\x2', '\x2', '\x2', '\x94', '\x95', '\x3', '\x2', '\x2', - '\x2', '\x95', '\x96', '\x3', '\x2', '\x2', '\x2', '\x96', '\x98', '\a', - '>', '\x2', '\x2', '\x97', '\x94', '\x3', '\x2', '\x2', '\x2', '\x97', - '\x98', '\x3', '\x2', '\x2', '\x2', '\x98', '\x9D', '\x3', '\x2', '\x2', - '\x2', '\x99', '\x9A', '\a', '>', '\x2', '\x2', '\x9A', '\x9B', '\a', - '+', '\x2', '\x2', '\x9B', '\x9D', '\x5', '\x18', '\r', '\x2', '\x9C', - '\x91', '\x3', '\x2', '\x2', '\x2', '\x9C', '\x99', '\x3', '\x2', '\x2', - '\x2', '\x9D', '\xA3', '\x3', '\x2', '\x2', '\x2', '\x9E', '\x9F', '\f', - '\x3', '\x2', '\x2', '\x9F', '\xA0', '\a', ',', '\x2', '\x2', '\xA0', - '\xA2', '\x5', '\x16', '\f', '\x4', '\xA1', '\x9E', '\x3', '\x2', '\x2', - '\x2', '\xA2', '\xA5', '\x3', '\x2', '\x2', '\x2', '\xA3', '\xA1', '\x3', - '\x2', '\x2', '\x2', '\xA3', '\xA4', '\x3', '\x2', '\x2', '\x2', '\xA4', - '\x17', '\x3', '\x2', '\x2', '\x2', '\xA5', '\xA3', '\x3', '\x2', '\x2', - '\x2', '\xA6', '\xA8', '\a', '>', '\x2', '\x2', '\xA7', '\xA9', '\x5', - '\x1A', '\xE', '\x2', '\xA8', '\xA7', '\x3', '\x2', '\x2', '\x2', '\xA8', - '\xA9', '\x3', '\x2', '\x2', '\x2', '\xA9', '\xAF', '\x3', '\x2', '\x2', - '\x2', '\xAA', '\xAB', '\a', '\x5', '\x2', '\x2', '\xAB', '\xAC', '\x5', - '\x4', '\x3', '\x2', '\xAC', '\xAD', '\a', '\x6', '\x2', '\x2', '\xAD', - '\xAF', '\x3', '\x2', '\x2', '\x2', '\xAE', '\xA6', '\x3', '\x2', '\x2', - '\x2', '\xAE', '\xAA', '\x3', '\x2', '\x2', '\x2', '\xAF', '\x19', '\x3', - '\x2', '\x2', '\x2', '\xB0', '\xBE', '\b', '\xE', '\x1', '\x2', '\xB1', - '\xB2', '\f', '\x6', '\x2', '\x2', '\xB2', '\xB3', '\a', '\a', '\x2', - '\x2', '\xB3', '\xBD', '\a', '>', '\x2', '\x2', '\xB4', '\xB5', '\f', - '\x5', '\x2', '\x2', '\xB5', '\xB6', '\a', '\b', '\x2', '\x2', '\xB6', - '\xB7', '\a', '<', '\x2', '\x2', '\xB7', '\xBD', '\a', '\t', '\x2', '\x2', - '\xB8', '\xB9', '\f', '\x4', '\x2', '\x2', '\xB9', '\xBA', '\a', '\b', - '\x2', '\x2', '\xBA', '\xBB', '\a', '=', '\x2', '\x2', '\xBB', '\xBD', - '\a', '\t', '\x2', '\x2', '\xBC', '\xB1', '\x3', '\x2', '\x2', '\x2', - '\xBC', '\xB4', '\x3', '\x2', '\x2', '\x2', '\xBC', '\xB8', '\x3', '\x2', - '\x2', '\x2', '\xBD', '\xC0', '\x3', '\x2', '\x2', '\x2', '\xBE', '\xBC', - '\x3', '\x2', '\x2', '\x2', '\xBE', '\xBF', '\x3', '\x2', '\x2', '\x2', - '\xBF', '\x1B', '\x3', '\x2', '\x2', '\x2', '\xC0', '\xBE', '\x3', '\x2', - '\x2', '\x2', '\xC1', '\xC2', '\a', ':', '\x2', '\x2', '\xC2', '\xC3', - '\x5', '.', '\x18', '\x2', '\xC3', '\x1D', '\x3', '\x2', '\x2', '\x2', - '\xC4', '\xC5', '\a', '*', '\x2', '\x2', '\xC5', '\xC6', '\a', '#', '\x2', - '\x2', '\xC6', '\xC7', '\x5', 'P', ')', '\x2', '\xC7', '\x1F', '\x3', - '\x2', '\x2', '\x2', '\xC8', '\xC9', '\a', '\x33', '\x2', '\x2', '\xC9', - '\xCA', '\a', '#', '\x2', '\x2', '\xCA', '\xCB', '\x5', '\"', '\x12', - '\x2', '\xCB', '!', '\x3', '\x2', '\x2', '\x2', '\xCC', '\xD1', '\x5', - '$', '\x13', '\x2', '\xCD', '\xCE', '\a', '\x4', '\x2', '\x2', '\xCE', - '\xD0', '\x5', '$', '\x13', '\x2', '\xCF', '\xCD', '\x3', '\x2', '\x2', - '\x2', '\xD0', '\xD3', '\x3', '\x2', '\x2', '\x2', '\xD1', '\xCF', '\x3', - '\x2', '\x2', '\x2', '\xD1', '\xD2', '\x3', '\x2', '\x2', '\x2', '\xD2', - '#', '\x3', '\x2', '\x2', '\x2', '\xD3', '\xD1', '\x3', '\x2', '\x2', - '\x2', '\xD4', '\xD6', '\x5', '.', '\x18', '\x2', '\xD5', '\xD7', '\x5', - '&', '\x14', '\x2', '\xD6', '\xD5', '\x3', '\x2', '\x2', '\x2', '\xD6', - '\xD7', '\x3', '\x2', '\x2', '\x2', '\xD7', '%', '\x3', '\x2', '\x2', - '\x2', '\xD8', '\xD9', '\t', '\x3', '\x2', '\x2', '\xD9', '\'', '\x3', - '\x2', '\x2', '\x2', '\xDA', '\xDB', '\a', '\x31', '\x2', '\x2', '\xDB', - '\xDC', '\x5', '*', '\x16', '\x2', '\xDC', '\xDD', '\a', '.', '\x2', '\x2', - '\xDD', '\xDE', '\x5', ',', '\x17', '\x2', '\xDE', ')', '\x3', '\x2', - '\x2', '\x2', '\xDF', '\xE0', '\t', '\x2', '\x2', '\x2', '\xE0', '+', - '\x3', '\x2', '\x2', '\x2', '\xE1', '\xE2', '\t', '\x2', '\x2', '\x2', - '\xE2', '-', '\x3', '\x2', '\x2', '\x2', '\xE3', '\xE4', '\b', '\x18', - '\x1', '\x2', '\xE4', '\xEF', '\x5', '\x30', '\x19', '\x2', '\xE5', '\xE7', - '\x5', '\x38', '\x1D', '\x2', '\xE6', '\xE8', '\a', '/', '\x2', '\x2', - '\xE7', '\xE6', '\x3', '\x2', '\x2', '\x2', '\xE7', '\xE8', '\x3', '\x2', - '\x2', '\x2', '\xE8', '\xE9', '\x3', '\x2', '\x2', '\x2', '\xE9', '\xEA', - '\a', '\"', '\x2', '\x2', '\xEA', '\xEB', '\x5', '\x38', '\x1D', '\x2', - '\xEB', '\xEC', '\a', '\x1E', '\x2', '\x2', '\xEC', '\xED', '\x5', '\x38', - '\x1D', '\x2', '\xED', '\xEF', '\x3', '\x2', '\x2', '\x2', '\xEE', '\xE3', - '\x3', '\x2', '\x2', '\x2', '\xEE', '\xE5', '\x3', '\x2', '\x2', '\x2', - '\xEF', '\xFB', '\x3', '\x2', '\x2', '\x2', '\xF0', '\xF1', '\f', '\x6', - '\x2', '\x2', '\xF1', '\xF2', '\a', '\n', '\x2', '\x2', '\xF2', '\xF3', - '\x5', '.', '\x18', '\x2', '\xF3', '\xF4', '\a', '\v', '\x2', '\x2', '\xF4', - '\xF5', '\x5', '.', '\x18', '\a', '\xF5', '\xFA', '\x3', '\x2', '\x2', - '\x2', '\xF6', '\xF7', '\f', '\x5', '\x2', '\x2', '\xF7', '\xF8', '\a', - '\f', '\x2', '\x2', '\xF8', '\xFA', '\x5', '.', '\x18', '\x6', '\xF9', - '\xF0', '\x3', '\x2', '\x2', '\x2', '\xF9', '\xF6', '\x3', '\x2', '\x2', - '\x2', '\xFA', '\xFD', '\x3', '\x2', '\x2', '\x2', '\xFB', '\xF9', '\x3', - '\x2', '\x2', '\x2', '\xFB', '\xFC', '\x3', '\x2', '\x2', '\x2', '\xFC', - '/', '\x3', '\x2', '\x2', '\x2', '\xFD', '\xFB', '\x3', '\x2', '\x2', - '\x2', '\xFE', '\xFF', '\b', '\x19', '\x1', '\x2', '\xFF', '\x103', '\x5', - '\x38', '\x1D', '\x2', '\x100', '\x103', '\x5', '\x32', '\x1A', '\x2', - '\x101', '\x103', '\x5', '\x34', '\x1B', '\x2', '\x102', '\xFE', '\x3', - '\x2', '\x2', '\x2', '\x102', '\x100', '\x3', '\x2', '\x2', '\x2', '\x102', - '\x101', '\x3', '\x2', '\x2', '\x2', '\x103', '\x10C', '\x3', '\x2', '\x2', - '\x2', '\x104', '\x105', '\f', '\x4', '\x2', '\x2', '\x105', '\x106', - '\a', '\x1E', '\x2', '\x2', '\x106', '\x10B', '\x5', '\x30', '\x19', '\x5', - '\x107', '\x108', '\f', '\x3', '\x2', '\x2', '\x108', '\x109', '\a', '\x32', - '\x2', '\x2', '\x109', '\x10B', '\x5', '\x30', '\x19', '\x4', '\x10A', - '\x104', '\x3', '\x2', '\x2', '\x2', '\x10A', '\x107', '\x3', '\x2', '\x2', - '\x2', '\x10B', '\x10E', '\x3', '\x2', '\x2', '\x2', '\x10C', '\x10A', - '\x3', '\x2', '\x2', '\x2', '\x10C', '\x10D', '\x3', '\x2', '\x2', '\x2', - '\x10D', '\x31', '\x3', '\x2', '\x2', '\x2', '\x10E', '\x10C', '\x3', - '\x2', '\x2', '\x2', '\x10F', '\x111', '\x5', '\x38', '\x1D', '\x2', '\x110', - '\x112', '\a', '/', '\x2', '\x2', '\x111', '\x110', '\x3', '\x2', '\x2', - '\x2', '\x111', '\x112', '\x3', '\x2', '\x2', '\x2', '\x112', '\x113', - '\x3', '\x2', '\x2', '\x2', '\x113', '\x114', '\a', '+', '\x2', '\x2', - '\x114', '\x115', '\a', '\x5', '\x2', '\x2', '\x115', '\x116', '\x5', - 'P', ')', '\x2', '\x116', '\x117', '\a', '\x6', '\x2', '\x2', '\x117', - '\x33', '\x3', '\x2', '\x2', '\x2', '\x118', '\x11A', '\x5', '\x38', '\x1D', - '\x2', '\x119', '\x11B', '\a', '/', '\x2', '\x2', '\x11A', '\x119', '\x3', - '\x2', '\x2', '\x2', '\x11A', '\x11B', '\x3', '\x2', '\x2', '\x2', '\x11B', - '\x11C', '\x3', '\x2', '\x2', '\x2', '\x11C', '\x11D', '\a', '-', '\x2', - '\x2', '\x11D', '\x11F', '\x5', '\x38', '\x1D', '\x2', '\x11E', '\x120', - '\x5', '\x36', '\x1C', '\x2', '\x11F', '\x11E', '\x3', '\x2', '\x2', '\x2', - '\x11F', '\x120', '\x3', '\x2', '\x2', '\x2', '\x120', '\x35', '\x3', - '\x2', '\x2', '\x2', '\x121', '\x122', '\a', '&', '\x2', '\x2', '\x122', - '\x123', '\a', '=', '\x2', '\x2', '\x123', '\x37', '\x3', '\x2', '\x2', - '\x2', '\x124', '\x125', '\b', '\x1D', '\x1', '\x2', '\x125', '\x126', - '\x5', 'J', '&', '\x2', '\x126', '\x149', '\x3', '\x2', '\x2', '\x2', - '\x127', '\x128', '\f', '\n', '\x2', '\x2', '\x128', '\x129', '\x5', ':', - '\x1E', '\x2', '\x129', '\x12A', '\x5', '\x38', '\x1D', '\v', '\x12A', - '\x148', '\x3', '\x2', '\x2', '\x2', '\x12B', '\x12C', '\f', '\t', '\x2', - '\x2', '\x12C', '\x12D', '\x5', '<', '\x1F', '\x2', '\x12D', '\x12E', - '\x5', '\x38', '\x1D', '\n', '\x12E', '\x148', '\x3', '\x2', '\x2', '\x2', - '\x12F', '\x130', '\f', '\b', '\x2', '\x2', '\x130', '\x131', '\x5', '>', - ' ', '\x2', '\x131', '\x132', '\x5', '\x38', '\x1D', '\t', '\x132', '\x148', - '\x3', '\x2', '\x2', '\x2', '\x133', '\x134', '\f', '\a', '\x2', '\x2', - '\x134', '\x135', '\x5', '@', '!', '\x2', '\x135', '\x136', '\x5', '\x38', - '\x1D', '\b', '\x136', '\x148', '\x3', '\x2', '\x2', '\x2', '\x137', '\x138', - '\f', '\x6', '\x2', '\x2', '\x138', '\x139', '\x5', '\x42', '\"', '\x2', - '\x139', '\x13A', '\x5', '\x38', '\x1D', '\a', '\x13A', '\x148', '\x3', - '\x2', '\x2', '\x2', '\x13B', '\x13C', '\f', '\x5', '\x2', '\x2', '\x13C', - '\x13D', '\x5', '\x44', '#', '\x2', '\x13D', '\x13E', '\x5', '\x38', '\x1D', - '\x6', '\x13E', '\x148', '\x3', '\x2', '\x2', '\x2', '\x13F', '\x140', - '\f', '\x4', '\x2', '\x2', '\x140', '\x141', '\x5', '\x46', '$', '\x2', - '\x141', '\x142', '\x5', '\x38', '\x1D', '\x5', '\x142', '\x148', '\x3', - '\x2', '\x2', '\x2', '\x143', '\x144', '\f', '\x3', '\x2', '\x2', '\x144', - '\x145', '\x5', 'H', '%', '\x2', '\x145', '\x146', '\x5', '\x38', '\x1D', - '\x4', '\x146', '\x148', '\x3', '\x2', '\x2', '\x2', '\x147', '\x127', - '\x3', '\x2', '\x2', '\x2', '\x147', '\x12B', '\x3', '\x2', '\x2', '\x2', - '\x147', '\x12F', '\x3', '\x2', '\x2', '\x2', '\x147', '\x133', '\x3', - '\x2', '\x2', '\x2', '\x147', '\x137', '\x3', '\x2', '\x2', '\x2', '\x147', - '\x13B', '\x3', '\x2', '\x2', '\x2', '\x147', '\x13F', '\x3', '\x2', '\x2', - '\x2', '\x147', '\x143', '\x3', '\x2', '\x2', '\x2', '\x148', '\x14B', - '\x3', '\x2', '\x2', '\x2', '\x149', '\x147', '\x3', '\x2', '\x2', '\x2', - '\x149', '\x14A', '\x3', '\x2', '\x2', '\x2', '\x14A', '\x39', '\x3', - '\x2', '\x2', '\x2', '\x14B', '\x149', '\x3', '\x2', '\x2', '\x2', '\x14C', - '\x14D', '\t', '\x4', '\x2', '\x2', '\x14D', ';', '\x3', '\x2', '\x2', - '\x2', '\x14E', '\x14F', '\t', '\x5', '\x2', '\x2', '\x14F', '=', '\x3', - '\x2', '\x2', '\x2', '\x150', '\x151', '\t', '\x6', '\x2', '\x2', '\x151', - '?', '\x3', '\x2', '\x2', '\x2', '\x152', '\x153', '\t', '\a', '\x2', - '\x2', '\x153', '\x41', '\x3', '\x2', '\x2', '\x2', '\x154', '\x155', - '\a', '\x17', '\x2', '\x2', '\x155', '\x43', '\x3', '\x2', '\x2', '\x2', - '\x156', '\x157', '\a', '\x18', '\x2', '\x2', '\x157', '\x45', '\x3', - '\x2', '\x2', '\x2', '\x158', '\x159', '\a', '\x19', '\x2', '\x2', '\x159', - 'G', '\x3', '\x2', '\x2', '\x2', '\x15A', '\x15B', '\a', '\x1A', '\x2', - '\x2', '\x15B', 'I', '\x3', '\x2', '\x2', '\x2', '\x15C', '\x161', '\x5', - 'N', '(', '\x2', '\x15D', '\x15E', '\x5', 'L', '\'', '\x2', '\x15E', '\x15F', - '\x5', 'J', '&', '\x2', '\x15F', '\x161', '\x3', '\x2', '\x2', '\x2', - '\x160', '\x15C', '\x3', '\x2', '\x2', '\x2', '\x160', '\x15D', '\x3', - '\x2', '\x2', '\x2', '\x161', 'K', '\x3', '\x2', '\x2', '\x2', '\x162', - '\x163', '\t', '\b', '\x2', '\x2', '\x163', 'M', '\x3', '\x2', '\x2', - '\x2', '\x164', '\x165', '\b', '(', '\x1', '\x2', '\x165', '\x18F', '\a', - '>', '\x2', '\x2', '\x166', '\x18F', '\a', '?', '\x2', '\x2', '\x167', - '\x18F', '\x5', 'V', ',', '\x2', '\x168', '\x16A', '\a', '\b', '\x2', - '\x2', '\x169', '\x16B', '\x5', 'P', ')', '\x2', '\x16A', '\x169', '\x3', - '\x2', '\x2', '\x2', '\x16A', '\x16B', '\x3', '\x2', '\x2', '\x2', '\x16B', - '\x16C', '\x3', '\x2', '\x2', '\x2', '\x16C', '\x18F', '\a', '\t', '\x2', - '\x2', '\x16D', '\x16F', '\a', '\x1C', '\x2', '\x2', '\x16E', '\x170', - '\x5', 'R', '*', '\x2', '\x16F', '\x16E', '\x3', '\x2', '\x2', '\x2', - '\x16F', '\x170', '\x3', '\x2', '\x2', '\x2', '\x170', '\x171', '\x3', - '\x2', '\x2', '\x2', '\x171', '\x18F', '\a', '\x1D', '\x2', '\x2', '\x172', - '\x173', '\a', '\x37', '\x2', '\x2', '\x173', '\x175', '\a', '\a', '\x2', - '\x2', '\x174', '\x172', '\x3', '\x2', '\x2', '\x2', '\x174', '\x175', - '\x3', '\x2', '\x2', '\x2', '\x175', '\x176', '\x3', '\x2', '\x2', '\x2', - '\x176', '\x177', '\a', '>', '\x2', '\x2', '\x177', '\x179', '\a', '\x5', - '\x2', '\x2', '\x178', '\x17A', '\x5', 'P', ')', '\x2', '\x179', '\x178', - '\x3', '\x2', '\x2', '\x2', '\x179', '\x17A', '\x3', '\x2', '\x2', '\x2', - '\x17A', '\x17B', '\x3', '\x2', '\x2', '\x2', '\x17B', '\x18F', '\a', - '\x6', '\x2', '\x2', '\x17C', '\x17D', '\a', '\x5', '\x2', '\x2', '\x17D', - '\x17E', '\x5', '.', '\x18', '\x2', '\x17E', '\x17F', '\a', '\x6', '\x2', - '\x2', '\x17F', '\x18F', '\x3', '\x2', '\x2', '\x2', '\x180', '\x181', - '\a', '\x5', '\x2', '\x2', '\x181', '\x182', '\x5', '\x4', '\x3', '\x2', - '\x182', '\x183', '\a', '\x6', '\x2', '\x2', '\x183', '\x18F', '\x3', - '\x2', '\x2', '\x2', '\x184', '\x185', '\a', '\'', '\x2', '\x2', '\x185', - '\x186', '\a', '\x5', '\x2', '\x2', '\x186', '\x187', '\x5', '\x4', '\x3', - '\x2', '\x187', '\x188', '\a', '\x6', '\x2', '\x2', '\x188', '\x18F', - '\x3', '\x2', '\x2', '\x2', '\x189', '\x18A', '\a', '\x1F', '\x2', '\x2', - '\x18A', '\x18B', '\a', '\x5', '\x2', '\x2', '\x18B', '\x18C', '\x5', - '\x4', '\x3', '\x2', '\x18C', '\x18D', '\a', '\x6', '\x2', '\x2', '\x18D', - '\x18F', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x164', '\x3', '\x2', '\x2', - '\x2', '\x18E', '\x166', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x167', - '\x3', '\x2', '\x2', '\x2', '\x18E', '\x168', '\x3', '\x2', '\x2', '\x2', - '\x18E', '\x16D', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x174', '\x3', - '\x2', '\x2', '\x2', '\x18E', '\x17C', '\x3', '\x2', '\x2', '\x2', '\x18E', - '\x180', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x184', '\x3', '\x2', '\x2', - '\x2', '\x18E', '\x189', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x19A', - '\x3', '\x2', '\x2', '\x2', '\x190', '\x191', '\f', '\x6', '\x2', '\x2', - '\x191', '\x192', '\a', '\a', '\x2', '\x2', '\x192', '\x199', '\a', '>', - '\x2', '\x2', '\x193', '\x194', '\f', '\x5', '\x2', '\x2', '\x194', '\x195', - '\a', '\b', '\x2', '\x2', '\x195', '\x196', '\x5', '.', '\x18', '\x2', - '\x196', '\x197', '\a', '\t', '\x2', '\x2', '\x197', '\x199', '\x3', '\x2', - '\x2', '\x2', '\x198', '\x190', '\x3', '\x2', '\x2', '\x2', '\x198', '\x193', - '\x3', '\x2', '\x2', '\x2', '\x199', '\x19C', '\x3', '\x2', '\x2', '\x2', - '\x19A', '\x198', '\x3', '\x2', '\x2', '\x2', '\x19A', '\x19B', '\x3', - '\x2', '\x2', '\x2', '\x19B', 'O', '\x3', '\x2', '\x2', '\x2', '\x19C', - '\x19A', '\x3', '\x2', '\x2', '\x2', '\x19D', '\x1A2', '\x5', '.', '\x18', - '\x2', '\x19E', '\x19F', '\a', '\x4', '\x2', '\x2', '\x19F', '\x1A1', - '\x5', '.', '\x18', '\x2', '\x1A0', '\x19E', '\x3', '\x2', '\x2', '\x2', - '\x1A1', '\x1A4', '\x3', '\x2', '\x2', '\x2', '\x1A2', '\x1A0', '\x3', - '\x2', '\x2', '\x2', '\x1A2', '\x1A3', '\x3', '\x2', '\x2', '\x2', '\x1A3', - 'Q', '\x3', '\x2', '\x2', '\x2', '\x1A4', '\x1A2', '\x3', '\x2', '\x2', - '\x2', '\x1A5', '\x1AA', '\x5', 'T', '+', '\x2', '\x1A6', '\x1A7', '\a', - '\x4', '\x2', '\x2', '\x1A7', '\x1A9', '\x5', 'T', '+', '\x2', '\x1A8', - '\x1A6', '\x3', '\x2', '\x2', '\x2', '\x1A9', '\x1AC', '\x3', '\x2', '\x2', - '\x2', '\x1AA', '\x1A8', '\x3', '\x2', '\x2', '\x2', '\x1AA', '\x1AB', - '\x3', '\x2', '\x2', '\x2', '\x1AB', 'S', '\x3', '\x2', '\x2', '\x2', - '\x1AC', '\x1AA', '\x3', '\x2', '\x2', '\x2', '\x1AD', '\x1AE', '\a', - '=', '\x2', '\x2', '\x1AE', '\x1AF', '\a', '\v', '\x2', '\x2', '\x1AF', - '\x1B0', '\x5', '.', '\x18', '\x2', '\x1B0', 'U', '\x3', '\x2', '\x2', - '\x2', '\x1B1', '\x1B2', '\t', '\t', '\x2', '\x2', '\x1B2', 'W', '\x3', - '\x2', '\x2', '\x2', ',', ']', '`', '\x63', '\x66', 'i', 'm', 'p', 'z', - '\x86', '\x8C', '\x94', '\x97', '\x9C', '\xA3', '\xA8', '\xAE', '\xBC', - '\xBE', '\xD1', '\xD6', '\xE7', '\xEE', '\xF9', '\xFB', '\x102', '\x10A', - '\x10C', '\x111', '\x11A', '\x11F', '\x147', '\x149', '\x160', '\x16A', - '\x16F', '\x174', '\x179', '\x18E', '\x198', '\x19A', '\x1A2', '\x1AA', + '\x42', '\x44', '\x46', 'H', 'J', 'L', 'N', 'P', 'R', 'T', 'V', 'X', 'Z', + '\x2', '\v', '\x4', '\x2', '?', '?', '\x42', '\x42', '\x4', '\x2', '\"', + '\"', '%', '%', '\x4', '\x2', '\x3', '\x3', '\r', '\xE', '\x3', '\x2', + '\xF', '\x10', '\x3', '\x2', '\x11', '\x14', '\x3', '\x2', '\x15', '\x16', + '\x5', '\x2', '\xF', '\x10', '\x1B', '\x1B', '\x31', '\x31', '\x4', '\x2', + '\x1E', '\x1E', '\x41', '\x41', '\a', '\x2', ')', ')', '\x32', '\x32', + '\x39', '\x39', ';', ';', '?', '@', '\x2', '\x1E2', '\x2', '\\', '\x3', + '\x2', '\x2', '\x2', '\x4', '_', '\x3', '\x2', '\x2', '\x2', '\x6', 'o', + '\x3', '\x2', '\x2', '\x2', '\b', 'x', '\x3', '\x2', '\x2', '\x2', '\n', + '~', '\x3', '\x2', '\x2', '\x2', '\f', '\x80', '\x3', '\x2', '\x2', '\x2', + '\xE', '\x82', '\x3', '\x2', '\x2', '\x2', '\x10', '\x85', '\x3', '\x2', + '\x2', '\x2', '\x12', '\x8D', '\x3', '\x2', '\x2', '\x2', '\x14', '\x92', + '\x3', '\x2', '\x2', '\x2', '\x16', '\xA1', '\x3', '\x2', '\x2', '\x2', + '\x18', '\xB3', '\x3', '\x2', '\x2', '\x2', '\x1A', '\xB5', '\x3', '\x2', + '\x2', '\x2', '\x1C', '\xC6', '\x3', '\x2', '\x2', '\x2', '\x1E', '\xC9', + '\x3', '\x2', '\x2', '\x2', ' ', '\xCD', '\x3', '\x2', '\x2', '\x2', '\"', + '\xD1', '\x3', '\x2', '\x2', '\x2', '$', '\xD9', '\x3', '\x2', '\x2', + '\x2', '&', '\xDD', '\x3', '\x2', '\x2', '\x2', '(', '\xDF', '\x3', '\x2', + '\x2', '\x2', '*', '\xE4', '\x3', '\x2', '\x2', '\x2', ',', '\xE6', '\x3', + '\x2', '\x2', '\x2', '.', '\xF3', '\x3', '\x2', '\x2', '\x2', '\x30', + '\x107', '\x3', '\x2', '\x2', '\x2', '\x32', '\x114', '\x3', '\x2', '\x2', + '\x2', '\x34', '\x11D', '\x3', '\x2', '\x2', '\x2', '\x36', '\x126', '\x3', + '\x2', '\x2', '\x2', '\x38', '\x129', '\x3', '\x2', '\x2', '\x2', ':', + '\x151', '\x3', '\x2', '\x2', '\x2', '<', '\x153', '\x3', '\x2', '\x2', + '\x2', '>', '\x155', '\x3', '\x2', '\x2', '\x2', '@', '\x157', '\x3', + '\x2', '\x2', '\x2', '\x42', '\x159', '\x3', '\x2', '\x2', '\x2', '\x44', + '\x15B', '\x3', '\x2', '\x2', '\x2', '\x46', '\x15D', '\x3', '\x2', '\x2', + '\x2', 'H', '\x15F', '\x3', '\x2', '\x2', '\x2', 'J', '\x165', '\x3', + '\x2', '\x2', '\x2', 'L', '\x167', '\x3', '\x2', '\x2', '\x2', 'N', '\x18F', + '\x3', '\x2', '\x2', '\x2', 'P', '\x1B5', '\x3', '\x2', '\x2', '\x2', + 'R', '\x1B7', '\x3', '\x2', '\x2', '\x2', 'T', '\x1BF', '\x3', '\x2', + '\x2', '\x2', 'V', '\x1C7', '\x3', '\x2', '\x2', '\x2', 'X', '\x1CB', + '\x3', '\x2', '\x2', '\x2', 'Z', '\x1CD', '\x3', '\x2', '\x2', '\x2', + '\\', ']', '\x5', '\x4', '\x3', '\x2', ']', '^', '\a', '\x2', '\x2', '\x3', + '^', '\x3', '\x3', '\x2', '\x2', '\x2', '_', '\x61', '\x5', '\x6', '\x4', + '\x2', '`', '\x62', '\x5', '\x14', '\v', '\x2', '\x61', '`', '\x3', '\x2', + '\x2', '\x2', '\x61', '\x62', '\x3', '\x2', '\x2', '\x2', '\x62', '\x64', + '\x3', '\x2', '\x2', '\x2', '\x63', '\x65', '\x5', '\x1C', '\xF', '\x2', + '\x64', '\x63', '\x3', '\x2', '\x2', '\x2', '\x64', '\x65', '\x3', '\x2', + '\x2', '\x2', '\x65', 'g', '\x3', '\x2', '\x2', '\x2', '\x66', 'h', '\x5', + '\x1E', '\x10', '\x2', 'g', '\x66', '\x3', '\x2', '\x2', '\x2', 'g', 'h', + '\x3', '\x2', '\x2', '\x2', 'h', 'j', '\x3', '\x2', '\x2', '\x2', 'i', + 'k', '\x5', ' ', '\x11', '\x2', 'j', 'i', '\x3', '\x2', '\x2', '\x2', + 'j', 'k', '\x3', '\x2', '\x2', '\x2', 'k', 'm', '\x3', '\x2', '\x2', '\x2', + 'l', 'n', '\x5', '(', '\x15', '\x2', 'm', 'l', '\x3', '\x2', '\x2', '\x2', + 'm', 'n', '\x3', '\x2', '\x2', '\x2', 'n', '\x5', '\x3', '\x2', '\x2', + '\x2', 'o', 'q', '\a', '\x37', '\x2', '\x2', 'p', 'r', '\a', '&', '\x2', + '\x2', 'q', 'p', '\x3', '\x2', '\x2', '\x2', 'q', 'r', '\x3', '\x2', '\x2', + '\x2', 'r', 't', '\x3', '\x2', '\x2', '\x2', 's', 'u', '\x5', '\b', '\x5', + '\x2', 't', 's', '\x3', '\x2', '\x2', '\x2', 't', 'u', '\x3', '\x2', '\x2', + '\x2', 'u', 'v', '\x3', '\x2', '\x2', '\x2', 'v', 'w', '\x5', '\n', '\x6', + '\x2', 'w', '\a', '\x3', '\x2', '\x2', '\x2', 'x', 'y', '\a', '\x38', + '\x2', '\x2', 'y', 'z', '\t', '\x2', '\x2', '\x2', 'z', '\t', '\x3', '\x2', + '\x2', '\x2', '{', '\x7F', '\x5', '\f', '\a', '\x2', '|', '\x7F', '\x5', + '\xE', '\b', '\x2', '}', '\x7F', '\x5', '\x10', '\t', '\x2', '~', '{', + '\x3', '\x2', '\x2', '\x2', '~', '|', '\x3', '\x2', '\x2', '\x2', '~', + '}', '\x3', '\x2', '\x2', '\x2', '\x7F', '\v', '\x3', '\x2', '\x2', '\x2', + '\x80', '\x81', '\a', '\x3', '\x2', '\x2', '\x81', '\r', '\x3', '\x2', + '\x2', '\x2', '\x82', '\x83', '\a', '<', '\x2', '\x2', '\x83', '\x84', + '\x5', '.', '\x18', '\x2', '\x84', '\xF', '\x3', '\x2', '\x2', '\x2', + '\x85', '\x8A', '\x5', '\x12', '\n', '\x2', '\x86', '\x87', '\a', '\x4', + '\x2', '\x2', '\x87', '\x89', '\x5', '\x12', '\n', '\x2', '\x88', '\x86', + '\x3', '\x2', '\x2', '\x2', '\x89', '\x8C', '\x3', '\x2', '\x2', '\x2', + '\x8A', '\x88', '\x3', '\x2', '\x2', '\x2', '\x8A', '\x8B', '\x3', '\x2', + '\x2', '\x2', '\x8B', '\x11', '\x3', '\x2', '\x2', '\x2', '\x8C', '\x8A', + '\x3', '\x2', '\x2', '\x2', '\x8D', '\x90', '\x5', '.', '\x18', '\x2', + '\x8E', '\x8F', '\a', '!', '\x2', '\x2', '\x8F', '\x91', '\x5', 'X', '-', + '\x2', '\x90', '\x8E', '\x3', '\x2', '\x2', '\x2', '\x90', '\x91', '\x3', + '\x2', '\x2', '\x2', '\x91', '\x13', '\x3', '\x2', '\x2', '\x2', '\x92', + '\x93', '\a', '*', '\x2', '\x2', '\x93', '\x94', '\x5', '\x16', '\f', + '\x2', '\x94', '\x15', '\x3', '\x2', '\x2', '\x2', '\x95', '\x96', '\b', + '\f', '\x1', '\x2', '\x96', '\x9B', '\x5', '\x18', '\r', '\x2', '\x97', + '\x99', '\a', '!', '\x2', '\x2', '\x98', '\x97', '\x3', '\x2', '\x2', + '\x2', '\x98', '\x99', '\x3', '\x2', '\x2', '\x2', '\x99', '\x9A', '\x3', + '\x2', '\x2', '\x2', '\x9A', '\x9C', '\x5', 'X', '-', '\x2', '\x9B', '\x98', + '\x3', '\x2', '\x2', '\x2', '\x9B', '\x9C', '\x3', '\x2', '\x2', '\x2', + '\x9C', '\xA2', '\x3', '\x2', '\x2', '\x2', '\x9D', '\x9E', '\x5', 'X', + '-', '\x2', '\x9E', '\x9F', '\a', ',', '\x2', '\x2', '\x9F', '\xA0', '\x5', + '\x18', '\r', '\x2', '\xA0', '\xA2', '\x3', '\x2', '\x2', '\x2', '\xA1', + '\x95', '\x3', '\x2', '\x2', '\x2', '\xA1', '\x9D', '\x3', '\x2', '\x2', + '\x2', '\xA2', '\xA8', '\x3', '\x2', '\x2', '\x2', '\xA3', '\xA4', '\f', + '\x3', '\x2', '\x2', '\xA4', '\xA5', '\a', '-', '\x2', '\x2', '\xA5', + '\xA7', '\x5', '\x16', '\f', '\x4', '\xA6', '\xA3', '\x3', '\x2', '\x2', + '\x2', '\xA7', '\xAA', '\x3', '\x2', '\x2', '\x2', '\xA8', '\xA6', '\x3', + '\x2', '\x2', '\x2', '\xA8', '\xA9', '\x3', '\x2', '\x2', '\x2', '\xA9', + '\x17', '\x3', '\x2', '\x2', '\x2', '\xAA', '\xA8', '\x3', '\x2', '\x2', + '\x2', '\xAB', '\xAD', '\x5', 'X', '-', '\x2', '\xAC', '\xAE', '\x5', + '\x1A', '\xE', '\x2', '\xAD', '\xAC', '\x3', '\x2', '\x2', '\x2', '\xAD', + '\xAE', '\x3', '\x2', '\x2', '\x2', '\xAE', '\xB4', '\x3', '\x2', '\x2', + '\x2', '\xAF', '\xB0', '\a', '\x5', '\x2', '\x2', '\xB0', '\xB1', '\x5', + '\x4', '\x3', '\x2', '\xB1', '\xB2', '\a', '\x6', '\x2', '\x2', '\xB2', + '\xB4', '\x3', '\x2', '\x2', '\x2', '\xB3', '\xAB', '\x3', '\x2', '\x2', + '\x2', '\xB3', '\xAF', '\x3', '\x2', '\x2', '\x2', '\xB4', '\x19', '\x3', + '\x2', '\x2', '\x2', '\xB5', '\xC3', '\b', '\xE', '\x1', '\x2', '\xB6', + '\xB7', '\f', '\x6', '\x2', '\x2', '\xB7', '\xB8', '\a', '\a', '\x2', + '\x2', '\xB8', '\xC2', '\x5', 'X', '-', '\x2', '\xB9', '\xBA', '\f', '\x5', + '\x2', '\x2', '\xBA', '\xBB', '\a', '\b', '\x2', '\x2', '\xBB', '\xBC', + '\a', '?', '\x2', '\x2', '\xBC', '\xC2', '\a', '\t', '\x2', '\x2', '\xBD', + '\xBE', '\f', '\x4', '\x2', '\x2', '\xBE', '\xBF', '\a', '\b', '\x2', + '\x2', '\xBF', '\xC0', '\a', '@', '\x2', '\x2', '\xC0', '\xC2', '\a', + '\t', '\x2', '\x2', '\xC1', '\xB6', '\x3', '\x2', '\x2', '\x2', '\xC1', + '\xB9', '\x3', '\x2', '\x2', '\x2', '\xC1', '\xBD', '\x3', '\x2', '\x2', + '\x2', '\xC2', '\xC5', '\x3', '\x2', '\x2', '\x2', '\xC3', '\xC1', '\x3', + '\x2', '\x2', '\x2', '\xC3', '\xC4', '\x3', '\x2', '\x2', '\x2', '\xC4', + '\x1B', '\x3', '\x2', '\x2', '\x2', '\xC5', '\xC3', '\x3', '\x2', '\x2', + '\x2', '\xC6', '\xC7', '\a', '=', '\x2', '\x2', '\xC7', '\xC8', '\x5', + '.', '\x18', '\x2', '\xC8', '\x1D', '\x3', '\x2', '\x2', '\x2', '\xC9', + '\xCA', '\a', '+', '\x2', '\x2', '\xCA', '\xCB', '\a', '$', '\x2', '\x2', + '\xCB', '\xCC', '\x5', 'R', '*', '\x2', '\xCC', '\x1F', '\x3', '\x2', + '\x2', '\x2', '\xCD', '\xCE', '\a', '\x35', '\x2', '\x2', '\xCE', '\xCF', + '\a', '$', '\x2', '\x2', '\xCF', '\xD0', '\x5', '\"', '\x12', '\x2', '\xD0', + '!', '\x3', '\x2', '\x2', '\x2', '\xD1', '\xD6', '\x5', '$', '\x13', '\x2', + '\xD2', '\xD3', '\a', '\x4', '\x2', '\x2', '\xD3', '\xD5', '\x5', '$', + '\x13', '\x2', '\xD4', '\xD2', '\x3', '\x2', '\x2', '\x2', '\xD5', '\xD8', + '\x3', '\x2', '\x2', '\x2', '\xD6', '\xD4', '\x3', '\x2', '\x2', '\x2', + '\xD6', '\xD7', '\x3', '\x2', '\x2', '\x2', '\xD7', '#', '\x3', '\x2', + '\x2', '\x2', '\xD8', '\xD6', '\x3', '\x2', '\x2', '\x2', '\xD9', '\xDB', + '\x5', '.', '\x18', '\x2', '\xDA', '\xDC', '\x5', '&', '\x14', '\x2', + '\xDB', '\xDA', '\x3', '\x2', '\x2', '\x2', '\xDB', '\xDC', '\x3', '\x2', + '\x2', '\x2', '\xDC', '%', '\x3', '\x2', '\x2', '\x2', '\xDD', '\xDE', + '\t', '\x3', '\x2', '\x2', '\xDE', '\'', '\x3', '\x2', '\x2', '\x2', '\xDF', + '\xE0', '\a', '\x33', '\x2', '\x2', '\xE0', '\xE1', '\x5', '*', '\x16', + '\x2', '\xE1', '\xE2', '\a', '\x30', '\x2', '\x2', '\xE2', '\xE3', '\x5', + ',', '\x17', '\x2', '\xE3', ')', '\x3', '\x2', '\x2', '\x2', '\xE4', '\xE5', + '\t', '\x2', '\x2', '\x2', '\xE5', '+', '\x3', '\x2', '\x2', '\x2', '\xE6', + '\xE7', '\t', '\x2', '\x2', '\x2', '\xE7', '-', '\x3', '\x2', '\x2', '\x2', + '\xE8', '\xE9', '\b', '\x18', '\x1', '\x2', '\xE9', '\xF4', '\x5', '\x30', + '\x19', '\x2', '\xEA', '\xEC', '\x5', '\x38', '\x1D', '\x2', '\xEB', '\xED', + '\a', '\x31', '\x2', '\x2', '\xEC', '\xEB', '\x3', '\x2', '\x2', '\x2', + '\xEC', '\xED', '\x3', '\x2', '\x2', '\x2', '\xED', '\xEE', '\x3', '\x2', + '\x2', '\x2', '\xEE', '\xEF', '\a', '#', '\x2', '\x2', '\xEF', '\xF0', + '\x5', '\x38', '\x1D', '\x2', '\xF0', '\xF1', '\a', '\x1F', '\x2', '\x2', + '\xF1', '\xF2', '\x5', '\x38', '\x1D', '\x2', '\xF2', '\xF4', '\x3', '\x2', + '\x2', '\x2', '\xF3', '\xE8', '\x3', '\x2', '\x2', '\x2', '\xF3', '\xEA', + '\x3', '\x2', '\x2', '\x2', '\xF4', '\x100', '\x3', '\x2', '\x2', '\x2', + '\xF5', '\xF6', '\f', '\x6', '\x2', '\x2', '\xF6', '\xF7', '\a', '\n', + '\x2', '\x2', '\xF7', '\xF8', '\x5', '.', '\x18', '\x2', '\xF8', '\xF9', + '\a', '\v', '\x2', '\x2', '\xF9', '\xFA', '\x5', '.', '\x18', '\a', '\xFA', + '\xFF', '\x3', '\x2', '\x2', '\x2', '\xFB', '\xFC', '\f', '\x5', '\x2', + '\x2', '\xFC', '\xFD', '\a', '\f', '\x2', '\x2', '\xFD', '\xFF', '\x5', + '.', '\x18', '\x6', '\xFE', '\xF5', '\x3', '\x2', '\x2', '\x2', '\xFE', + '\xFB', '\x3', '\x2', '\x2', '\x2', '\xFF', '\x102', '\x3', '\x2', '\x2', + '\x2', '\x100', '\xFE', '\x3', '\x2', '\x2', '\x2', '\x100', '\x101', + '\x3', '\x2', '\x2', '\x2', '\x101', '/', '\x3', '\x2', '\x2', '\x2', + '\x102', '\x100', '\x3', '\x2', '\x2', '\x2', '\x103', '\x104', '\b', + '\x19', '\x1', '\x2', '\x104', '\x108', '\x5', '\x38', '\x1D', '\x2', + '\x105', '\x108', '\x5', '\x32', '\x1A', '\x2', '\x106', '\x108', '\x5', + '\x34', '\x1B', '\x2', '\x107', '\x103', '\x3', '\x2', '\x2', '\x2', '\x107', + '\x105', '\x3', '\x2', '\x2', '\x2', '\x107', '\x106', '\x3', '\x2', '\x2', + '\x2', '\x108', '\x111', '\x3', '\x2', '\x2', '\x2', '\x109', '\x10A', + '\f', '\x4', '\x2', '\x2', '\x10A', '\x10B', '\a', '\x1F', '\x2', '\x2', + '\x10B', '\x110', '\x5', '\x30', '\x19', '\x5', '\x10C', '\x10D', '\f', + '\x3', '\x2', '\x2', '\x10D', '\x10E', '\a', '\x34', '\x2', '\x2', '\x10E', + '\x110', '\x5', '\x30', '\x19', '\x4', '\x10F', '\x109', '\x3', '\x2', + '\x2', '\x2', '\x10F', '\x10C', '\x3', '\x2', '\x2', '\x2', '\x110', '\x113', + '\x3', '\x2', '\x2', '\x2', '\x111', '\x10F', '\x3', '\x2', '\x2', '\x2', + '\x111', '\x112', '\x3', '\x2', '\x2', '\x2', '\x112', '\x31', '\x3', + '\x2', '\x2', '\x2', '\x113', '\x111', '\x3', '\x2', '\x2', '\x2', '\x114', + '\x116', '\x5', '\x38', '\x1D', '\x2', '\x115', '\x117', '\a', '\x31', + '\x2', '\x2', '\x116', '\x115', '\x3', '\x2', '\x2', '\x2', '\x116', '\x117', + '\x3', '\x2', '\x2', '\x2', '\x117', '\x118', '\x3', '\x2', '\x2', '\x2', + '\x118', '\x119', '\a', ',', '\x2', '\x2', '\x119', '\x11A', '\a', '\x5', + '\x2', '\x2', '\x11A', '\x11B', '\x5', 'R', '*', '\x2', '\x11B', '\x11C', + '\a', '\x6', '\x2', '\x2', '\x11C', '\x33', '\x3', '\x2', '\x2', '\x2', + '\x11D', '\x11F', '\x5', '\x38', '\x1D', '\x2', '\x11E', '\x120', '\a', + '\x31', '\x2', '\x2', '\x11F', '\x11E', '\x3', '\x2', '\x2', '\x2', '\x11F', + '\x120', '\x3', '\x2', '\x2', '\x2', '\x120', '\x121', '\x3', '\x2', '\x2', + '\x2', '\x121', '\x122', '\a', '/', '\x2', '\x2', '\x122', '\x124', '\x5', + '\x38', '\x1D', '\x2', '\x123', '\x125', '\x5', '\x36', '\x1C', '\x2', + '\x124', '\x123', '\x3', '\x2', '\x2', '\x2', '\x124', '\x125', '\x3', + '\x2', '\x2', '\x2', '\x125', '\x35', '\x3', '\x2', '\x2', '\x2', '\x126', + '\x127', '\a', '\'', '\x2', '\x2', '\x127', '\x128', '\a', '@', '\x2', + '\x2', '\x128', '\x37', '\x3', '\x2', '\x2', '\x2', '\x129', '\x12A', + '\b', '\x1D', '\x1', '\x2', '\x12A', '\x12B', '\x5', 'J', '&', '\x2', + '\x12B', '\x14E', '\x3', '\x2', '\x2', '\x2', '\x12C', '\x12D', '\f', + '\n', '\x2', '\x2', '\x12D', '\x12E', '\x5', ':', '\x1E', '\x2', '\x12E', + '\x12F', '\x5', '\x38', '\x1D', '\v', '\x12F', '\x14D', '\x3', '\x2', + '\x2', '\x2', '\x130', '\x131', '\f', '\t', '\x2', '\x2', '\x131', '\x132', + '\x5', '<', '\x1F', '\x2', '\x132', '\x133', '\x5', '\x38', '\x1D', '\n', + '\x133', '\x14D', '\x3', '\x2', '\x2', '\x2', '\x134', '\x135', '\f', + '\b', '\x2', '\x2', '\x135', '\x136', '\x5', '>', ' ', '\x2', '\x136', + '\x137', '\x5', '\x38', '\x1D', '\t', '\x137', '\x14D', '\x3', '\x2', + '\x2', '\x2', '\x138', '\x139', '\f', '\a', '\x2', '\x2', '\x139', '\x13A', + '\x5', '@', '!', '\x2', '\x13A', '\x13B', '\x5', '\x38', '\x1D', '\b', + '\x13B', '\x14D', '\x3', '\x2', '\x2', '\x2', '\x13C', '\x13D', '\f', + '\x6', '\x2', '\x2', '\x13D', '\x13E', '\x5', '\x42', '\"', '\x2', '\x13E', + '\x13F', '\x5', '\x38', '\x1D', '\a', '\x13F', '\x14D', '\x3', '\x2', + '\x2', '\x2', '\x140', '\x141', '\f', '\x5', '\x2', '\x2', '\x141', '\x142', + '\x5', '\x44', '#', '\x2', '\x142', '\x143', '\x5', '\x38', '\x1D', '\x6', + '\x143', '\x14D', '\x3', '\x2', '\x2', '\x2', '\x144', '\x145', '\f', + '\x4', '\x2', '\x2', '\x145', '\x146', '\x5', '\x46', '$', '\x2', '\x146', + '\x147', '\x5', '\x38', '\x1D', '\x5', '\x147', '\x14D', '\x3', '\x2', + '\x2', '\x2', '\x148', '\x149', '\f', '\x3', '\x2', '\x2', '\x149', '\x14A', + '\x5', 'H', '%', '\x2', '\x14A', '\x14B', '\x5', '\x38', '\x1D', '\x4', + '\x14B', '\x14D', '\x3', '\x2', '\x2', '\x2', '\x14C', '\x12C', '\x3', + '\x2', '\x2', '\x2', '\x14C', '\x130', '\x3', '\x2', '\x2', '\x2', '\x14C', + '\x134', '\x3', '\x2', '\x2', '\x2', '\x14C', '\x138', '\x3', '\x2', '\x2', + '\x2', '\x14C', '\x13C', '\x3', '\x2', '\x2', '\x2', '\x14C', '\x140', + '\x3', '\x2', '\x2', '\x2', '\x14C', '\x144', '\x3', '\x2', '\x2', '\x2', + '\x14C', '\x148', '\x3', '\x2', '\x2', '\x2', '\x14D', '\x150', '\x3', + '\x2', '\x2', '\x2', '\x14E', '\x14C', '\x3', '\x2', '\x2', '\x2', '\x14E', + '\x14F', '\x3', '\x2', '\x2', '\x2', '\x14F', '\x39', '\x3', '\x2', '\x2', + '\x2', '\x150', '\x14E', '\x3', '\x2', '\x2', '\x2', '\x151', '\x152', + '\t', '\x4', '\x2', '\x2', '\x152', ';', '\x3', '\x2', '\x2', '\x2', '\x153', + '\x154', '\t', '\x5', '\x2', '\x2', '\x154', '=', '\x3', '\x2', '\x2', + '\x2', '\x155', '\x156', '\t', '\x6', '\x2', '\x2', '\x156', '?', '\x3', + '\x2', '\x2', '\x2', '\x157', '\x158', '\t', '\a', '\x2', '\x2', '\x158', + '\x41', '\x3', '\x2', '\x2', '\x2', '\x159', '\x15A', '\a', '\x17', '\x2', + '\x2', '\x15A', '\x43', '\x3', '\x2', '\x2', '\x2', '\x15B', '\x15C', + '\a', '\x18', '\x2', '\x2', '\x15C', '\x45', '\x3', '\x2', '\x2', '\x2', + '\x15D', '\x15E', '\a', '\x19', '\x2', '\x2', '\x15E', 'G', '\x3', '\x2', + '\x2', '\x2', '\x15F', '\x160', '\a', '\x1A', '\x2', '\x2', '\x160', 'I', + '\x3', '\x2', '\x2', '\x2', '\x161', '\x166', '\x5', 'N', '(', '\x2', + '\x162', '\x163', '\x5', 'L', '\'', '\x2', '\x163', '\x164', '\x5', 'J', + '&', '\x2', '\x164', '\x166', '\x3', '\x2', '\x2', '\x2', '\x165', '\x161', + '\x3', '\x2', '\x2', '\x2', '\x165', '\x162', '\x3', '\x2', '\x2', '\x2', + '\x166', 'K', '\x3', '\x2', '\x2', '\x2', '\x167', '\x168', '\t', '\b', + '\x2', '\x2', '\x168', 'M', '\x3', '\x2', '\x2', '\x2', '\x169', '\x16A', + '\b', '(', '\x1', '\x2', '\x16A', '\x190', '\x5', 'X', '-', '\x2', '\x16B', + '\x190', '\a', '\x42', '\x2', '\x2', '\x16C', '\x190', '\x5', 'Z', '.', + '\x2', '\x16D', '\x16F', '\a', '\b', '\x2', '\x2', '\x16E', '\x170', '\x5', + 'R', '*', '\x2', '\x16F', '\x16E', '\x3', '\x2', '\x2', '\x2', '\x16F', + '\x170', '\x3', '\x2', '\x2', '\x2', '\x170', '\x171', '\x3', '\x2', '\x2', + '\x2', '\x171', '\x190', '\a', '\t', '\x2', '\x2', '\x172', '\x174', '\a', + '\x1C', '\x2', '\x2', '\x173', '\x175', '\x5', 'T', '+', '\x2', '\x174', + '\x173', '\x3', '\x2', '\x2', '\x2', '\x174', '\x175', '\x3', '\x2', '\x2', + '\x2', '\x175', '\x176', '\x3', '\x2', '\x2', '\x2', '\x176', '\x190', + '\a', '\x1D', '\x2', '\x2', '\x177', '\x178', '\a', '\x5', '\x2', '\x2', + '\x178', '\x179', '\x5', '.', '\x18', '\x2', '\x179', '\x17A', '\a', '\x6', + '\x2', '\x2', '\x17A', '\x190', '\x3', '\x2', '\x2', '\x2', '\x17B', '\x17C', + '\a', '\x5', '\x2', '\x2', '\x17C', '\x17D', '\x5', '\x4', '\x3', '\x2', + '\x17D', '\x17E', '\a', '\x6', '\x2', '\x2', '\x17E', '\x190', '\x3', + '\x2', '\x2', '\x2', '\x17F', '\x180', '\a', '(', '\x2', '\x2', '\x180', + '\x181', '\a', '\x5', '\x2', '\x2', '\x181', '\x182', '\x5', '\x4', '\x3', + '\x2', '\x182', '\x183', '\a', '\x6', '\x2', '\x2', '\x183', '\x190', + '\x3', '\x2', '\x2', '\x2', '\x184', '\x185', '\a', ' ', '\x2', '\x2', + '\x185', '\x186', '\a', '\x5', '\x2', '\x2', '\x186', '\x187', '\x5', + '\x4', '\x3', '\x2', '\x187', '\x188', '\a', '\x6', '\x2', '\x2', '\x188', + '\x190', '\x3', '\x2', '\x2', '\x2', '\x189', '\x18A', '\a', '\x1E', '\x2', + '\x2', '\x18A', '\x18B', '\a', '\x5', '\x2', '\x2', '\x18B', '\x18C', + '\x5', '\x4', '\x3', '\x2', '\x18C', '\x18D', '\a', '\x6', '\x2', '\x2', + '\x18D', '\x190', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x190', '\x5', + 'P', ')', '\x2', '\x18F', '\x169', '\x3', '\x2', '\x2', '\x2', '\x18F', + '\x16B', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x16C', '\x3', '\x2', '\x2', + '\x2', '\x18F', '\x16D', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x172', + '\x3', '\x2', '\x2', '\x2', '\x18F', '\x177', '\x3', '\x2', '\x2', '\x2', + '\x18F', '\x17B', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x17F', '\x3', + '\x2', '\x2', '\x2', '\x18F', '\x184', '\x3', '\x2', '\x2', '\x2', '\x18F', + '\x189', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x18E', '\x3', '\x2', '\x2', + '\x2', '\x190', '\x19B', '\x3', '\x2', '\x2', '\x2', '\x191', '\x192', + '\f', '\b', '\x2', '\x2', '\x192', '\x193', '\a', '\a', '\x2', '\x2', + '\x193', '\x19A', '\x5', 'X', '-', '\x2', '\x194', '\x195', '\f', '\a', + '\x2', '\x2', '\x195', '\x196', '\a', '\b', '\x2', '\x2', '\x196', '\x197', + '\x5', '.', '\x18', '\x2', '\x197', '\x198', '\a', '\t', '\x2', '\x2', + '\x198', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x199', '\x191', '\x3', + '\x2', '\x2', '\x2', '\x199', '\x194', '\x3', '\x2', '\x2', '\x2', '\x19A', + '\x19D', '\x3', '\x2', '\x2', '\x2', '\x19B', '\x199', '\x3', '\x2', '\x2', + '\x2', '\x19B', '\x19C', '\x3', '\x2', '\x2', '\x2', '\x19C', 'O', '\x3', + '\x2', '\x2', '\x2', '\x19D', '\x19B', '\x3', '\x2', '\x2', '\x2', '\x19E', + '\x19F', '\a', ':', '\x2', '\x2', '\x19F', '\x1A1', '\a', '\a', '\x2', + '\x2', '\x1A0', '\x19E', '\x3', '\x2', '\x2', '\x2', '\x1A0', '\x1A1', + '\x3', '\x2', '\x2', '\x2', '\x1A1', '\x1A2', '\x3', '\x2', '\x2', '\x2', + '\x1A2', '\x1A3', '\x5', 'X', '-', '\x2', '\x1A3', '\x1A5', '\a', '\x5', + '\x2', '\x2', '\x1A4', '\x1A6', '\x5', 'R', '*', '\x2', '\x1A5', '\x1A4', + '\x3', '\x2', '\x2', '\x2', '\x1A5', '\x1A6', '\x3', '\x2', '\x2', '\x2', + '\x1A6', '\x1A7', '\x3', '\x2', '\x2', '\x2', '\x1A7', '\x1A8', '\a', + '\x6', '\x2', '\x2', '\x1A8', '\x1B6', '\x3', '\x2', '\x2', '\x2', '\x1A9', + '\x1AA', '\a', '.', '\x2', '\x2', '\x1AA', '\x1AC', '\a', '\x5', '\x2', + '\x2', '\x1AB', '\x1AD', '\x5', 'R', '*', '\x2', '\x1AC', '\x1AB', '\x3', + '\x2', '\x2', '\x2', '\x1AC', '\x1AD', '\x3', '\x2', '\x2', '\x2', '\x1AD', + '\x1AE', '\x3', '\x2', '\x2', '\x2', '\x1AE', '\x1B6', '\a', '\x6', '\x2', + '\x2', '\x1AF', '\x1B0', '\a', '\x36', '\x2', '\x2', '\x1B0', '\x1B2', + '\a', '\x5', '\x2', '\x2', '\x1B1', '\x1B3', '\x5', 'R', '*', '\x2', '\x1B2', + '\x1B1', '\x3', '\x2', '\x2', '\x2', '\x1B2', '\x1B3', '\x3', '\x2', '\x2', + '\x2', '\x1B3', '\x1B4', '\x3', '\x2', '\x2', '\x2', '\x1B4', '\x1B6', + '\a', '\x6', '\x2', '\x2', '\x1B5', '\x1A0', '\x3', '\x2', '\x2', '\x2', + '\x1B5', '\x1A9', '\x3', '\x2', '\x2', '\x2', '\x1B5', '\x1AF', '\x3', + '\x2', '\x2', '\x2', '\x1B6', 'Q', '\x3', '\x2', '\x2', '\x2', '\x1B7', + '\x1BC', '\x5', '.', '\x18', '\x2', '\x1B8', '\x1B9', '\a', '\x4', '\x2', + '\x2', '\x1B9', '\x1BB', '\x5', '.', '\x18', '\x2', '\x1BA', '\x1B8', + '\x3', '\x2', '\x2', '\x2', '\x1BB', '\x1BE', '\x3', '\x2', '\x2', '\x2', + '\x1BC', '\x1BA', '\x3', '\x2', '\x2', '\x2', '\x1BC', '\x1BD', '\x3', + '\x2', '\x2', '\x2', '\x1BD', 'S', '\x3', '\x2', '\x2', '\x2', '\x1BE', + '\x1BC', '\x3', '\x2', '\x2', '\x2', '\x1BF', '\x1C4', '\x5', 'V', ',', + '\x2', '\x1C0', '\x1C1', '\a', '\x4', '\x2', '\x2', '\x1C1', '\x1C3', + '\x5', 'V', ',', '\x2', '\x1C2', '\x1C0', '\x3', '\x2', '\x2', '\x2', + '\x1C3', '\x1C6', '\x3', '\x2', '\x2', '\x2', '\x1C4', '\x1C2', '\x3', + '\x2', '\x2', '\x2', '\x1C4', '\x1C5', '\x3', '\x2', '\x2', '\x2', '\x1C5', + 'U', '\x3', '\x2', '\x2', '\x2', '\x1C6', '\x1C4', '\x3', '\x2', '\x2', + '\x2', '\x1C7', '\x1C8', '\a', '@', '\x2', '\x2', '\x1C8', '\x1C9', '\a', + '\v', '\x2', '\x2', '\x1C9', '\x1CA', '\x5', '.', '\x18', '\x2', '\x1CA', + 'W', '\x3', '\x2', '\x2', '\x2', '\x1CB', '\x1CC', '\t', '\t', '\x2', + '\x2', '\x1CC', 'Y', '\x3', '\x2', '\x2', '\x2', '\x1CD', '\x1CE', '\t', + '\n', '\x2', '\x2', '\x1CE', '[', '\x3', '\x2', '\x2', '\x2', '/', '\x61', + '\x64', 'g', 'j', 'm', 'q', 't', '~', '\x8A', '\x90', '\x98', '\x9B', + '\xA1', '\xA8', '\xAD', '\xB3', '\xC1', '\xC3', '\xD6', '\xDB', '\xEC', + '\xF3', '\xFE', '\x100', '\x107', '\x10F', '\x111', '\x116', '\x11F', + '\x124', '\x14C', '\x14E', '\x165', '\x16F', '\x174', '\x18F', '\x199', + '\x19B', '\x1A0', '\x1A5', '\x1AC', '\x1B2', '\x1B5', '\x1BC', '\x1C4', }; public static readonly ATN _ATN = diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 4e6bacb145..36e14d78bd 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -789,6 +789,12 @@ private enum Aggregate public static readonly AggregateScalarExpressionDetector Singleton = new AggregateScalarExpressionDetector(); + public override bool Visit(SqlAllScalarExpression sqlAllScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return false; + } + public override bool Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) { bool hasAggregates = false; diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/SqlAllScalarExpression.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlAllScalarExpression.cs new file mode 100644 index 0000000000..4bfbee4668 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlAllScalarExpression.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.SqlObjects +{ + using System; + using Microsoft.Azure.Cosmos.SqlObjects.Visitors; + +#if INTERNAL +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#pragma warning disable SA1600 // Elements should be documented + public +#else + internal +#endif + sealed class SqlAllScalarExpression : SqlScalarExpression + { + private SqlAllScalarExpression(SqlQuery subquery) + { + this.Subquery = subquery ?? throw new ArgumentNullException(nameof(subquery)); + } + + public SqlQuery Subquery { get; } + + public static SqlAllScalarExpression Create(SqlQuery subquery) => new SqlAllScalarExpression(subquery); + + public override void Accept(SqlObjectVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlObjectVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlObjectVisitor visitor, T input) => visitor.Visit(this, input); + + public override void Accept(SqlScalarExpressionVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlScalarExpressionVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlScalarExpressionVisitor visitor, T input) => visitor.Visit(this, input); + } +} diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs index 5a4bd72d63..3a9bf01970 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs @@ -36,6 +36,21 @@ public override bool Visit(SqlAliasedCollectionExpression first, SqlObject secon return true; } + public override bool Visit(SqlAllScalarExpression first, SqlObject secondAsObject) + { + if (!(secondAsObject is SqlAllScalarExpression second)) + { + return false; + } + + if (!Equals(first.Subquery, second.Subquery)) + { + return false; + } + + return true; + } + public override bool Visit(SqlArrayCreateScalarExpression first, SqlObject secondAsObject) { if (!(secondAsObject is SqlArrayCreateScalarExpression second)) diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs index a5f11d45c3..dfbab84bc0 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs @@ -12,6 +12,7 @@ internal sealed class SqlObjectHasher : SqlObjectVisitor public static readonly SqlObjectHasher Singleton = new SqlObjectHasher(true); private const int SqlAliasedCollectionExpressionHashCode = 1202039781; + private const int SqlAllScalarExpressionHashCode = 1369048120; private const int SqlArrayCreateScalarExpressionHashCode = 1760950661; private const int SqlArrayIteratorCollectionExpressionHashCode = -468874086; private const int SqlArrayScalarExpressionHashCode = -1093553293; @@ -119,6 +120,13 @@ public override int Visit(SqlAliasedCollectionExpression sqlAliasedCollectionExp return hashCode; } + public override int Visit(SqlAllScalarExpression sqlAllScalarExpression) + { + int hashCode = SqlAllScalarExpressionHashCode; + hashCode = CombineHashes(hashCode, sqlAllScalarExpression.Subquery.Accept(this)); + return hashCode; + } + public override int Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) { int hashCode = SqlArrayCreateScalarExpressionHashCode; diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs index 7fa52c4437..5e6faaef45 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs @@ -44,6 +44,11 @@ public override SqlObject Visit(SqlAliasedCollectionExpression sqlAliasedCollect sqlAliasedCollectionExpression.Alias.Accept(this) as SqlIdentifier); } + public override SqlObject Visit(SqlAllScalarExpression sqlAllScalarExpression) + { + return SqlExistsScalarExpression.Create(sqlAllScalarExpression.Subquery.Accept(this) as SqlQuery); + } + public override SqlObject Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) { List items = new List(); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs index c4d3dfa68d..75076e512c 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs @@ -39,6 +39,14 @@ public override void Visit(SqlAliasedCollectionExpression sqlAliasedCollectionEx } } + public override void Visit(SqlAllScalarExpression sqlAllScalarExpression) + { + this.writer.Write("ALL"); + this.WriteStartContext("("); + sqlAllScalarExpression.Subquery.Accept(this); + this.WriteEndContext(")"); + } + public override void Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) { int numberOfItems = sqlArrayCreateScalarExpression.Items.Count(); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs index ada48254b6..d8d8899395 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs @@ -14,6 +14,7 @@ namespace Microsoft.Azure.Cosmos.SqlObjects.Visitors abstract class SqlObjectVisitor { public abstract void Visit(SqlAliasedCollectionExpression sqlObject); + public abstract void Visit(SqlAllScalarExpression sqlObject); public abstract void Visit(SqlArrayCreateScalarExpression sqlObject); public abstract void Visit(SqlArrayIteratorCollectionExpression sqlObject); public abstract void Visit(SqlArrayScalarExpression sqlObject); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs index eda7022f3b..3ba9878ae6 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs @@ -14,6 +14,7 @@ namespace Microsoft.Azure.Cosmos.SqlObjects.Visitors abstract class SqlObjectVisitor { public abstract TOutput Visit(SqlAliasedCollectionExpression sqlObject, TArg input); + public abstract TOutput Visit(SqlAllScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlArrayCreateScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlArrayIteratorCollectionExpression sqlObject, TArg input); public abstract TOutput Visit(SqlArrayScalarExpression sqlObject, TArg input); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs index 08d8b7ef10..6f0ce75e99 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs @@ -14,6 +14,7 @@ namespace Microsoft.Azure.Cosmos.SqlObjects.Visitors abstract class SqlObjectVisitor { public abstract TResult Visit(SqlAliasedCollectionExpression sqlObject); + public abstract TResult Visit(SqlAllScalarExpression sqlObject); public abstract TResult Visit(SqlArrayCreateScalarExpression sqlObject); public abstract TResult Visit(SqlArrayIteratorCollectionExpression sqlObject); public abstract TResult Visit(SqlArrayScalarExpression sqlObject); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs index 1e1770403b..8e6e75b7f0 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs @@ -12,6 +12,7 @@ namespace Microsoft.Azure.Cosmos.SqlObjects.Visitors #endif abstract class SqlScalarExpressionVisitor { + public abstract void Visit(SqlAllScalarExpression scalarExpression); public abstract void Visit(SqlArrayCreateScalarExpression scalarExpression); public abstract void Visit(SqlArrayScalarExpression scalarExpression); public abstract void Visit(SqlBetweenScalarExpression scalarExpression); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs index 3862aaab40..ff5cdbc019 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Cosmos.SqlObjects.Visitors #endif abstract class SqlScalarExpressionVisitor { + public abstract TOutput Visit(SqlAllScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlArrayCreateScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlArrayScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlBetweenScalarExpression scalarExpression, TArg input); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs index 1ca9150582..bdc7b5f04f 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Cosmos.SqlObjects.Visitors #endif abstract class SqlScalarExpressionVisitor { + public abstract TResult Visit(SqlAllScalarExpression scalarExpression); public abstract TResult Visit(SqlArrayCreateScalarExpression scalarExpression); public abstract TResult Visit(SqlArrayScalarExpression scalarExpression); public abstract TResult Visit(SqlBetweenScalarExpression scalarExpression); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.All.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.All.xml new file mode 100644 index 0000000000..4df32ccb12 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.All.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.All.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.All.xml new file mode 100644 index 0000000000..70040beaf4 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.All.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj index ef7e193dbf..dc5f2c8e41 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj @@ -1,4 +1,4 @@ - + true @@ -174,6 +174,12 @@ PreserveNewest + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs index f0ee3beb3d..ca162fc467 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs @@ -55,6 +55,12 @@ public override bool Visit(SqlSelectStarSpec selectSpec) private sealed class AggregateScalarExpressionDetector : SqlScalarExpressionVisitor { public static readonly AggregateScalarExpressionDetector Singleton = new AggregateScalarExpressionDetector(); + + public override bool Visit(SqlAllScalarExpression sqlAllScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return false; + } public override bool Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs index 15411612f1..1ce82d3c98 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs @@ -79,6 +79,12 @@ public AggregateScalarExpressionTransformer(IEnumerable dataSourc this.dataSource = dataSource; } + public override SqlScalarExpression Visit(SqlAllScalarExpression sqlAllScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return sqlAllScalarExpression; + } + public override SqlScalarExpression Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) { List items = new List(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs index 2274c876a5..2a671f2568 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs @@ -24,6 +24,54 @@ private ScalarExpressionEvaluator() { } + public override CosmosElement Visit( + SqlAllScalarExpression scalarExpression, + CosmosElement document) + { + // We evaluate the ALL expression by constructing an equivalent EXISTS and evaluating that. + // ALL ( Filter Expression ) ==> NOT EXISTS ( NOT Filter Expression ) + + // If there is is no filter expression, then an equivalent filter expression of just true is created. + SqlScalarExpression filterExpression; + if (scalarExpression.Subquery.WhereClause == null) + { + SqlLiteral trueLiteral = SqlBooleanLiteral.Create(true); + filterExpression = SqlLiteralScalarExpression.Create(trueLiteral); + } + else + { + filterExpression = scalarExpression.Subquery.WhereClause.FilterExpression; + } + + // Create a NOT unary with filter expression. + SqlUnaryScalarExpression negatedFilterExpression = SqlUnaryScalarExpression.Create( + SqlUnaryScalarOperatorKind.Not, + filterExpression); + + // Create new where clause with negated filter expression. + SqlWhereClause newWhereClause = SqlWhereClause.Create(negatedFilterExpression); + + // create new subquery with new where clause. + SqlQuery newSqlQuery = SqlQuery.Create( + scalarExpression.Subquery.SelectClause, + scalarExpression.Subquery.FromClause, + newWhereClause, + scalarExpression.Subquery.GroupByClause, + scalarExpression.Subquery.OrderByClause, + scalarExpression.Subquery.OffsetLimitClause); + + // Create an exists expression with new subquery. + SqlExistsScalarExpression newExistsScalarExpression = SqlExistsScalarExpression.Create(newSqlQuery); + + // Create a not unary with the exists expression. + SqlUnaryScalarExpression negatedExistsExpression = SqlUnaryScalarExpression.Create( + SqlUnaryScalarOperatorKind.Not, + newExistsScalarExpression); + + // Visit the equivalent NOT EXISTS expression. + return this.Visit(negatedExistsExpression, document); + } + public override CosmosElement Visit( SqlArrayCreateScalarExpression scalarExpression, CosmosElement document) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs index ec02c45bde..ba45092faa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs @@ -631,6 +631,11 @@ public GroupByProjectionScalarExpressionVisitor(IReadOnlyList inputs = new List() + { + CreateInput( + description: "ALL in an SqlSelectItem as an alias", + query: "SELECT 1 AS ALL"), + CreateInput( + description: "ALL in an AliasedCollectionExpression as an alias", + query: "SELECT * " + + "FROM (SELECT VALUE 1) AS ALL"), + CreateInput( + description: "ALL in an ArrayIteratorCollectionExpression", + query: "SELECT * " + + "FROM ALL IN (SELECT VALUE 1)"), + CreateInput( + description: "ALL in an InputPathCollection and IdentifierPathExpression", + query: "SELECT * " + + "FROM ALL.ALL"), + CreateInput( + description: "ALL in a PropertyRefScalarExpression", + query: "SELECT ALL"), + CreateInput( + description: "ALL in a PropertyRefScalarExpression as child", + query: "SELECT c.ALL"), + CreateInput( + description: "ALL in a PropertyRefScalarExpression as parent and child", + query: "SELECT ALL.ALL"), + CreateInput( + description: "ALL in a function call", + query: "SELECT ALL(1, 2)"), + CreateInput( + description: "ALL in a UDF function call", + query: "SELECT udf.ALL(1, 2)"), + CreateInput( + description: "ALL in every possible grammar rule at the same time", + query: "SELECT ALL(1, 2) AS ALL " + + "FROM ALL IN (SELECT ALL.ALL) " + + "WHERE ALL( " + + " SELECT ALL " + + " FROM (SELECT udf.ALL(1, 2)) AS ALL " + + " WHERE ALL( SELECT VALUE 1) " + + ")") + + }; + + this.ExecuteTestSuite(inputs); + } + + public static SqlParserBaselineTestInput CreateInput(string description, string query) + { + return new SqlParserBaselineTestInput(description, query); + } + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs index 7f0ec89943..2faed74686 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs @@ -8,6 +8,38 @@ [TestClass] public sealed class ScalarExpressionSqlParserBaselineTests : SqlParserBaselineTests { + [TestMethod] + public void All() + { + List inputs = new List() + { + // Positive + CreateInput(description: "Basic", scalarExpression: "ALL(SELECT *)"), + CreateInput(description: "case insensitive", scalarExpression: "aLl(SELECT *)"), + CreateInput(description: "nested", scalarExpression:"ALL( SELECT * WHERE ALL( SELECT *))"), + CreateInput( + description: "multiple nested", + scalarExpression: + "ALL( " + + " SELECT * " + + " WHERE ALL( " + + " SELECT *" + + " WHERE ALL(" + + " SELECT *" + + " WHERE ALL(" + + " SELECT VALUE 1" + + " )" + + " )" + + " )" + + ")"), + + // Negative + CreateInput(description: "No closing parens", scalarExpression: "ALL(SELECT *") + }; + + this.ExecuteTestSuite(inputs); + } + [TestMethod] public void ArrayCreate() { From 07b34e6213a628f9580717d198faeb7268c8ce80 Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Mon, 28 Nov 2022 11:50:57 -0800 Subject: [PATCH 025/164] Release: Adds API contracts for 3.31.2-preview (#3586) --- .../contracts/API_3.31.2-preview.txt | 1526 +++++++++++++++++ 1 file changed, 1526 insertions(+) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.31.2-preview.txt diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.31.2-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.31.2-preview.txt new file mode 100644 index 0000000000..e299887d03 --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.31.2-preview.txt @@ -0,0 +1,1526 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode FullFidelity { get; } + public static ChangeFeedMode Incremental { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} From 531864605930ad4ac7eb405889affb21f231fcc8 Mon Sep 17 00:00:00 2001 From: Vivek Ravindran Date: Tue, 29 Nov 2022 06:38:22 -0800 Subject: [PATCH 026/164] [Internal] sccignore: Adds a .sccignore file to apply an exception for artifacts configuration issues (#3589) --- .sscignore | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .sscignore diff --git a/.sscignore b/.sscignore new file mode 100644 index 0000000000..1558a1ea7b --- /dev/null +++ b/.sscignore @@ -0,0 +1,3 @@ +{ +"cfs" : ["CFS0011"] +} \ No newline at end of file From 28318b0fe2cbfceb80276574f131f6b79f4b64ed Mon Sep 17 00:00:00 2001 From: Prasad Ullal <36418906+prasadu-microsoft@users.noreply.github.com> Date: Thu, 1 Dec 2022 08:24:15 -0800 Subject: [PATCH 027/164] [Internal] PermissionTests: Adds CosmosPermissionTests Coverage (#3593) * Ensures that both Direct and Gateway connection modes are tested * Validates that container read works with PermissionMode.Read (test was previously only validating that Delete was blocked - i.e. the negative case). --- .../CosmosPermissionTests.cs | 100 ++++++++++++++---- 1 file changed, 80 insertions(+), 20 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs index 531757c3ba..003ca8690b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs @@ -107,8 +107,15 @@ public async Task CRUDTest() } [TestMethod] - public async Task ContainerResourcePermissionTest() + [DataRow(ConnectionMode.Gateway)] + [DataRow(ConnectionMode.Direct)] + public async Task ContainerResourcePermissionTest(ConnectionMode mode) { + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() + { + ConnectionMode = mode, + }; + //create user string userId = Guid.NewGuid().ToString(); UserResponse userResponse = await this.cosmosDatabase.CreateUserAsync(userId); @@ -121,7 +128,7 @@ public async Task ContainerResourcePermissionTest() ContainerResponse containerResponse = await this.cosmosDatabase.CreateContainerAsync(containerId, "/id"); Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode); Container container = containerResponse.Container; - + //create permission string permissionId = Guid.NewGuid().ToString(); PermissionProperties permissionProperties = new PermissionProperties(permissionId, PermissionMode.Read, container); @@ -131,9 +138,18 @@ public async Task ContainerResourcePermissionTest() Assert.AreEqual(permissionId, permission.Id); Assert.AreEqual(permissionProperties.PermissionMode, permission.PermissionMode); - //delete resource with PermissionMode.Read - using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: null, resourceToken: permission.Token)) + using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(cosmosClientOptions, resourceToken: permission.Token)) { + Container readContainerRef = tokenCosmosClient.GetContainer(this.cosmosDatabase.Id, containerId); + + //read resource with PermissionMode.Read + using FeedIterator feedIterator = readContainerRef.GetItemQueryIterator("SELECT * FROM c"); + while (feedIterator.HasMoreResults) + { + _ = await feedIterator.ReadNextAsync(); + } + + //delete resource with PermissionMode.Read try { ContainerResponse response = await tokenCosmosClient @@ -147,14 +163,14 @@ public async Task ContainerResourcePermissionTest() Assert.AreEqual(HttpStatusCode.Forbidden, ex.StatusCode); } } - + //update permission to PermissionMode.All permissionProperties = new PermissionProperties(permissionId, PermissionMode.All, container); permissionResponse = await user.GetPermission(permissionId).ReplaceAsync(permissionProperties); permission = permissionResponse.Resource; //delete resource with PermissionMode.All - using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: null, resourceToken: permission.Token)) + using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(cosmosClientOptions, resourceToken: permission.Token)) { ContainerResponse response = await tokenCosmosClient .GetDatabase(this.cosmosDatabase.Id) @@ -284,8 +300,15 @@ await container.CreateItemAsync( } [TestMethod] - public async Task ItemResourcePermissionTest() + [DataRow(ConnectionMode.Gateway)] + [DataRow(ConnectionMode.Direct)] + public async Task ItemResourcePermissionTest(ConnectionMode connectionMode) { + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() + { + ConnectionMode = connectionMode + }; + //create user string userId = Guid.NewGuid().ToString(); UserResponse userResponse = await this.cosmosDatabase.CreateUserAsync(userId); @@ -313,13 +336,15 @@ public async Task ItemResourcePermissionTest() Assert.AreEqual(permissionId, permission.Id); Assert.AreEqual(permissionProperties.PermissionMode, permission.PermissionMode); - //delete resource with PermissionMode.Read - using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: null, resourceToken: permission.Token)) + using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: cosmosClientOptions, resourceToken: permission.Token)) { Container tokenContainer = tokenCosmosClient.GetContainer(this.cosmosDatabase.Id, containerId); + + //read resource with PermissionMode.Read ItemResponse readPermissionItem = await tokenContainer.ReadItemAsync(itemId, partitionKey); Assert.AreEqual(itemId, readPermissionItem.Resource.id.ToString()); + //delete resource with PermissionMode.Read try { ItemResponse response = await tokenContainer.DeleteItemAsync( @@ -340,7 +365,7 @@ public async Task ItemResourcePermissionTest() permission = permissionResponse.Resource; //delete resource with PermissionMode.All - using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: null, resourceToken: permission.Token)) + using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: cosmosClientOptions, resourceToken: permission.Token)) { using (FeedIterator feed = tokenCosmosClient .GetDatabase(this.cosmosDatabase.Id) @@ -357,8 +382,15 @@ public async Task ItemResourcePermissionTest() } [TestMethod] - public async Task EnsureUnauthorized_ThrowsCosmosClientException() + [DataRow(ConnectionMode.Gateway)] + [DataRow(ConnectionMode.Direct)] + public async Task EnsureUnauthorized_ThrowsCosmosClientException(ConnectionMode connectionMode) { + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() + { + ConnectionMode = connectionMode + }; + string authKey = ConfigurationManager.AppSettings["MasterKey"]; string endpoint = ConfigurationManager.AppSettings["GatewayEndpoint"]; @@ -367,21 +399,32 @@ public async Task EnsureUnauthorized_ThrowsCosmosClientException() using CosmosClient cosmosClient = new CosmosClient( endpoint, - authKey); + authKey, + cosmosClientOptions); CosmosException exception = await Assert.ThrowsExceptionAsync(() => cosmosClient.GetContainer("test", "test").ReadItemAsync("test", new PartitionKey("test"))); Assert.AreEqual(HttpStatusCode.Unauthorized, exception.StatusCode); } [TestMethod] - public async Task EnsureUnauthorized_ThrowsCosmosClientException_ReadAccountAsync() + [DataRow(ConnectionMode.Gateway)] + [DataRow(ConnectionMode.Direct)] + public async Task EnsureUnauthorized_ThrowsCosmosClientException_ReadAccountAsync(ConnectionMode connectionMode) { + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() + { + ConnectionMode = connectionMode + }; + string authKey = ConfigurationManager.AppSettings["MasterKey"]; string endpoint = ConfigurationManager.AppSettings["GatewayEndpoint"]; // Take the key and change some middle character authKey = authKey.Replace("m", "M"); - CosmosClient cosmosClient = new CosmosClient(endpoint, authKey); + using CosmosClient cosmosClient = new CosmosClient( + endpoint, + authKey, + cosmosClientOptions); CosmosException exception1 = await Assert.ThrowsExceptionAsync(() => cosmosClient.ReadAccountAsync()); Assert.AreEqual(HttpStatusCode.Unauthorized, exception1.StatusCode); @@ -389,33 +432,50 @@ public async Task EnsureUnauthorized_ThrowsCosmosClientException_ReadAccountAsyn } [TestMethod] - public async Task EnsureUnauthorized_Writes_ThrowsCosmosClientException() + [DataRow(ConnectionMode.Gateway)] + [DataRow(ConnectionMode.Direct)] + public async Task EnsureUnauthorized_Writes_ThrowsCosmosClientException(ConnectionMode connectionMode) { + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() + { + ConnectionMode = connectionMode + }; + string authKey = ConfigurationManager.AppSettings["MasterKey"]; string endpoint = ConfigurationManager.AppSettings["GatewayEndpoint"]; - + // Take the key and change some middle character authKey = authKey.Replace("m", "M"); using CosmosClient cosmosClient = new CosmosClient( endpoint, - authKey); + authKey, + cosmosClientOptions); + CosmosException exception = await Assert.ThrowsExceptionAsync(() => cosmosClient.GetContainer("test", "test").CreateItemAsync(new { id = "test" })); Assert.AreEqual(HttpStatusCode.Unauthorized, exception.StatusCode); } [TestMethod] - public async Task EnsureUnauthorized_Query_ThrowsCosmosClientException() + [DataRow(ConnectionMode.Gateway)] + [DataRow(ConnectionMode.Direct)] + public async Task EnsureUnauthorized_Query_ThrowsCosmosClientException(ConnectionMode connectionMode) { + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() + { + ConnectionMode = connectionMode + }; + string authKey = ConfigurationManager.AppSettings["MasterKey"]; string endpoint = ConfigurationManager.AppSettings["GatewayEndpoint"]; - + // Take the key and change some middle character authKey = authKey.Replace("m", "M"); using CosmosClient cosmosClient = new CosmosClient( endpoint, - authKey); + authKey, + cosmosClientOptions); using FeedIterator iterator = cosmosClient.GetContainer("test", "test").GetItemQueryIterator("SELECT * FROM c"); From a34bac772e11642b8855251467d3f5a36a6c1fb8 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Tue, 6 Dec 2022 01:02:13 +0530 Subject: [PATCH 028/164] [Internal] AI Integration: Refactors to Operation prefix and add tests (#3583) * add tests for otel and custome listener * clean up * null pointer fix * fix tets * handle event generation also at operation level * added documentation * wip * change event sourcename * rename event Name Co-authored-by: Sourabh Jain --- .../OpenTelemetry/CosmosDbEventSource.cs | 6 +- .../OpenTelemetryAttributeKeys.cs | 2 +- .../OpenTelemetryCoreRecorder.cs | 3 + .../OpenTelemetryRecorderFactory.cs | 9 + ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 202 +++++++------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 44 ++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 12 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 ++-- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 14 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- ...icrosoft.Azure.Cosmos.EmulatorTests.csproj | 7 +- .../Tracing/AssertActivity.cs | 90 +++++++ ...TelemetryListener.cs => CustomListener.cs} | 249 ++++++++---------- .../Tracing/CustomOtelExporter.cs | 57 ++++ .../EndToEndTraceWriterBaselineTests.cs | 109 +++++--- 19 files changed, 532 insertions(+), 386 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs rename Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/{OpenTelemetryListener.cs => CustomListener.cs} (61%) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs index 6700697914..af1115367f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs @@ -8,10 +8,14 @@ namespace Microsoft.Azure.Cosmos.Telemetry using global::Azure.Core.Diagnostics; using Microsoft.Azure.Cosmos.Telemetry.Diagnostics; + /// + /// This class is used to generate events with Azure.Cosmos.Operation Source Name + /// [EventSource(Name = EventSourceName)] internal sealed class CosmosDbEventSource : AzureEventSource { - private const string EventSourceName = OpenTelemetryAttributeKeys.DiagnosticNamespace; + internal const string EventSourceName = "Azure-Cosmos-Operation-Request-Diagnostics"; + private static CosmosDbEventSource Singleton { get; } = new CosmosDbEventSource(); private CosmosDbEventSource() diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs index 801824b791..eb8382c0b0 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs @@ -9,7 +9,7 @@ internal sealed class OpenTelemetryAttributeKeys // Azure defaults public const string DiagnosticNamespace = "Azure.Cosmos"; public const string ResourceProviderNamespace = "Microsoft.DocumentDB"; - public const string OperationPrefix = "Cosmos"; + public const string OperationPrefix = "Operation"; // Common database attributes public const string DbSystemName = "db.system"; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index e0b47e744f..32e4fde67f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -8,6 +8,9 @@ namespace Microsoft.Azure.Cosmos.Telemetry using System.Collections.Generic; using global::Azure.Core.Pipeline; + /// + /// This class is used to add information in an Activity tags ref. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3058 + /// internal struct OpenTelemetryCoreRecorder : IDisposable { private const string CosmosDb = "cosmosdb"; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index 88f149d608..2cd6e3a481 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -6,8 +6,14 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using global::Azure.Core.Pipeline; + /// + /// This class is used to generate Activities with Azure.Cosmos.Operation Source Name + /// internal static class OpenTelemetryRecorderFactory { + /// + /// Singleton to make sure we only have one instance of the DiagnosticScopeFactory and pattern matching of listener happens only once + /// private static DiagnosticScopeFactory ScopeFactory { get; set; } public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, @@ -22,11 +28,14 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, ScopeFactory = new DiagnosticScopeFactory(clientNamespace: OpenTelemetryAttributeKeys.DiagnosticNamespace, resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, isActivityEnabled: true); + + // If there is no source then it will return default otherwise a valid diagnostic scope DiagnosticScope scope = OpenTelemetryRecorderFactory .ScopeFactory .CreateScope(name: $"{OpenTelemetryAttributeKeys.OperationPrefix}.{operationName}", kind: clientContext.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? DiagnosticScope.ActivityKind.Internal : DiagnosticScope.ActivityKind.Client); + // Record values only when we have a valid Diagnostic Scope if (scope.IsEnabled) { return new OpenTelemetryCoreRecorder( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index ffce1a6bf4..f650f1e6f5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -129,7 +129,7 @@ } ] }]]> - Cosmos.ExecuteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ExecuteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index e999759bd3..c10633d3fa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -134,16 +134,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -292,16 +292,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -450,16 +450,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -608,16 +608,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -766,16 +766,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -924,16 +924,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1082,16 +1082,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1240,16 +1240,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1398,16 +1398,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1556,16 +1556,16 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2288,7 +2288,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 2d747e9e45..e4fa3665a8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -952,11 +952,11 @@ } ] }]]> - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1569,11 +1569,11 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2167,11 +2167,11 @@ } ] }]]> - Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2785,11 +2785,11 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3066,8 +3066,8 @@ } ] }]]> - Cosmos.Change Feed Estimator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Change Feed Estimator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 5b29ba3737..3825735788 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -107,8 +107,8 @@ } ] }]]> - Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -207,8 +207,8 @@ } ] }]]> - Cosmos.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 7dea567de8..80dbbfb7f1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -148,7 +148,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -391,7 +391,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -616,7 +616,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -873,7 +873,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1194,7 +1194,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1348,7 +1348,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 937daa7a49..5b54a51e31 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -574,10 +574,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1180,10 +1180,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1767,10 +1767,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2374,10 +2374,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3048,10 +3048,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3644,10 +3644,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4260,10 +4260,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index ee1302e06e..22feeace3c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -536,10 +536,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1104,10 +1104,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1653,10 +1653,10 @@ } ] }]]> - Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2222,10 +2222,10 @@ } ] }]]> - Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 9558168b76..c6a9fcee7f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -542,12 +542,12 @@ } ] }]]> - Cosmos.ReadManyItemsStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadManyItemsStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1112,7 +1112,7 @@ } ] }]]> - Cosmos.ReadManyItemsAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadManyItemsAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index a1b5ceb966..5a764d9525 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -89,7 +89,7 @@ } ] }]]> - Cosmos.CreateItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -178,7 +178,7 @@ } ] }]]> - Cosmos.ReadItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -275,7 +275,7 @@ } ] }]]> - Cosmos.ReplaceItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReplaceItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -367,7 +367,7 @@ } ] }]]> - Cosmos.DeleteItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index dfe617f632..63edd0154e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -109,7 +109,7 @@ } ] }]]> - Cosmos.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -203,7 +203,7 @@ } ] }]]> - Cosmos.ReadItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -310,7 +310,7 @@ } ] }]]> - Cosmos.ReplaceItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReplaceItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -406,7 +406,7 @@ } ] }]]> - Cosmos.DeleteItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index 9849750f54..10e0462cef 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -1,4 +1,4 @@ - + true true @@ -42,11 +42,12 @@ - + + - + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs new file mode 100644 index 0000000000..f62d89e016 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -0,0 +1,90 @@ +namespace Microsoft.Azure.Cosmos.Tracing +{ + using System.Collections.Generic; + using System.Diagnostics; + using System.Linq; + using Microsoft.Azure.Cosmos.Telemetry; + using Microsoft.Azure.Cosmos.Tests; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Newtonsoft.Json; + + internal static class AssertActivity + { + public static void IsValid(Activity activity) + { + Assert.IsTrue(activity.OperationName == activity.DisplayName); + Assert.IsNotNull(activity.GetTagItem("db.cosmosdb.connection_mode")); + if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString()) + { + Assert.AreEqual(ActivityKind.Internal, activity.Kind); + } + else + { + Assert.AreEqual(ActivityKind.Client, activity.Kind); + } + + IList expectedTags = new List + { + "az.namespace", + "kind", + "db.system", + "db.name", + "db.operation", + "net.peer.name", + "db.cosmosdb.client_id", + "db.cosmosdb.machine_id", + "db.cosmosdb.user_agent", + "db.cosmosdb.connection_mode", + "db.cosmosdb.operation_type", + "db.cosmosdb.container", + "db.cosmosdb.request_content_length_bytes", + "db.cosmosdb.response_content_length_bytes", + "db.cosmosdb.status_code", + "db.cosmosdb.sub_status_code", + "db.cosmosdb.request_charge", + "db.cosmosdb.regions_contacted", + "db.cosmosdb.retry_count", + "db.cosmosdb.item_count", + "db.cosmosdb.request_diagnostics", + "exception.type", + "exception.message", + "exception.stacktrace" + }; + + foreach (KeyValuePair actualTag in activity.Tags) + { + Assert.IsTrue(expectedTags.Contains(actualTag.Key), $"{actualTag.Key} is not allowed for {activity.OperationName}"); + + AssertActivity.AssertDatabaseAndContainerName(activity.OperationName, actualTag); + } + } + + public static void AreEqualAcrossListeners() + { + Assert.AreEqual( + JsonConvert.SerializeObject(CustomListener.CollectedActivities.OrderBy(x => x.Id)), + JsonConvert.SerializeObject(CustomOtelExporter.CollectedActivities.OrderBy(x => x.Id))); + } + + private static void AssertDatabaseAndContainerName(string name, KeyValuePair tag) + { + IList exceptionsForContainerAttribute = new List + { + "Operation.CreateDatabaseAsync", + "Operation.ReadAsync", + "Operation.DeleteAsync" + }; + + if ((tag.Key == OpenTelemetryAttributeKeys.ContainerName && !exceptionsForContainerAttribute.Contains(name)) || + (tag.Key == OpenTelemetryAttributeKeys.DbName)) + { + Assert.IsNotNull(tag.Value, $"{tag.Key} is 'null' for {name} operation"); + } + else if (tag.Key == OpenTelemetryAttributeKeys.ContainerName && exceptionsForContainerAttribute.Contains(name)) + { + Assert.IsNull(tag.Value, $"{tag.Key} is '{tag.Value}' for {name} operation"); + } + } + + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs similarity index 61% rename from Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs rename to Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 05763f0bdb..5e86ee7270 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/OpenTelemetryListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -12,62 +12,61 @@ namespace Microsoft.Azure.Cosmos.Tests using System.Linq; using System.Reflection; using System.Text; - using System.Threading; - using Microsoft.Azure.Cosmos.Telemetry; - using Microsoft.VisualStudio.TestTools.UnitTesting; - - public class OpenTelemetryListener : - EventListener, - IObserver>, + using System.Text.RegularExpressions; + using Microsoft.Azure.Cosmos.Tracing; + + /// + /// It is a custom listener for Activities and Event. It is used to validate the Activities generated by cosmosDb SDK. + /// + public class CustomListener : + EventListener, // Override Event Listener to capture Event source events + IObserver>, // Override IObserver to capture Activity events IObserver, IDisposable { - private readonly string EventSourceName; - private readonly Func sourceNameFilter; - private readonly AsyncLocal collectThisStack; - - private List subscriptions = new List(); - private readonly Action scopeStartCallback; - - private List Scopes { get; } = new List(); - - private ConcurrentBag GeneratedActivities { set; get; } - private ConcurrentBag GeneratedEvents { set; get; } - - public OpenTelemetryListener(string name, bool asyncLocal = false, Action scopeStartCallback = default) - : this(n => n == name, asyncLocal, scopeStartCallback) + private readonly string eventName; + + private List subscriptions = new(); + private List Scopes { get; } = new(); + + public static ConcurrentBag CollectedActivities { private set; get; } = new(); + private static ConcurrentBag CollectedEvents { set; get; } = new(); + + public CustomListener(string name, string eventName) + : this(n => Regex.Match(n, name).Success, eventName) { - this.EventSourceName = name; } - public OpenTelemetryListener(Func filter, bool asyncLocal = false, Action scopeStartCallback = default) + public CustomListener(Func filter, string eventName) { - if (asyncLocal) - { - this.collectThisStack = new AsyncLocal { Value = true }; - } this.sourceNameFilter = filter; - this.scopeStartCallback = scopeStartCallback; - - this.GeneratedActivities = new ConcurrentBag(); - this.GeneratedEvents = new ConcurrentBag(); - + this.eventName = eventName; + DiagnosticListener.AllListeners.Subscribe(this); } + /// + /// IObserver Override + /// public void OnCompleted() { + // Unimplemented Method } + /// + /// IObserver Override + /// public void OnError(Exception error) { + // Unimplemented Method } + /// + /// IObserver Override + /// public void OnNext(KeyValuePair value) { - if (this.collectThisStack?.Value == false) return; - lock (this.Scopes) { // Check for disposal @@ -92,7 +91,6 @@ public void OnNext(KeyValuePair value) }; this.Scopes.Add(scope); - this.scopeStartCallback?.Invoke(scope); } else if (value.Key.EndsWith(stopSuffix)) { @@ -101,7 +99,9 @@ public void OnNext(KeyValuePair value) { if (producedDiagnosticScope.Activity.Id == Activity.Current.Id) { - this.RecordAttributes(producedDiagnosticScope.Name, producedDiagnosticScope.Activity.Tags); + AssertActivity.IsValid(producedDiagnosticScope.Activity); + + CustomListener.CollectedActivities.Add(producedDiagnosticScope.Activity); producedDiagnosticScope.IsCompleted = true; return; @@ -128,142 +128,51 @@ public void OnNext(KeyValuePair value) } } - private void RecordAttributes(string name, IEnumerable> tags) - { - StringBuilder builder = new StringBuilder(); - builder.Append("") - .Append("") - .Append(name) - .Append(""); - - OpenTelemetryListener.AssertData(name, tags); - - foreach (KeyValuePair tag in tags) - { - builder - .Append("") - .Append(tag.Key) - .Append(""); - } - builder.Append(""); - this.GeneratedActivities.Add(builder.ToString()); - } - - private static void AssertData(string name, IEnumerable> tags) - { - IList allowedAttributes = new List - { - "az.namespace", - "kind", - "db.system", - "db.name", - "db.operation", - "net.peer.name", - "db.cosmosdb.client_id", - "db.cosmosdb.machine_id", - "db.cosmosdb.user_agent", - "db.cosmosdb.connection_mode", - "db.cosmosdb.operation_type", - "db.cosmosdb.container", - "db.cosmosdb.request_content_length_bytes", - "db.cosmosdb.response_content_length_bytes", - "db.cosmosdb.status_code", - "db.cosmosdb.sub_status_code", - "db.cosmosdb.request_charge", - "db.cosmosdb.regions_contacted", - "db.cosmosdb.retry_count", - "db.cosmosdb.item_count", - "db.cosmosdb.request_diagnostics", - "exception.type", - "exception.message", - "exception.stacktrace" - }; - - foreach (KeyValuePair tag in tags) - { - Assert.IsTrue(allowedAttributes.Contains(tag.Key), $"{tag.Key} is not allowed for {name}"); - - OpenTelemetryListener.AssertDatabaseAndContainerName(name, tag); - } - } - - private static void AssertDatabaseAndContainerName(string name, KeyValuePair tag) - { - IList exceptionsForContainerAttribute = new List - { - "Cosmos.CreateDatabaseAsync", - "Cosmos.ReadAsync", - "Cosmos.DeleteAsync", - "Cosmos.DeleteStreamAsync" - }; - - if ((tag.Key == OpenTelemetryAttributeKeys.ContainerName && !exceptionsForContainerAttribute.Contains(name)) || - (tag.Key == OpenTelemetryAttributeKeys.DbName)) - { - Assert.IsNotNull(tag.Value, $"{tag.Key} is 'null' for {name} operation"); - } - else if (tag.Key == OpenTelemetryAttributeKeys.ContainerName && exceptionsForContainerAttribute.Contains(name)) - { - Assert.IsNull(tag.Value, $"{tag.Key} is '{tag.Value}' for {name} operation"); - } - } - - public List GetRecordedAttributes() - { - List outputList = new List(); - if(this.GeneratedActivities != null && this.GeneratedActivities.Count > 0) - { - outputList.AddRange(this.GeneratedActivities); - - } - if (this.GeneratedEvents != null && this.GeneratedEvents.Count > 0) - { - outputList.AddRange(this.GeneratedEvents); - } - - return outputList; - } - - public void ResetAttributes() - { - this.GeneratedActivities = new ConcurrentBag(); - this.GeneratedEvents = new ConcurrentBag(); - } - + /// + /// IObserver Override + /// public void OnNext(DiagnosticListener value) { if (this.sourceNameFilter(value.Name) && this.subscriptions != null) { lock (this.Scopes) { - if (this.subscriptions != null) - { - this.subscriptions.Add(value.Subscribe(this)); - } + this.subscriptions?.Add(value.Subscribe(this)); } } } + /// + /// EventListener Override + /// protected override void OnEventSourceCreated(EventSource eventSource) { - if (eventSource.Name == this.EventSourceName) + if (eventSource != null && eventSource.Name.Equals(this.eventName)) { - this.EnableEvents(eventSource, EventLevel.Informational); + this.EnableEvents(eventSource, EventLevel.Informational); // Enable information level events } } + /// + /// EventListener Override + /// protected override void OnEventWritten(EventWrittenEventArgs eventData) { StringBuilder builder = new StringBuilder(); + Console.WriteLine(eventData.Payload[0].ToString()); builder.Append("") .Append("Ideally, this should contain request diagnostics but request diagnostics is " + "subject to change with each request as it contains few unique id. " + "So just putting this tag with this static text to make sure event is getting generated" + " for each test.") .Append(""); - this.GeneratedEvents.Add(builder.ToString()); + CustomListener.CollectedEvents.Add(builder.ToString()); } - + + /// + /// Dispose Override + /// + /// public override void Dispose() { base.Dispose(); @@ -310,6 +219,54 @@ public override void Dispose() this.ResetAttributes(); } + + private string GenerateTagForBaselineTest(Activity activity) + { + + StringBuilder builder = new StringBuilder(); + builder.Append("") + .Append("") + .Append(activity.OperationName) + .Append(""); + + foreach (KeyValuePair tag in activity.Tags) + { + builder + .Append("") + .Append(tag.Key) + .Append(""); + } + builder.Append(""); + + return builder.ToString(); + } + + public List GetRecordedAttributes() + { + List generatedActivityTagsForBaselineXmls = new(); + List collectedActivities = new List(CustomListener.CollectedActivities); + + collectedActivities.ForEach(activity => generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity))); + + List outputList = new List(); + if(generatedActivityTagsForBaselineXmls != null && generatedActivityTagsForBaselineXmls.Count > 0) + { + outputList.AddRange(generatedActivityTagsForBaselineXmls); + + } + if (CustomListener.CollectedEvents != null && CustomListener.CollectedEvents.Count > 0) + { + outputList.AddRange(CustomListener.CollectedEvents); + } + + return outputList; + } + + public void ResetAttributes() + { + CustomListener.CollectedEvents = new(); + CustomListener.CollectedActivities = new(); + } public class ProducedDiagnosticScope { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs new file mode 100644 index 0000000000..1f6c335fdd --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs @@ -0,0 +1,57 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tracing +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using OpenTelemetry; + using OpenTelemetry.Trace; + + /// + /// It is a custom exporter for OpenTelemetry. It is used to validate the Activities generated by cosmosDb SDK. + /// As of now, it doesn not capture Events from event Source. + /// + internal class CustomOtelExporter : BaseExporter + { + private readonly string _name; + + public static List CollectedActivities = new List(); + + public CustomOtelExporter(string name = "CustomOtelExporter") + { + this._name = name; + } + + public override ExportResult Export(in Batch batch) + { + // SuppressInstrumentationScope should be used to prevent exporter + // code from generating telemetry and causing live-loop. + using IDisposable scope = SuppressInstrumentationScope.Begin(); + + foreach (Activity activity in batch) + { + AssertActivity.IsValid(activity); + + CollectedActivities.Add(activity); + } + + return ExportResult.Success; + } + } + + internal static class OTelExtensions + { + public static TracerProviderBuilder AddCustomOtelExporter(this TracerProviderBuilder builder) + { + if (builder == null) + { + throw new ArgumentNullException(nameof(builder)); + } + + return builder.AddProcessor(new SimpleActivityExportProcessor(new CustomOtelExporter())); + } + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index f64d289cfe..b91fc76b8b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -19,8 +19,10 @@ using Microsoft.Azure.Cosmos.Tracing; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; + using OpenTelemetry; using Telemetry; using static Microsoft.Azure.Cosmos.SDK.EmulatorTests.TransportClientHelper; + using OpenTelemetry.Trace; [VisualStudio.TestTools.UnitTesting.TestClass] [TestCategory("UpdateContract")] @@ -33,15 +35,26 @@ public sealed class EndToEndTraceWriterBaselineTests : BaselineTests builder @@ -90,7 +103,7 @@ public static async Task ClassInitAsync(TestContext context) await container.CreateItemAsync(JToken.Parse(cosmosObject.ToString())); } - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } [ClassCleanup()] @@ -101,13 +114,25 @@ public static async Task ClassCleanupAsync() await EndToEndTraceWriterBaselineTests.database.DeleteStreamAsync(); } + oTelTracerProvider?.Dispose(); testListener?.Dispose(); + + await Task.Delay(5000); + } + + private static void AssertAndResetActivityInformation() + { + AssertActivity.AreEqualAcrossListeners(); + + CustomOtelExporter.CollectedActivities = new(); + testListener.ResetAttributes(); } + [TestMethod] public async Task ReadFeedAsync() { - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); List inputs = new List(); @@ -140,7 +165,7 @@ public async Task ReadFeedAsync() endLineNumber: endLineNumber, oTelActivities: testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -171,7 +196,7 @@ public async Task ReadFeedAsync() endLineNumber: endLineNumber, oTelActivities: testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -202,7 +227,7 @@ public async Task ReadFeedAsync() endLineNumber: endLineNumber, oTelActivities: testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -228,7 +253,7 @@ public async Task ReadFeedAsync() inputs.Add(new Input("ReadFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -270,7 +295,7 @@ public async Task ChangeFeedAsync() inputs.Add(new Input("ChangeFeed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -302,7 +327,7 @@ public async Task ChangeFeedAsync() inputs.Add(new Input("ChangeFeed Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -335,7 +360,7 @@ public async Task ChangeFeedAsync() inputs.Add(new Input("ChangeFeed Public API", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -368,7 +393,7 @@ public async Task ChangeFeedAsync() inputs.Add(new Input("ChangeFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -407,7 +432,8 @@ public async Task ChangeFeedAsync() await processor.StopAsync(); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); + startLineNumber = GetLineNumber(); ChangeFeedEstimator estimator = container.GetChangeFeedEstimator( "test", @@ -428,7 +454,7 @@ public async Task ChangeFeedAsync() inputs.Add(new Input("Change Feed Estimator", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -464,7 +490,7 @@ public async Task QueryAsync() inputs.Add(new Input("Query", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -489,7 +515,7 @@ public async Task QueryAsync() inputs.Add(new Input("Query Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -515,7 +541,7 @@ public async Task QueryAsync() inputs.Add(new Input("Query Public API", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -541,7 +567,7 @@ public async Task QueryAsync() inputs.Add(new Input("Query Public API Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -570,7 +596,7 @@ public async Task QueryAsync() inputs.Add(new Input("Query - Without ServiceInterop", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -598,7 +624,7 @@ public async Task QueryAsync() inputs.Add(new Input("Query Public API with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -626,14 +652,13 @@ public async Task QueryAsync() inputs.Add(new Input("Query Public API Typed with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- this.ExecuteTestSuite(inputs); } - [TestMethod] public async Task ValidateInvalidCredentialsTraceAsync() { @@ -698,7 +723,7 @@ public async Task TypedPointOperationsAsync() inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -716,7 +741,7 @@ public async Task TypedPointOperationsAsync() inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -742,7 +767,7 @@ public async Task TypedPointOperationsAsync() inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -784,7 +809,7 @@ public async Task TypedPointOperationsAsync() inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -819,7 +844,7 @@ public async Task StreamPointOperationsAsync() inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -837,7 +862,7 @@ public async Task StreamPointOperationsAsync() inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -863,7 +888,7 @@ public async Task StreamPointOperationsAsync() inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -908,7 +933,7 @@ public async Task StreamPointOperationsAsync() inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -957,7 +982,7 @@ public async Task PointOperationsExceptionsAsync() inputs.Add(new Input("Point Operation with Request Timeout", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1010,7 +1035,7 @@ public async Task PointOperationsExceptionsAsync() inputs.Add(new Input("Point Operation With Throttle", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1090,7 +1115,7 @@ void interceptor(Uri uri, Documents.ResourceOperation operation, Documents.Docum endLineNumber = GetLineNumber(); inputs.Add(new Input($"Point Operation With Forbidden + Max Count = {maxCount}", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } // Check if the exception message is not growing exponentially @@ -1141,7 +1166,7 @@ void interceptor(Uri uri, Documents.ResourceOperation operation, Documents.Docum inputs.Add(new Input("Point Operation with Service Unavailable", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1192,7 +1217,7 @@ public async Task BatchOperationsAsync() inputs.Add(new Input("Batch Operation", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1243,7 +1268,7 @@ public async Task BulkOperationsAsync() inputs.Add(new Input("Bulk Operation", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); } - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1298,7 +1323,7 @@ public async Task BulkOperationsAsync() inputs.Add(new Input("Bulk Operation With Throttle", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } this.ExecuteTestSuite(inputs); @@ -1330,7 +1355,7 @@ public async Task MiscellanousAsync() inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1349,7 +1374,7 @@ public async Task MiscellanousAsync() inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1390,7 +1415,7 @@ public async Task ReadManyAsync() inputs.Add(new Input("Read Many Stream Api", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- @@ -1405,7 +1430,7 @@ public async Task ReadManyAsync() inputs.Add(new Input("Read Many Typed Api", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); - testListener.ResetAttributes(); + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } //---------------------------------------------------------------- From 6b1fa035cdb50201aa7483cc3774eb0b521e8a47 Mon Sep 17 00:00:00 2001 From: Nalu Tripician Date: Thu, 15 Dec 2022 12:20:48 -0500 Subject: [PATCH 029/164] [Internal] HttpTimeoutPolicy: Removes Data Plane Writes from being able to be retried (#3607) * data plane writes no longer failover on timeout * removed duplication of test\ --- Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs | 4 ++-- .../CosmosHttpClientCoreTests.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs index a3fc51dd91..fa2fc25bf7 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs @@ -36,8 +36,8 @@ public static HttpTimeoutPolicy GetTimeoutPolicy( return HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance; } - //Data Plane Read & Write - if (!HttpTimeoutPolicy.IsMetaData(documentServiceRequest)) + //Data Plane Read + if (!HttpTimeoutPolicy.IsMetaData(documentServiceRequest) && documentServiceRequest.IsReadOnlyRequest) { return HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs index 67c653498b..3ac919bf83 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs @@ -258,7 +258,7 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio Assert.AreEqual(3, count, "Should retry 3 times"); } - + [TestMethod] public async Task HttpTimeoutThrow503TestAsync() { @@ -307,8 +307,8 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio //Data plane read await TestScenarioAsync(HttpMethod.Get, ResourceType.Document, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 3); - //Data plane write - await TestScenarioAsync(HttpMethod.Post, ResourceType.Document, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 1); + //Data plane write (Should throw a 408 OperationCanceledException rather than a 503) + await TestScenarioAsync(HttpMethod.Post, ResourceType.Document, HttpTimeoutPolicyDefault.Instance, typeof(TaskCanceledException), 1); //Meta data read await TestScenarioAsync(HttpMethod.Get, ResourceType.Database, HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, typeof(CosmosException), 3); From 814e72eca593e855838434766596e7bf8945e1b7 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Tue, 20 Dec 2022 16:03:20 +0530 Subject: [PATCH 030/164] [Internal] Performance Testing: Adds Distributed Tracing option in benchmarks (#3611) Co-authored-by: Sourabh Jain --- .../Tools/Benchmark/BenchmarkConfig.cs | 5 +++++ Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs index dc287c8a4d..590e89297a 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs @@ -101,6 +101,9 @@ public class BenchmarkConfig [Option(Required = false, HelpText = "Enable Client Telemetry")] public bool EnableTelemetry { get; set; } + [Option(Required = false, HelpText = "Enable Distributed Tracing")] + public bool EnableDistributedTracing { get; set; } + [Option(Required = false, HelpText = "Client Telemetry Schedule in Seconds")] public int TelemetryScheduleInSec { get; set; } @@ -219,6 +222,8 @@ internal Microsoft.Azure.Cosmos.CosmosClient CreateCosmosClient(string accountKe clientOptions.ConsistencyLevel = (Microsoft.Azure.Cosmos.ConsistencyLevel)Enum.Parse(typeof(Microsoft.Azure.Cosmos.ConsistencyLevel), this.ConsistencyLevel, ignoreCase: true); } + clientOptions.EnableDistributedTracing = this.EnableDistributedTracing; + return new Microsoft.Azure.Cosmos.CosmosClient( this.EndPoint, accountKey, diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh index 2edfb67530..81cafc4a4a 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/run.sh @@ -54,8 +54,8 @@ sleep 10 #Wait dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithTelemetry --enableTelemetry --telemetryScheduleInSec 60 --telemetryEndpoint $TELEMETRY_ENDPOINT --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk sleep 10 #Wait -# Open telemetry enabled ReadStreamExistsV3. This is needed to see the impact of open telemetry. -dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithOpenTelemetry --enableOpenTelemetry --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk +# Open telemetry enabled ReadStreamExistsV3. This is needed to see the impact of distributed tracing (without listener) +dotnet run -c Release -- -n 2000000 -w ReadStreamExistsV3 --WorkloadName ReadStreamExistsV3WithDistributedTracingWOListener --enableDistributedTracing --tcp 10 --pl $PL -e $ACCOUNT_ENDPOINT -k $ACCOUNT_KEY --enablelatencypercentiles --disablecoresdklogging --publishresults --resultspartitionkeyvalue $RESULTS_PK --commitid $COMMIT_ID --commitdate $COMMIT_DATE --committime $COMMIT_TIME --branchname $BRANCH_NAME --database testdb --container testcol --partitionkeypath /pk sleep 10 #Wait #Point read operations From 5c05fbb2d63e632f34831b8f0f200a089623695c Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 4 Jan 2023 21:38:48 +0530 Subject: [PATCH 031/164] [Internal] Benchmark: Refactors code to make Memory Stream capacity configurable (#3624) Co-authored-by: Sourabh Jain --- .../Tools/Benchmark/BenchmarkConfig.cs | 4 +++- .../Tools/Benchmark/JsonHelper.cs | 12 ++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs index 590e89297a..b9235d2232 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs @@ -143,7 +143,9 @@ internal void Print() Utility.TeeTraceInformation($"{nameof(BenchmarkConfig)} arguments"); Utility.TeeTraceInformation($"IsServerGC: {GCSettings.IsServerGC}"); Utility.TeeTraceInformation("--------------------------------------------------------------------- "); - Utility.TeeTraceInformation(JsonHelper.ToString(this)); + Utility.TeeTraceInformation(JsonHelper.ToString( + input: this, + capacity: 2048)); Utility.TeeTraceInformation("--------------------------------------------------------------------- "); Utility.TeeTraceInformation(string.Empty); } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/JsonHelper.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/JsonHelper.cs index 3e9da1ef06..6d5bed44d3 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/JsonHelper.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/JsonHelper.cs @@ -17,9 +17,9 @@ internal static class JsonHelper }); private const int DefaultCapacity = 1024; - public static string ToString(T input) + public static string ToString(T input, int capacity = JsonHelper.DefaultCapacity) { - using (MemoryStream stream = JsonHelper.ToStream(input)) + using (MemoryStream stream = JsonHelper.ToStream(input, capacity)) using (StreamReader sr = new StreamReader(stream)) { return sr.ReadToEnd(); @@ -31,15 +31,15 @@ public static T Deserialize(string payload) return JsonConvert.DeserializeObject(payload); } - public static MemoryStream ToStream(T input) + public static MemoryStream ToStream(T input, int capacity = JsonHelper.DefaultCapacity) { - byte[] blob = System.Buffers.ArrayPool.Shared.Rent(JsonHelper.DefaultCapacity); - MemoryStream memStreamPayload = new MemoryStream(blob, 0, JsonHelper.DefaultCapacity, writable: true, publiclyVisible: true); + byte[] blob = System.Buffers.ArrayPool.Shared.Rent(capacity); + MemoryStream memStreamPayload = new MemoryStream(blob, 0, capacity, writable: true, publiclyVisible: true); memStreamPayload.SetLength(0); memStreamPayload.Position = 0; using (StreamWriter streamWriter = new StreamWriter(memStreamPayload, encoding: JsonHelper.DefaultEncoding, - bufferSize: JsonHelper.DefaultCapacity, + bufferSize: capacity, leaveOpen: true)) { using (JsonWriter writer = new JsonTextWriter(streamWriter)) From 73c9e08d2796c64e016fdf80007c0f8c72f8e47b Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Wed, 4 Jan 2023 15:37:36 -0500 Subject: [PATCH 032/164] add new LatestVersion changefeed mode that has same behavior as Incremental; renamed FullFidelity to AllVersionsAndDeletes (#3596) --- .../src/ChangeFeed/ChangeFeedMode.cs | 16 +++++++++++++++- .../FullFidelity/ChangeFeedItemChange{T}.cs | 4 ++-- .../FullFidelity/ChangeFeedMetadata.cs | 2 +- .../FullFidelity/ChangeFeedOperationType.cs | 2 +- .../src/Resource/Settings/ChangeFeedPolicy.cs | 2 +- .../FeedToken/ChangeFeedIteratorCoreTests.cs | 14 +++++++------- .../NetworkAttachedDocumentContainerTests.cs | 2 +- .../Contracts/DotNetPreviewSDKAPI.json | 18 ++++++++++++++---- 8 files changed, 42 insertions(+), 18 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs index d64a9942d5..7df0871d74 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs @@ -31,6 +31,20 @@ internal ChangeFeedMode() /// A to receive incremental item changes. public static ChangeFeedMode Incremental => ChangeFeedModeIncremental.Instance; + /// + /// Creates a to receive latest version item changes. + /// + /// + /// Latest version mode includes item creations and updates, not deletions. + /// + /// A to receive latest version item changes. +#if PREVIEW + public +#else + internal +#endif + static ChangeFeedMode LatestVersion => ChangeFeedModeIncremental.Instance; + /// /// Creates a to receive notifications for creations, deletes, as well as all intermediary snapshots for updates. /// @@ -49,6 +63,6 @@ internal ChangeFeedMode() #else internal #endif - static ChangeFeedMode FullFidelity => ChangeFeedModeFullFidelity.Instance; + static ChangeFeedMode AllVersionsAndDeletes => ChangeFeedModeFullFidelity.Instance; } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedItemChange{T}.cs b/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedItemChange{T}.cs index 1a564443bd..deb9c7db87 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedItemChange{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedItemChange{T}.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos using Newtonsoft.Json; /// - /// The typed response that contains the current, previous, and metadata change feed resource when is initialized to . + /// The typed response that contains the current, previous, and metadata change feed resource when is initialized to . /// /// /// @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Cosmos /// public string status { get; set; } /// } /// - /// ChangeFeedMode changeFeedMode = ChangeFeedMode.FullFidelity; + /// ChangeFeedMode changeFeedMode = ChangeFeedMode.AllVersionsAndDeletes; /// PartitionKey partitionKey = new PartitionKey(@"learning"); /// ChangeFeedStartFrom changeFeedStartFrom = ChangeFeedStartFrom.Now(FeedRange.FromPartitionKey(partitionKey)); /// diff --git a/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedMetadata.cs b/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedMetadata.cs index 75abc2ef1e..81b10461f9 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedMetadata.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedMetadata.cs @@ -10,7 +10,7 @@ namespace Microsoft.Azure.Cosmos using Newtonsoft.Json.Converters; /// - /// The metadata of a change feed resource with is initialized to . + /// The metadata of a change feed resource with is initialized to . /// #if PREVIEW public diff --git a/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedOperationType.cs b/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedOperationType.cs index 48e70b2260..9144556e91 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedOperationType.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/FullFidelity/ChangeFeedOperationType.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos using System.Runtime.Serialization; /// - /// The operation type of a change feed resource with is initialized to . Upsert operations will yield or . + /// The operation type of a change feed resource with is initialized to . Upsert operations will yield or . /// #if PREVIEW public diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ChangeFeedPolicy.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ChangeFeedPolicy.cs index e0b6d3ad16..e411d8ea2e 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ChangeFeedPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ChangeFeedPolicy.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Cosmos /// /// The example below creates a new container with a custom change feed policy for full fidelity change feed with a retention window of 5 minutes - so intermediary snapshots of changes as well as deleted documents would be /// available for processing for 5 minutes before they vanish. - /// Processing the change feed with will only be able within this retention window - if you attempt to process a change feed after more + /// Processing the change feed with will only be able within this retention window - if you attempt to process a change feed after more /// than the retention window (5 minutes in this sample) an error (Status Code 400) will be returned. /// It would still be possible to process changes using mode even when configuring a full fidelity change /// feed policy with retention window on the container and when using Incremental mode it doesn't matter whether your are out of the retention window or not. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs index e34bf128fc..b9d179c0c1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs @@ -788,7 +788,7 @@ public async Task ChangeFeedIteratorCore_WithFullFidelityReadFromBeginning() // FF does not work with StartFromBeginning currently, capture error FeedIterator fullFidelityIterator = container.GetChangeFeedIterator( ChangeFeedStartFrom.Beginning(), - ChangeFeedMode.FullFidelity); + ChangeFeedMode.AllVersionsAndDeletes); CosmosException cosmosException = await Assert.ThrowsExceptionAsync(() => fullFidelityIterator.ReadNextAsync()); Assert.AreEqual(HttpStatusCode.BadRequest, cosmosException.StatusCode, "Full Fidelity Change Feed does not work with StartFromBeginning currently."); @@ -829,7 +829,7 @@ private async Task ValidateChangeFeedIteratorCore_WithQuery( // FF does not work with StartFromBeginning currently, so we capture an initial continuation. FeedIterator> fullFidelityIterator = container.GetChangeFeedIteratorWithQuery>( ChangeFeedStartFrom.Now(), - ChangeFeedMode.FullFidelity, + ChangeFeedMode.AllVersionsAndDeletes, querySpec, null); @@ -862,7 +862,7 @@ private async Task ValidateChangeFeedIteratorCore_WithQuery( // Resume Change Feed and verify we pickup the events where documents matches the query fullFidelityIterator = container.GetChangeFeedIteratorWithQuery>( ChangeFeedStartFrom.ContinuationToken(initialContinuation), - ChangeFeedMode.FullFidelity, + ChangeFeedMode.AllVersionsAndDeletes, querySpec, null); int detectedEvents = 0; @@ -891,7 +891,7 @@ private async Task ValidateChangeFeedIteratorCore_WithQuery( fullFidelityIterator = container.GetChangeFeedIteratorWithQuery>( ChangeFeedStartFrom.ContinuationToken(initialContinuation), - ChangeFeedMode.FullFidelity, + ChangeFeedMode.AllVersionsAndDeletes, querySpec, null); detectedEvents = 0; @@ -927,7 +927,7 @@ public async Task ChangeFeedIteratorCore_FeedRange_FromPartitionKey_VerifyingWir string otherId = Guid.NewGuid().ToString(); PartitionKey partitionKey = new PartitionKey(id); - ChangeFeedMode changeFeedMode = ChangeFeedMode.FullFidelity; + ChangeFeedMode changeFeedMode = ChangeFeedMode.AllVersionsAndDeletes; ChangeFeedStartFrom changeFeedStartFrom = ChangeFeedStartFrom.Now(FeedRange.FromPartitionKey(partitionKey)); using (FeedIterator> feedIterator = container.GetChangeFeedIterator>( @@ -1017,7 +1017,7 @@ public async Task ChangeFeedIteratorCore_FeedRange_VerifyingWireFormatTests() using (FeedIterator> feedIterator = container.GetChangeFeedIterator>( changeFeedStartFrom: ChangeFeedStartFrom.Now(), - changeFeedMode: ChangeFeedMode.FullFidelity)) + changeFeedMode: ChangeFeedMode.AllVersionsAndDeletes)) { string continuation = null; while (feedIterator.HasMoreResults) @@ -1124,7 +1124,7 @@ public async Task ChangeFeedIteratorCore_FeedRange_FromPartitionKey_Dynamic_Veri string otherId = Guid.NewGuid().ToString(); using (FeedIterator feedIterator = container.GetChangeFeedIterator( changeFeedStartFrom: ChangeFeedStartFrom.Now(FeedRange.FromPartitionKey(new PartitionKey(id))), - changeFeedMode: ChangeFeedMode.FullFidelity)) + changeFeedMode: ChangeFeedMode.AllVersionsAndDeletes)) { string continuation = null; while (feedIterator.HasMoreResults) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/NetworkAttachedDocumentContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/NetworkAttachedDocumentContainerTests.cs index 5e62114c1e..a8f5c4810c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/NetworkAttachedDocumentContainerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/NetworkAttachedDocumentContainerTests.cs @@ -144,7 +144,7 @@ public async Task MonadicChangeFeedAsync_ChangeFeedMode_FullFidelity() await networkAttachedDocumentContainer.MonadicChangeFeedAsync( feedRangeState: new FeedRangeState(new FeedRangePartitionKeyRange("0"), ChangeFeedState.Beginning()), - changeFeedPaginationOptions: new ChangeFeedPaginationOptions(ChangeFeedMode.FullFidelity, pageSizeHint: 10), + changeFeedPaginationOptions: new ChangeFeedPaginationOptions(ChangeFeedMode.AllVersionsAndDeletes, pageSizeHint: 10), trace: NoOpTrace.Singleton, cancellationToken: default); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index 07d725e2c5..add1fce30e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -160,15 +160,25 @@ "Microsoft.Azure.Cosmos.ChangeFeedMode;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { - "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity": { + "Microsoft.Azure.Cosmos.ChangeFeedMode AllVersionsAndDeletes": { "Type": "Property", "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode FullFidelity;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode AllVersionsAndDeletes;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_AllVersionsAndDeletes();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, - "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity()": { + "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.ChangeFeedMode get_AllVersionsAndDeletes()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_AllVersionsAndDeletes();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion()": { "Type": "Method", "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_FullFidelity();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} From 77e3aa44c5704f82fcfd6e1028327e4259b40f5f Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Fri, 6 Jan 2023 16:43:57 -0800 Subject: [PATCH 033/164] Query: Fixes handling of CosmosUndefined, CosmosGuid and CosmosBinary in unordered DISTINCT (#3632) * Handle CosmosUndefined, CosmosGuid and CosmosBinary in DistinctMap.UnorderedDistinctMap * Address code review feedback and remove unnecessary allocations from DistinctQueryPipelineStageTests --- .../DistinctMap.UnorderedDistinctMap.cs | 218 +++++++++++----- .../Core/Pipeline/Distinct/DistinctMap.cs | 2 +- .../Query/CosmosUndefinedQueryTests.cs | 5 +- .../DistinctQueryPipelineStageTests.cs | 237 ++++++++++++++++-- 4 files changed, 378 insertions(+), 84 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.UnorderedDistinctMap.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.UnorderedDistinctMap.cs index a0860957f5..f1d9b78fb8 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.UnorderedDistinctMap.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.UnorderedDistinctMap.cs @@ -12,8 +12,8 @@ namespace Microsoft.Azure.Cosmos.Query.Core.Pipeline.Distinct using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.CosmosElements.Numbers; using Microsoft.Azure.Cosmos.Query.Core.Exceptions; - using Microsoft.Azure.Cosmos.Query.Core.Monads; - + using Microsoft.Azure.Cosmos.Query.Core.Monads; + /// /// Partial wrapper /// @@ -72,7 +72,7 @@ private enum SimpleValues /// This class does that with the additional optimization that it doesn't store the whole JSON. /// Instead this class takes a GUID like hash and store that instead. /// - private sealed class UnorderdDistinctMap : DistinctMap + private sealed class UnorderedDistinctMap : DistinctMap { /// /// Length of UInt128 (in bytes). @@ -97,7 +97,9 @@ private static class PropertyNames public const string StringsLength16 = "StringsLength16"; public const string StringsLength16Plus = "StringsLength16+"; public const string Arrays = "Arrays"; - public const string Object = "Object"; + public const string Object = "Object"; + public const string Guids = "Guids"; + public const string Blobs = "Blobs"; public const string SimpleValues = "SimpleValues"; } @@ -141,14 +143,31 @@ private static class PropertyNames /// HashSet for all object seen. /// This set only stores the hash, since we don't want to spend the space for storing large objects. /// - private readonly HashSet objects; + private readonly HashSet objects; + + /// + /// HashSet for all CosmosGuids seen. + /// This set only stores the hash, since we don't want to spend the space for storing large CosmosGuids. + /// + private readonly HashSet guids; /// - /// Stores all the simple values that we don't want to dedicate a hash set for. + /// HashSet for all CosmosBinarys seen. + /// This set only stores the hash, since we don't want to spend the space for storing large CosmosBinary objects. + /// + private readonly HashSet blobs; + + /// + /// Used to dispatch Add calls. /// - private SimpleValues simpleValues; + private readonly CosmosElementVisitor visitor; - private UnorderdDistinctMap( + /// + /// Stores all the simple values that we don't want to dedicate a hash set for. + /// + private SimpleValues simpleValues; + + private UnorderedDistinctMap( HashSet numbers, HashSet stringsLength4, HashSet stringsLength8, @@ -156,6 +175,8 @@ private UnorderdDistinctMap( HashSet stringsLength16Plus, HashSet arrays, HashSet objects, + HashSet guids, + HashSet blobs, SimpleValues simpleValues) { this.numbers = numbers ?? throw new ArgumentNullException(nameof(numbers)); @@ -165,7 +186,10 @@ private UnorderdDistinctMap( this.stringsLength16Plus = stringsLength16Plus ?? throw new ArgumentNullException(nameof(stringsLength16Plus)); this.arrays = arrays ?? throw new ArgumentNullException(nameof(arrays)); this.objects = objects ?? throw new ArgumentNullException(nameof(objects)); - this.simpleValues = simpleValues; + this.guids = guids ?? throw new ArgumentNullException(nameof(guids)); + this.blobs = blobs ?? throw new ArgumentNullException(nameof(blobs)); + this.simpleValues = simpleValues; + this.visitor = new CosmosElementVisitor(this); } /// @@ -179,16 +203,7 @@ public override bool Add(CosmosElement cosmosElement, out UInt128 hash) // Unordered distinct does not need to return a valid hash. // Since it doesn't need the last hash for a continuation. hash = default; - return cosmosElement switch - { - CosmosArray cosmosArray => this.AddArrayValue(cosmosArray), - CosmosBoolean cosmosBoolean => this.AddSimpleValue(cosmosBoolean.Value ? SimpleValues.True : SimpleValues.False), - CosmosNull _ => this.AddSimpleValue(SimpleValues.Null), - CosmosNumber cosmosNumber => this.AddNumberValue(cosmosNumber.Value), - CosmosObject cosmosObject => this.AddObjectValue(cosmosObject), - CosmosString cosmosString => this.AddStringValue(cosmosString.Value), - _ => throw new ArgumentOutOfRangeException($"Unexpected {nameof(CosmosElement)}: {cosmosElement}"), - }; + return cosmosElement.Accept(this.visitor); } public override string GetContinuationToken() @@ -201,35 +216,43 @@ public override CosmosElement GetCosmosElementContinuationToken() Dictionary dictionary = new Dictionary() { { - UnorderdDistinctMap.PropertyNames.Numbers, + UnorderedDistinctMap.PropertyNames.Numbers, CosmosArray.Create(this.numbers.Select(x => CosmosNumber64.Create(x))) }, { - UnorderdDistinctMap.PropertyNames.StringsLength4, + UnorderedDistinctMap.PropertyNames.StringsLength4, CosmosArray.Create(this.stringsLength4.Select(x => CosmosUInt32.Create(x))) }, { - UnorderdDistinctMap.PropertyNames.StringsLength8, + UnorderedDistinctMap.PropertyNames.StringsLength8, CosmosArray.Create(this.stringsLength8.Select(x => CosmosInt64.Create((long)x))) }, { - UnorderdDistinctMap.PropertyNames.StringsLength16, + UnorderedDistinctMap.PropertyNames.StringsLength16, CosmosArray.Create(this.stringsLength16.Select(x => CosmosBinary.Create(UInt128.ToByteArray(x)))) }, { - UnorderdDistinctMap.PropertyNames.StringsLength16Plus, + UnorderedDistinctMap.PropertyNames.StringsLength16Plus, CosmosArray.Create(this.stringsLength16Plus.Select(x => CosmosBinary.Create(UInt128.ToByteArray(x)))) }, { - UnorderdDistinctMap.PropertyNames.Arrays, + UnorderedDistinctMap.PropertyNames.Arrays, CosmosArray.Create(this.arrays.Select(x => CosmosBinary.Create(UInt128.ToByteArray(x)))) }, { - UnorderdDistinctMap.PropertyNames.Object, + UnorderedDistinctMap.PropertyNames.Object, CosmosArray.Create(this.objects.Select(x => CosmosBinary.Create(UInt128.ToByteArray(x)))) }, { - UnorderdDistinctMap.PropertyNames.SimpleValues, + UnorderedDistinctMap.PropertyNames.Guids, + CosmosArray.Create(this.guids.Select(x => CosmosBinary.Create(UInt128.ToByteArray(x)))) + }, + { + UnorderedDistinctMap.PropertyNames.Blobs, + CosmosArray.Create(this.blobs.Select(x => CosmosBinary.Create(UInt128.ToByteArray(x)))) + }, + { + UnorderedDistinctMap.PropertyNames.SimpleValues, CosmosString.Create(this.simpleValues.ToString()) } }; @@ -274,7 +297,7 @@ private bool AddStringValue(string value) int utf8Length = Encoding.UTF8.GetByteCount(value); // If you can fit the string with full fidelity in 16 bytes, then you might as well just hash the string itself. - if (utf8Length <= UnorderdDistinctMap.UInt128Length) + if (utf8Length <= UnorderedDistinctMap.UInt128Length) { Span utf8Buffer = stackalloc byte[UInt128Length]; Encoding.UTF8.GetBytes(value, utf8Buffer); @@ -282,12 +305,12 @@ private bool AddStringValue(string value) { added = this.AddSimpleValue(SimpleValues.EmptyString); } - else if (utf8Length <= UnorderdDistinctMap.UIntLength) + else if (utf8Length <= UnorderedDistinctMap.UIntLength) { uint uintValue = MemoryMarshal.Read(utf8Buffer); added = this.stringsLength4.Add(uintValue); } - else if (utf8Length <= UnorderdDistinctMap.ULongLength) + else if (utf8Length <= UnorderedDistinctMap.ULongLength) { ulong uLongValue = MemoryMarshal.Read(utf8Buffer); added = this.stringsLength8.Add(uLongValue); @@ -328,6 +351,28 @@ private bool AddObjectValue(CosmosObject cosmosObject) { UInt128 hash = DistinctHash.GetHash(cosmosObject); return this.objects.Add(hash); + } + + /// + /// Adds a guid value to the distinct map. + /// + /// The guid to add. + /// Whether or not the value was successfully added. + private bool AddGuidValue(CosmosGuid guid) + { + UInt128 hash = DistinctHash.GetHash(guid); + return this.guids.Add(hash); + } + + /// + /// Adds a binary value to the distinct map. + /// + /// The array to add. + /// Whether or not the value was successfully added. + private bool AddBinaryValue(CosmosBinary binary) + { + UInt128 hash = DistinctHash.GetHash(binary); + return this.blobs.Add(hash); } public static TryCatch TryCreate(CosmosElement continuationToken) @@ -337,8 +382,10 @@ public static TryCatch TryCreate(CosmosElement continuationToken) HashSet stringsLength8 = new HashSet(); HashSet stringsLength16 = new HashSet(); HashSet stringsLength16Plus = new HashSet(); - HashSet arrays = new HashSet(); - HashSet objects = new HashSet(); + HashSet arrays = new HashSet(); + HashSet objects = new HashSet(); + HashSet guids = new HashSet(); + HashSet blobs = new HashSet(); SimpleValues simpleValues = SimpleValues.None; if (continuationToken != null) @@ -347,15 +394,15 @@ public static TryCatch TryCreate(CosmosElement continuationToken) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } // Numbers - if (!hashDictionary.TryGetValue(UnorderdDistinctMap.PropertyNames.Numbers, out CosmosArray numbersArray)) + if (!hashDictionary.TryGetValue(UnorderedDistinctMap.PropertyNames.Numbers, out CosmosArray numbersArray)) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } foreach (CosmosElement rawNumber in numbersArray) @@ -364,18 +411,18 @@ public static TryCatch TryCreate(CosmosElement continuationToken) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } numbers.Add(number.GetValue()); } // Strings Length 4 - if (!hashDictionary.TryGetValue(UnorderdDistinctMap.PropertyNames.StringsLength4, out CosmosArray stringsLength4Array)) + if (!hashDictionary.TryGetValue(UnorderedDistinctMap.PropertyNames.StringsLength4, out CosmosArray stringsLength4Array)) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } foreach (CosmosElement rawStringLength4 in stringsLength4Array) @@ -384,18 +431,18 @@ public static TryCatch TryCreate(CosmosElement continuationToken) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } stringsLength4.Add(stringlength4.GetValue()); } // Strings Length 8 - if (!hashDictionary.TryGetValue(UnorderdDistinctMap.PropertyNames.StringsLength8, out CosmosArray stringsLength8Array)) + if (!hashDictionary.TryGetValue(UnorderedDistinctMap.PropertyNames.StringsLength8, out CosmosArray stringsLength8Array)) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } foreach (CosmosElement rawStringLength8 in stringsLength8Array) @@ -404,49 +451,51 @@ public static TryCatch TryCreate(CosmosElement continuationToken) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } stringsLength8.Add((ulong)stringlength8.GetValue()); } - // Strings Length 16 - stringsLength16 = Parse128BitHashes(hashDictionary, UnorderdDistinctMap.PropertyNames.StringsLength16); + stringsLength16 = Parse128BitHashes(hashDictionary, UnorderedDistinctMap.PropertyNames.StringsLength16); - // Strings Length 24 - stringsLength16Plus = Parse128BitHashes(hashDictionary, UnorderdDistinctMap.PropertyNames.StringsLength16Plus); + stringsLength16Plus = Parse128BitHashes(hashDictionary, UnorderedDistinctMap.PropertyNames.StringsLength16Plus); - // Array - arrays = Parse128BitHashes(hashDictionary, UnorderdDistinctMap.PropertyNames.Arrays); + arrays = Parse128BitHashes(hashDictionary, UnorderedDistinctMap.PropertyNames.Arrays); - // Object - objects = Parse128BitHashes(hashDictionary, UnorderdDistinctMap.PropertyNames.Object); + objects = Parse128BitHashes(hashDictionary, UnorderedDistinctMap.PropertyNames.Object); + + guids = Parse128BitHashes(hashDictionary, UnorderedDistinctMap.PropertyNames.Guids); + + blobs = Parse128BitHashes(hashDictionary, UnorderedDistinctMap.PropertyNames.Blobs); // Simple Values - CosmosElement rawSimpleValues = hashDictionary[UnorderdDistinctMap.PropertyNames.SimpleValues]; + CosmosElement rawSimpleValues = hashDictionary[UnorderedDistinctMap.PropertyNames.SimpleValues]; if (!(rawSimpleValues is CosmosString simpleValuesString)) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } if (!Enum.TryParse(simpleValuesString.Value, out simpleValues)) { return TryCatch.FromException( new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed.")); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed.")); } } - return TryCatch.FromResult(new UnorderdDistinctMap( + return TryCatch.FromResult(new UnorderedDistinctMap( numbers, stringsLength4, stringsLength8, stringsLength16, stringsLength16Plus, arrays, - objects, + objects, + guids, + blobs, simpleValues)); } @@ -456,7 +505,7 @@ private static HashSet Parse128BitHashes(CosmosObject hashDictionary, s if (!hashDictionary.TryGetValue(propertyName, out CosmosArray array)) { throw new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed."); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed."); } foreach (CosmosElement item in array) @@ -464,7 +513,7 @@ private static HashSet Parse128BitHashes(CosmosObject hashDictionary, s if (!(item is CosmosBinary binary)) { throw new MalformedContinuationTokenException( - $"{nameof(UnorderdDistinctMap)} continuation token was malformed."); + $"{nameof(UnorderedDistinctMap)} continuation token was malformed."); } UInt128 uint128 = UInt128.FromByteArray(binary.Value.Span); @@ -472,6 +521,61 @@ private static HashSet Parse128BitHashes(CosmosObject hashDictionary, s } return hashSet; + } + + private sealed class CosmosElementVisitor : ICosmosElementVisitor + { + private readonly UnorderedDistinctMap parent; + + public CosmosElementVisitor(UnorderedDistinctMap parent) + { + this.parent = parent ?? throw new ArgumentNullException(nameof(parent)); + } + + public bool Visit(CosmosArray cosmosArray) + { + return this.parent.AddArrayValue(cosmosArray); + } + + public bool Visit(CosmosBinary cosmosBinary) + { + return this.parent.AddBinaryValue(cosmosBinary); + } + + public bool Visit(CosmosBoolean cosmosBoolean) + { + return this.parent.AddSimpleValue(cosmosBoolean.Value ? SimpleValues.True : SimpleValues.False); + } + + public bool Visit(CosmosGuid cosmosGuid) + { + return this.parent.AddGuidValue(cosmosGuid); + } + + public bool Visit(CosmosNull cosmosNull) + { + return this.parent.AddSimpleValue(SimpleValues.Null); + } + + public bool Visit(CosmosNumber cosmosNumber) + { + return this.parent.AddNumberValue(cosmosNumber.Value); + } + + public bool Visit(CosmosObject cosmosObject) + { + return this.parent.AddObjectValue(cosmosObject); + } + + public bool Visit(CosmosString cosmosString) + { + return this.parent.AddStringValue(cosmosString.Value); + } + + public bool Visit(CosmosUndefined cosmosUndefined) + { + return this.parent.AddSimpleValue(SimpleValues.Undefined); + } } } } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.cs index 821c5ff4bf..db01fbe32d 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Distinct/DistinctMap.cs @@ -30,7 +30,7 @@ public static TryCatch TryCreate( CosmosElement distinctMapContinuationToken) => distinctQueryType switch { DistinctQueryType.None => throw new ArgumentException("distinctQueryType can not be None. This part of code is not supposed to be reachable. Please contact support to resolve this issue."), - DistinctQueryType.Unordered => UnorderdDistinctMap.TryCreate(distinctMapContinuationToken), + DistinctQueryType.Unordered => UnorderedDistinctMap.TryCreate(distinctMapContinuationToken), DistinctQueryType.Ordered => OrderedDistinctMap.TryCreate(distinctMapContinuationToken), _ => throw new ArgumentException($"Unrecognized DistinctQueryType: {distinctQueryType}."), }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs index 3945169330..1b44c773fa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/CosmosUndefinedQueryTests.cs @@ -75,7 +75,10 @@ private static async Task UntypedTests(Container container) expectedCount: 0), MakeUndefinedProjectionTest( query: $"SELECT VALUE AVG(c.{nameof(MixedTypeDocument.MixedTypeField)}) FROM c", - expectedCount: 0), + expectedCount: 0), + MakeUndefinedProjectionTest( + query: $"SELECT DISTINCT VALUE SUM(c.{nameof(MixedTypeDocument.MixedTypeField)}) FROM c", + expectedCount: 0) }; foreach (UndefinedProjectionTestCase testCase in undefinedProjectionTestCases) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/DistinctQueryPipelineStageTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/DistinctQueryPipelineStageTests.cs index 3fc5eaa05f..9b9ade94c6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/DistinctQueryPipelineStageTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Pipeline/DistinctQueryPipelineStageTests.cs @@ -2,11 +2,12 @@ { using System; using System.Collections.Generic; - using System.Linq; + using System.Linq; + using System.Text; using System.Threading; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos.CosmosElements; - using Microsoft.Azure.Cosmos.Query.Core.ExecutionContext; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.CosmosElements; + using Microsoft.Azure.Cosmos.CosmosElements.Numbers; using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.Query.Core.Pipeline; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.Distinct; @@ -16,28 +17,198 @@ [TestClass] public sealed class DistinctQueryPipelineStageTests - { + { + private const int InputElementCount = 400; + + // This list SHOULD NOT contain duplicates + private static readonly IReadOnlyList Literals = new List + { + CosmosUndefined.Create(), + + CosmosNull.Create(), + + CosmosBoolean.Create(true), + CosmosBoolean.Create(false), + + CosmosNumber64.Create(0), + CosmosNumber64.Create(42), + CosmosNumber64.Create(-1), + CosmosNumber64.Create(100010), + CosmosNumber64.Create(3.141619), + CosmosNumber64.Create(Math.PI), + + CosmosString.Create(string.Empty), + CosmosString.Create("Hello World"), + CosmosString.Create(string.Join(',', Enumerable.Repeat("Hello World", 75))), + CosmosString.Create(string.Join(',', Enumerable.Repeat("Hello World", 100))), + CosmosString.Create("敏捷的棕色狐狸跳过了懒狗"), + CosmosString.Create(string.Join(',', Enumerable.Repeat("敏捷的棕色狐狸跳过了懒狗", 50))), + CosmosString.Create(string.Join(',', Enumerable.Repeat("敏捷的棕色狐狸跳过了懒狗", 60))), + + CosmosArray.Create(), + CosmosArray.Create(new CosmosElement[] + { + CosmosUndefined.Create(), + CosmosNull.Create(), + CosmosBoolean.Create(true), + CosmosBoolean.Create(false), + CosmosNumber64.Create(0), + }), + CosmosArray.Create(new CosmosElement[] + { + CosmosUndefined.Create(), + CosmosNull.Create(), + CosmosBoolean.Create(true), + CosmosBoolean.Create(false) + }), + CosmosArray.Create(new CosmosElement[] + { + CosmosUndefined.Create(), + CosmosNull.Create(), + CosmosBoolean.Create(true), + CosmosBoolean.Create(false), + CosmosNumber64.Create(0), + CosmosNumber64.Create(42), + CosmosNumber64.Create(-1), + CosmosNumber64.Create(100010), + CosmosNumber64.Create(3.141619), + }), + + CosmosObject.Create(new Dictionary()), + CosmosObject.Create(new Dictionary + { + ["敏"] = CosmosUndefined.Create(), + ["b"] = CosmosNull.Create(), + ["c"] = CosmosBoolean.Create(true), + ["d"] = CosmosBoolean.Create(false), + ["懒"] = CosmosNumber64.Create(0), + }), + CosmosObject.Create(new Dictionary + { + ["敏"] = CosmosUndefined.Create(), + ["b"] = CosmosNull.Create(), + ["c"] = CosmosBoolean.Create(true), + ["d"] = CosmosBoolean.Create(false), + ["懒"] = CosmosNumber64.Create(0), + ["e"] = CosmosNumber64.Create(42), + ["f"] = CosmosNumber64.Create(-1), + ["فوق"] = CosmosNumber64.Create(100010), + ["g"] = CosmosNumber64.Create(3.141619), + }), + + CosmosGuid.Create(Guid.Parse("D29F71E3-2D43-4573-A0E6-16D7E03FDEB5")), + CosmosGuid.Create(Guid.Parse("D29F71E3-2D43-4573-B0E6-16D7E03FDEB5")), + CosmosGuid.Create(Guid.Parse("D29F71E3-2D43-4573-C0E6-16D7E03FDEB5")), + CosmosGuid.Create(Guid.Parse("D29F71E3-2D43-4573-D0E6-16D7E03FDEB5")), + CosmosGuid.Create(Guid.Parse("D29F71E3-2D43-4573-E0E6-16D7E03FDEB5")), + + CosmosBinary.Create(Guid.Parse("D29F71E3-2D43-4573-A0E6-16D7E03FDEB5").ToByteArray()), + CosmosBinary.Create(Guid.Parse("D29F71E3-2D43-4573-B0E6-16D7E03FDEB5").ToByteArray()), + CosmosBinary.Create(Guid.Parse("D29F71E3-2D43-4573-C0E6-16D7E03FDEB5").ToByteArray()), + CosmosBinary.Create(Guid.Parse("D29F71E3-2D43-4573-D0E6-16D7E03FDEB5").ToByteArray()), + CosmosBinary.Create(Guid.Parse("D29F71E3-2D43-4573-E0E6-16D7E03FDEB5").ToByteArray()), + CosmosBinary.Create(Encoding.UTF8.GetBytes("Hello World")), + CosmosBinary.Create(Encoding.UTF8.GetBytes(string.Join(',', Enumerable.Repeat("Hello World", 75)))), + CosmosBinary.Create(Encoding.UTF8.GetBytes(string.Join(',', Enumerable.Repeat("Hello World", 100)))), + CosmosBinary.Create(Encoding.UTF8.GetBytes("敏捷的棕色狐狸跳过了懒狗")), + CosmosBinary.Create(Encoding.UTF8.GetBytes(string.Join(',', Enumerable.Repeat("敏捷的棕色狐狸跳过了懒狗", 50)))), + CosmosBinary.Create(Encoding.UTF8.GetBytes(string.Join(',', Enumerable.Repeat("敏捷的棕色狐狸跳过了懒狗", 60)))), + }; + [TestMethod] public async Task SanityTests() - { - long[] values = new long[] { 42, 1337, 1337, 42 }; - IReadOnlyList> pages = values - .Select(value => new List() + { + long[] values = { 42, 1337, 1337, 42 }; + + IEnumerable input = values + .Select(value => CosmosObject.Create(new Dictionary + { + ["item"] = CosmosNumber64.Create(value) + })); + + IEnumerable expected = values + .Distinct() + .Select(value => CosmosObject.Create(new Dictionary + { + ["item"] = CosmosNumber64.Create(value) + })); + + DistinctQueryPipelineStageTestCase MakeTest(int pageSize) + { + return new DistinctQueryPipelineStageTestCase(input: input, pageSize: pageSize, expected: expected); + } + + IEnumerable testCases = new List + { + MakeTest(pageSize: 1), + MakeTest(pageSize: 3), + MakeTest(pageSize : 10), + }; + + await RunTests(testCases); + } + + [TestMethod] + public async Task MixedTypeTests() + { + IEnumerable mixedTypeValues = Enumerable + .Range(0, InputElementCount) + .Select(index => Literals[index % Literals.Count]); + + DistinctQueryPipelineStageTestCase MakeTest(int pageSize) + { + return new DistinctQueryPipelineStageTestCase(input: mixedTypeValues, pageSize: pageSize, expected: Literals); + } + + int[] pageSizes = { 400, 100, 10, 1 }; + IEnumerable testCases = pageSizes + .Select(x => MakeTest(pageSize: x)) + .ToList(); + + await RunTests(testCases); + } + + private static async Task RunTests(IEnumerable testCases) + { + foreach (DistinctQueryPipelineStageTestCase testCase in testCases) + { + IEnumerator enumerator = testCase.Input.GetEnumerator(); + int pageSize = 0; + List> pages = new List>() { new List() }; + while(enumerator.MoveNext()) + { + if (pageSize > testCase.PageSize) + { + pageSize = 0; + pages.Add(new List()); + } + + pages[pages.Count - 1].Add(enumerator.Current); + ++pageSize; + } + + foreach (ExecutionEnvironment env in new[] { ExecutionEnvironment.Compute, ExecutionEnvironment.Client }) { - CosmosElement.Parse($"{{\"item\": {value}}}") - }) - .ToList(); - - List elements = await DistinctQueryPipelineStageTests.CreateAndDrainAsync( - pages: pages, - executionEnvironment: ExecutionEnvironment.Compute, - continuationToken: null, - distinctQueryType: DistinctQueryType.Unordered); - - Assert.AreEqual(values.Distinct().Count(), elements.Count); + IEnumerable elements = await DistinctQueryPipelineStageTests.CreateAndDrainAsync( + pages: pages, + executionEnvironment: env, + continuationToken: null, + distinctQueryType: DistinctQueryType.Unordered); + + List actual = elements + .Select(value => value.ToString()) + .ToList(); + + List expected = testCase.Expected + .Select(value => value.ToString()) + .ToList(); + + CollectionAssert.AreEquivalent(expected, actual); + } + } } - private static async Task> CreateAndDrainAsync( + private static async Task> CreateAndDrainAsync( IReadOnlyList> pages, ExecutionEnvironment executionEnvironment, CosmosElement continuationToken, @@ -55,15 +226,31 @@ private static async Task> CreateAndDrainAsync( IQueryPipelineStage distinctQueryPipelineStage = tryCreateDistinctQueryPipelineStage.Result; - List elements = new List(); + IEnumerable elements = Enumerable.Empty(); await foreach (TryCatch page in new EnumerableStage(distinctQueryPipelineStage, NoOpTrace.Singleton)) { page.ThrowIfFailed(); - elements.AddRange(page.Result.Documents); + elements = elements.Concat(page.Result.Documents); } return elements; - } - } + } + + private struct DistinctQueryPipelineStageTestCase + { + public IEnumerable Input { get; } + + public int PageSize { get; } + + public IEnumerable Expected { get; } + + public DistinctQueryPipelineStageTestCase(IEnumerable input, int pageSize, IEnumerable expected) + { + this.Input = input ?? throw new ArgumentNullException(nameof(input)); + this.PageSize = pageSize; + this.Expected = expected ?? throw new ArgumentNullException(nameof(expected)); + } + } + } } From 3c875c7c15822f518c742dd4392cc6c093320b27 Mon Sep 17 00:00:00 2001 From: Nalu Tripician Date: Mon, 9 Jan 2023 10:50:57 -0800 Subject: [PATCH 034/164] [Internal] Subpartitioning: Adds updates to test coverage for subpartitioning (#3618) * updates to test coverage for subpartitioning * bug fixes * now useses Assert.ThrowsException * Seperated into multiple tests for clarity * Put MultiHash test into seperate test file * nit --- .../CosmosItemTests.cs | 110 ----- .../CosmosMultiHashTest.cs | 445 ++++++++++++++++++ 2 files changed, 445 insertions(+), 110 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs index da6d79c333..50bc71f276 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs @@ -27,7 +27,6 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using Newtonsoft.Json; using Newtonsoft.Json.Linq; using JsonReader = Json.JsonReader; - using JsonSerializer = Json.JsonSerializer; using JsonWriter = Json.JsonWriter; using PartitionKey = Documents.PartitionKey; using static Microsoft.Azure.Cosmos.SDK.EmulatorTests.TransportClientHelper; @@ -3006,115 +3005,6 @@ public async Task HaLayerDoesNotThrowNullOnGoneExceptionTest() } } -#if PREVIEW - [TestMethod] - public async Task VerifyDocumentCrudWithMultiHashKind() - { - string currentVersion = HttpConstants.Versions.CurrentVersion; - HttpConstants.Versions.CurrentVersion = "2020-07-15"; - CosmosClient client = TestCommon.CreateCosmosClient(true); - Cosmos.Database database = null; - database = await client.CreateDatabaseIfNotExistsAsync("mydb"); - try - { - ContainerProperties containerProperties = new ContainerProperties("mycoll", new List { "/ZipCode", "/Address" }); - Container container = await database.CreateContainerAsync(containerProperties); - - //Document create. - ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - documents[0] = await container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - documents[1] = await container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - documents[2] = await container.CreateItemAsync(doc1); - - Assert.AreEqual(3, documents.Select(document => ((Document)document).SelfLink).Distinct().Count()); - - //Negative test - { - doc1 = new Document { Id = "doc1" }; - doc1.SetValue("Zipcode", 11790); - - PartitionKeyBuilder pKValueList = new PartitionKeyBuilder(); - pKValueList.Add(doc1.GetPropertyValue("ZipCode")); - - Cosmos.PartitionKey pKeyErr = pKValueList.Build(); - ResponseMessage response = await this.Container.CreateItemStreamAsync(streamPayload: TestCommon.SerializerCore.ToStream(doc1), partitionKey: pKeyErr); - - Assert.IsNotNull(response); - Assert.IsNull(response.Content); - Assert.AreEqual(HttpStatusCode.BadRequest, response.StatusCode); - } - - //Document Read. - foreach (Document document in documents) - { - Cosmos.PartitionKey pKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) - .Build(); - - Document readDocument = (await container.ReadItemAsync(document.Id, pKey)).Resource; - Assert.AreEqual(document.ToString(), readDocument.ToString()); - } - - //Document Update. - foreach (ItemResponse obj in documents) - { - Cosmos.PartitionKey pKey = new PartitionKeyBuilder() - .Add(obj.Resource.GetValue("ZipCode")) - .Add(obj.Resource.GetPropertyValue("Address")) - .Build(); - - Document document = (await container.ReadItemAsync(obj.Resource.Id, pKey)).Resource; - document.SetPropertyValue("Name", document.Id); - - Document readDocument = (await container.ReplaceItemAsync(document, document.Id, pKey)).Resource; - Assert.AreEqual(readDocument.GetValue("Name"), document.GetValue("Name")); - } - - //Document Delete. - foreach (Document document in documents) - { - Cosmos.PartitionKey pKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) - .Build(); - - Document readDocument = (await container.DeleteItemAsync(document.Id, pKey)).Resource; - try - { - readDocument = await container.ReadItemAsync(document.Id, pKey); - } - catch (CosmosException clientException) - { - Assert.AreEqual(clientException.StatusCode, HttpStatusCode.NotFound); - } - } - - } - catch (Exception) - { - Assert.Fail(); - } - finally - { - await database.DeleteAsync(); - HttpConstants.Versions.CurrentVersion = currentVersion; - } - - } - -#endif private async Task AutoGenerateIdPatternTest(Cosmos.PartitionKey pk, T itemWithoutId) { string autoId = Guid.NewGuid().ToString(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs new file mode 100644 index 0000000000..d069e87935 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -0,0 +1,445 @@ +#if PREVIEW +namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Net; + using System.Threading.Tasks; + using Microsoft.Azure.Documents; + using Microsoft.Azure.Cosmos; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class CosmosMultiHashTest + { + private Cosmos.Database database = null; + + private Container container = null; + private ContainerProperties containerProperties = null; + + private readonly string currentVersion = HttpConstants.Versions.CurrentVersion; + + + [TestInitialize] + public async Task TestInitialize() + { + HttpConstants.Versions.CurrentVersion = "2020-07-15"; + CosmosClient client = TestCommon.CreateCosmosClient(true); + this.database = await client.CreateDatabaseIfNotExistsAsync("mydb"); + + this.containerProperties = new ContainerProperties("mycoll", new List { "/ZipCode", "/Address" }); + this.container = await this.database.CreateContainerAsync(this.containerProperties); + } + + [TestCleanup] + public async Task Cleanup() + { + await this.database.DeleteAsync(); + HttpConstants.Versions.CurrentVersion = this.currentVersion; + } + + [TestMethod] + public async Task MultiHashCreateDocumentTest() + { + //Document create test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + Assert.AreEqual(3, documents.Select(document => ((Document)document).SelfLink).Distinct().Count()); + + //Negative test - using incomplete partition key + Cosmos.PartitionKey badPKey; + + foreach (Document document in documents) + { + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("Address")) + .Build(); + + document.Id += "Bad"; + + ArgumentException createException = await Assert.ThrowsExceptionAsync(() => + this.container.CreateItemAsync(document, badPKey) + ); + } + } + + [TestMethod] + public async Task MultiHashDeleteDocumentTest() + { + Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; + + //Create Items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + //Document Delete Test + foreach (Document document in documents) + { + //Negative test - using incomplete partition key + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("Address")) + .Build(); + + CosmosException deleteException = await Assert.ThrowsExceptionAsync(() => + this.container.DeleteItemAsync(document.Id, badPKey) + ); + + Assert.AreEqual(deleteException.StatusCode, HttpStatusCode.BadRequest); + + //Positive test + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Add(document.GetPropertyValue("Address")) + .Build(); + + Document readDocument = (await this.container.DeleteItemAsync(document.Id, pKey)).Resource; + + CosmosException clientException = await Assert.ThrowsExceptionAsync(() => + this.container.ReadItemAsync(document.Id, pKey) + ); + + Assert.AreEqual(clientException.StatusCode, HttpStatusCode.NotFound); + } + } + + [TestMethod] + public async Task MultiHashReadItemTest() + { + Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; + + //Create Items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + //Document Read Test + foreach (Document document in documents) + { + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Add(document.GetPropertyValue("Address")) + .Build(); + + Document readDocument = (await this.container.ReadItemAsync(document.Id, pKey)).Resource; + Assert.AreEqual(document.ToString(), readDocument.ToString()); + + //Negative test - using incomplete partition key + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("Address")) + .Build(); + + CosmosException clientException = await Assert.ThrowsExceptionAsync(() => + this.container.ReadItemAsync(document.Id, badPKey) + ); + + Assert.AreEqual(clientException.StatusCode, HttpStatusCode.BadRequest); + } + } + + [TestMethod] + public async Task MultiHashReadManyTest() + { + Cosmos.PartitionKey pKey; + + //Create Items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + //Read Many Test + List<(string, Cosmos.PartitionKey)> itemList = new List<(string, Cosmos.PartitionKey)>(); + foreach (Document document in documents) + { + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Add(document.GetPropertyValue("Address")) + .Build(); + + itemList.Add((document.Id, pKey)); + } + + FeedResponse feedResponse = await this.container.ReadManyItemsAsync(itemList); + + Assert.IsNotNull(feedResponse); + Assert.AreEqual(feedResponse.Count, 3); + Assert.IsTrue(feedResponse.Headers.RequestCharge > 0); + Assert.IsNotNull(feedResponse.Diagnostics); + + int count = 0; + foreach (ToDoActivity item in feedResponse) + { + count++; + Assert.IsNotNull(item); + Assert.IsNotNull(item.pk); + } + Assert.AreEqual(count, 3); + } + + [TestMethod] + public async Task MultiHashUpsetItemTest() + { + Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; + int count; + + //Create Items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + //Document Upsert Test + doc1 = new Document { Id = "document4" }; + doc1.SetValue("ZipCode", "97756"); + doc1.SetValue("Address", "Redmond"); + doc1.SetValue("Type", "Residence"); + + pKey = new PartitionKeyBuilder() + .Add(doc1.GetPropertyValue("ZipCode")) + .Add(doc1.GetPropertyValue("Address")) + .Build(); + + //insert check + await this.container.UpsertItemAsync(doc1, pKey); + + Document readCheck = (await this.container.ReadItemAsync(doc1.Id, pKey)).Resource; + + Assert.AreEqual(doc1.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); + Assert.AreEqual(doc1.GetPropertyValue("Address"), readCheck.GetPropertyValue("Address")); + Assert.AreEqual(doc1.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); + + doc1 = new Document { Id = "document4" }; + doc1.SetValue("ZipCode", "97756"); + doc1.SetValue("Address", "Redmond"); + doc1.SetValue("Type", "Business"); + + //update check + pKey = new PartitionKeyBuilder() + .Add(doc1.GetPropertyValue("ZipCode")) + .Add(doc1.GetPropertyValue("Address")) + .Build(); + + documents.Append>(await this.container.UpsertItemAsync(doc1, pKey)); + + readCheck = (await this.container.ReadItemAsync(doc1.Id, pKey)).Resource; + + Assert.AreEqual(doc1.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); + Assert.AreEqual(doc1.GetPropertyValue("Address"), readCheck.GetPropertyValue("Address")); + Assert.AreEqual(doc1.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); + + count = 0; + + foreach (Document doc in this.container.GetItemLinqQueryable(true)) + { + count++; + } + Assert.AreEqual(4, count); + + //Negative test - using incomplete partition key + doc1 = new Document { Id = "document4" }; + doc1.SetValue("ZipCode", "97756"); + doc1.SetValue("Address", "Redmond"); + doc1.SetValue("Type", "Residence"); + + badPKey = new PartitionKeyBuilder() + .Add(doc1.GetPropertyValue("ZipCode")) + .Build(); + + await Assert.ThrowsExceptionAsync(() => + this.container.UpsertItemAsync(doc1, badPKey) + ); + + readCheck = (await this.container.ReadItemAsync(doc1.Id, pKey)).Resource; + + Assert.AreEqual(doc1.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); + Assert.AreEqual(doc1.GetPropertyValue("Address"), readCheck.GetPropertyValue("Address")); + Assert.AreNotEqual(doc1.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); + } + + [TestMethod] + public async Task MultiHashReplaceItemTest() + { + Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; + + //Create items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + //Document Replace Test + foreach (Document document in documents) + { + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Add(document.GetPropertyValue("Address")) + .Build(); + + + Document readDocument = (await this.container.ReadItemAsync(document.Id, pKey)).Resource; + readDocument.SetValue("Type", "Park"); + + ItemResponse item = await this.container.ReplaceItemAsync(readDocument, readDocument.Id, pKey); + + Document checkDocument = (await this.container.ReadItemAsync(document.Id, pKey)).Resource; + Assert.AreEqual(checkDocument.GetPropertyValue("Type"), readDocument.GetPropertyValue("Type")); + + //Negative test - using incomplete partition key + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("Address")) + .Build(); + + readDocument.SetValue("Type", "Goverment"); + + await Assert.ThrowsExceptionAsync(() => + this.container.ReplaceItemAsync(document, document.Id, partitionKey: badPKey) + ); + } + } + + [TestMethod] + public async Task MultiHashQueryItemTest() + { + Cosmos.PartitionKey pKey; + + //Create items for test + ItemResponse[] documents = new ItemResponse[3]; + Document doc1 = new Document { Id = "document1" }; + doc1.SetValue("ZipCode", "500026"); + doc1.SetValue("Address", "Secunderabad"); + doc1.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document2" }; + doc1.SetValue("ZipCode", "15232"); + doc1.SetValue("Address", "Pittsburgh"); + doc1.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc1); + + doc1 = new Document { Id = "document3" }; + doc1.SetValue("ZipCode", "11790"); + doc1.SetValue("Address", "Stonybrook"); + doc1.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc1); + + //Query + foreach (Document document in documents) + { + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Add(document.GetPropertyValue("Address")) + .Build(); + + String query = $"SELECT * from c where c.id = {document.GetPropertyValue("Id")}"; + + using (FeedIterator feedIterator = this.container.GetItemQueryIterator( + query, + null, + new QueryRequestOptions() { PartitionKey = pKey })) + { + Assert.IsTrue(feedIterator.HasMoreResults); + + FeedResponse queryDoc = await feedIterator.ReadNextAsync(); + } + + } + } + + } +} +#endif From 416b154a7f90d35bf572d05ff69c70c5737cfaf0 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Mon, 9 Jan 2023 14:18:54 -0800 Subject: [PATCH 035/164] [Internal] ContainerProperties: Fixes version reset when setting PartitionKeyPath (#3637) * Remember previous value * test --- .../src/Resource/Settings/ContainerProperties.cs | 7 +++++++ .../CosmosContainerSettingsTests.cs | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs index e1eaa6ca96..b95efb99c8 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs @@ -362,10 +362,17 @@ public string PartitionKeyPath throw new ArgumentNullException(nameof(this.PartitionKeyPath)); } + PartitionKeyDefinitionVersion? currentDefinitionVersion = this.PartitionKeyDefinitionVersion; + this.PartitionKey = new PartitionKeyDefinition { Paths = new Collection() { value } }; + + if (currentDefinitionVersion.HasValue) + { + this.PartitionKeyDefinitionVersion = currentDefinitionVersion.Value; + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs index 84618705de..865bb71d18 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs @@ -165,6 +165,17 @@ public void ValidateIncludedPathSerialization() } } + [TestMethod] + public void SettingPKShouldNotResetVersion() + { + ContainerProperties containerProperties = new(); + containerProperties.Id = "test"; + containerProperties.PartitionKeyDefinitionVersion = Cosmos.PartitionKeyDefinitionVersion.V2; + containerProperties.PartitionKeyPath = "/id"; + + Assert.AreEqual(Cosmos.PartitionKeyDefinitionVersion.V2, containerProperties.PartitionKeyDefinitionVersion); + } + private static string SerializeDocumentCollection(DocumentCollection collection) { using (MemoryStream ms = new MemoryStream()) From 59b70a6284483bfc79c6c96a2207905c652a1620 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Tue, 10 Jan 2023 21:15:04 +0530 Subject: [PATCH 036/164] [Internal] AI Integration: Adds CorrelationId and Activity Id Attributes for query operation (#3630) * add activityid in Otel attributes * added correlation id * operation type fix * remove test changes * test fix * fix baseline test * rename correlationId * fix tests again * include only not null attributes in test * fixed tests * changefeedxml * test fix * ordering activity in operationname oerder * fix test * review comments * refator header getter setter * clean up Co-authored-by: Sourabh Jain --- .../CosmosQueryResponseMessageHeaders.cs | 6 +- Microsoft.Azure.Cosmos/src/Headers/Headers.cs | 9 + .../src/Query/v3Query/QueryIterator.cs | 1 + .../OpenTelemetryAttributeKeys.cs | 4 +- .../OpenTelemetry/OpenTelemetryAttributes.cs | 15 ++ .../OpenTelemetryCoreRecorder.cs | 47 ++-- .../OpenTelemetry/OpenTelemetryResponse.cs | 18 +- .../OpenTelemetry/OpenTelemetryResponse{T}.cs | 18 +- .../BaselineTest/BaselineTests.cs | 4 - ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 202 +++++++++--------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 44 ++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 12 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 ++--- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 14 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- .../Tracing/AssertActivity.cs | 4 +- .../Tracing/CustomListener.cs | 28 ++- 21 files changed, 312 insertions(+), 228 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Headers/CosmosQueryResponseMessageHeaders.cs b/Microsoft.Azure.Cosmos/src/Headers/CosmosQueryResponseMessageHeaders.cs index 4c962cb6d8..2e37e62e9b 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/CosmosQueryResponseMessageHeaders.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/CosmosQueryResponseMessageHeaders.cs @@ -73,7 +73,8 @@ internal CosmosQueryResponseMessageHeaders CloneKnownProperties( SubStatusCodeLiteral = this.SubStatusCodeLiteral, ContentType = this.ContentType, QueryMetricsText = QueryMetricsText, - IndexUtilizationText = IndexUtilizationText + IndexUtilizationText = IndexUtilizationText, + CorrelatedActivityId = this.CorrelatedActivityId }; } @@ -108,7 +109,8 @@ internal static CosmosQueryResponseMessageHeaders ConvertToQueryHeaders( SubStatusCodeLiteral = sourceHeaders.SubStatusCodeLiteral ?? (substatusCode.HasValue ? substatusCode.Value.ToString() : null), ContentType = sourceHeaders.ContentType, QueryMetricsText = sourceHeaders.QueryMetricsText, - IndexUtilizationText = sourceHeaders.IndexUtilizationText + IndexUtilizationText = sourceHeaders.IndexUtilizationText, + CorrelatedActivityId = sourceHeaders.CorrelatedActivityId }; } } diff --git a/Microsoft.Azure.Cosmos/src/Headers/Headers.cs b/Microsoft.Azure.Cosmos/src/Headers/Headers.cs index fda0536da2..611de5f147 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/Headers.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/Headers.cs @@ -36,6 +36,15 @@ public virtual string ContinuationToken internal set => this.CosmosMessageHeaders.Continuation = value; } + /// + /// Gets or Set the CoorelatedActivityId in the current . + /// + internal virtual string CorrelatedActivityId + { + get => this.CosmosMessageHeaders.Get(HttpConstants.HttpHeaders.CorrelatedActivityId); + set => this.CosmosMessageHeaders.Set(HttpConstants.HttpHeaders.CorrelatedActivityId, value); + } + /// /// Gets the request charge for this request from the Azure Cosmos DB service. /// diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs index b7c43c8443..01a4e1b12e 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs @@ -235,6 +235,7 @@ public override async Task ReadNextAsync(ITrace trace, Cancella { RequestCharge = tryGetQueryPage.Result.RequestCharge, ActivityId = tryGetQueryPage.Result.ActivityId, + CorrelatedActivityId = this.correlatedActivityId.ToString(), SubStatusCode = Documents.SubStatusCodes.Unknown }; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs index eb8382c0b0..e7c4d96cc2 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs @@ -24,7 +24,7 @@ internal sealed class OpenTelemetryAttributeKeys public const string ConnectionMode = "db.cosmosdb.connection_mode"; public const string OperationType = "db.cosmosdb.operation_type"; - // Request Specifics + // Request/Response Specifics public const string ContainerName = "db.cosmosdb.container"; public const string RequestContentLength = "db.cosmosdb.request_content_length_bytes"; public const string ResponseContentLength = "db.cosmosdb.response_content_length_bytes"; @@ -35,6 +35,8 @@ internal sealed class OpenTelemetryAttributeKeys public const string RetryCount = "db.cosmosdb.retry_count"; public const string ItemCount = "db.cosmosdb.item_count"; public const string RequestDiagnostics = "db.cosmosdb.request_diagnostics"; + public const string ActivityId = "db.cosmosdb.activity_id"; + public const string CorrelatedActivityId = "db.cosmosdb.correlated_activity_id"; // Exceptions public const string ExceptionType = "exception.type"; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs index 7e9c798f9d..70b6cea4ef 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributes.cs @@ -54,5 +54,20 @@ internal OpenTelemetryAttributes(RequestMessage requestMessage) /// SubStatusCode /// internal int SubStatusCode { get; set; } + + /// + /// ActivityId + /// + internal string ActivityId { get; set; } + + /// + /// CorrelatedActivityId + /// + internal string CorrelatedActivityId { get; set; } + + /// + /// OperationType + /// + internal Documents.OperationType OperationType { get; set; } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index 32e4fde67f..51aa1ee794 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -14,12 +14,13 @@ namespace Microsoft.Azure.Cosmos.Telemetry internal struct OpenTelemetryCoreRecorder : IDisposable { private const string CosmosDb = "cosmosdb"; - + private readonly DiagnosticScope scope; private readonly DistributedTracingOptions config; private readonly Documents.OperationType operationType; - + private OpenTelemetryAttributes response = null; + internal static IDictionary> OTelCompatibleExceptions = new Dictionary>() { { typeof(CosmosNullReferenceException), (exception, scope) => CosmosNullReferenceException.RecordOtelAttributes((CosmosNullReferenceException)exception, scope)}, @@ -41,7 +42,7 @@ public OpenTelemetryCoreRecorder( this.config = config; this.operationType = operationType; - if (this.IsEnabled) + if (scope.IsEnabled) { this.scope.Start(); @@ -49,7 +50,6 @@ public OpenTelemetryCoreRecorder( operationName: operationName, containerName: containerName, databaseName: databaseName, - operationType: operationType, clientContext: clientContext); } } @@ -70,13 +70,11 @@ public void Record(string key, string value) /// /// /// - /// /// public void Record( string operationName, string containerName, string databaseName, - Documents.OperationType operationType, CosmosClientContext clientContext) { if (this.IsEnabled) @@ -84,7 +82,6 @@ public void Record( this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbOperation, operationName); this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbName, databaseName); this.scope.AddAttribute(OpenTelemetryAttributeKeys.ContainerName, containerName); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.OperationType, operationType); // Other information this.scope.AddAttribute(OpenTelemetryAttributeKeys.DbSystemName, OpenTelemetryCoreRecorder.CosmosDb); @@ -106,18 +103,7 @@ public void Record(OpenTelemetryAttributes response) { if (this.IsEnabled) { - this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestContentLength, response.RequestContentLength); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.ResponseContentLength, response.ResponseContentLength); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, (int)response.StatusCode); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, (int)response.SubStatusCode); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, response.RequestCharge); - this.scope.AddAttribute(OpenTelemetryAttributeKeys.ItemCount, response.ItemCount); - - if (response.Diagnostics != null) - { - this.scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(response.Diagnostics.GetContactedRegions())); - CosmosDbEventSource.RecordDiagnosticsForRequests(this.config, this.operationType, response); - } + this.response = response; } } @@ -168,6 +154,29 @@ public void Dispose() { if (this.scope.IsEnabled) { + Documents.OperationType operationType + = (this.response == null || this.response?.OperationType == Documents.OperationType.Invalid) ? this.operationType : this.response.OperationType; + + this.scope.AddAttribute(OpenTelemetryAttributeKeys.OperationType, operationType); + + if (this.response != null) + { + this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestContentLength, this.response.RequestContentLength); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.ResponseContentLength, this.response.ResponseContentLength); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.StatusCode, (int)this.response.StatusCode); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.SubStatusCode, (int)this.response.SubStatusCode); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.RequestCharge, this.response.RequestCharge); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.ItemCount, this.response.ItemCount); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.ActivityId, this.response.ActivityId); + this.scope.AddAttribute(OpenTelemetryAttributeKeys.CorrelatedActivityId, this.response.CorrelatedActivityId); + + if (this.response.Diagnostics != null) + { + this.scope.AddAttribute(OpenTelemetryAttributeKeys.Region, ClientTelemetryHelper.GetContactedRegions(this.response.Diagnostics.GetContactedRegions())); + CosmosDbEventSource.RecordDiagnosticsForRequests(this.config, operationType, this.response); + } + } + this.scope.Dispose(); } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs index 98c1bfab8d..c9aba10ee6 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse.cs @@ -18,7 +18,9 @@ internal OpenTelemetryResponse(TransactionalBatchResponse responseMessage) diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, requestMessage: null, - subStatusCode: (int)responseMessage.Headers?.SubStatusCode) + subStatusCode: (int)responseMessage.Headers?.SubStatusCode, + activityId: responseMessage.Headers?.ActivityId, + correlationId: responseMessage.Headers?.CorrelatedActivityId) { } @@ -30,7 +32,11 @@ internal OpenTelemetryResponse(ResponseMessage responseMessage) diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, requestMessage: responseMessage.RequestMessage, - subStatusCode: (int)responseMessage.Headers?.SubStatusCode) + subStatusCode: (int)responseMessage.Headers?.SubStatusCode, + activityId: responseMessage.Headers?.ActivityId, + correlationId: responseMessage.Headers?.CorrelatedActivityId, + operationType: responseMessage is QueryResponse ? Documents.OperationType.Query : Documents.OperationType.Invalid + ) { } @@ -41,7 +47,10 @@ private OpenTelemetryResponse( CosmosDiagnostics diagnostics, string itemCount, RequestMessage requestMessage, - int subStatusCode) + int subStatusCode, + string activityId, + string correlationId, + Documents.OperationType operationType = Documents.OperationType.Invalid) : base(requestMessage) { this.StatusCode = statusCode; @@ -50,6 +59,9 @@ private OpenTelemetryResponse( this.Diagnostics = diagnostics; this.ItemCount = itemCount; this.SubStatusCode = subStatusCode; + this.ActivityId = activityId; + this.CorrelatedActivityId = correlationId; + this.OperationType = operationType; } private static string GetPayloadSize(ResponseMessage response) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs index 71ca5cfba2..4c96306a30 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryResponse{T}.cs @@ -17,7 +17,10 @@ internal OpenTelemetryResponse(FeedResponse responseMessage) diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, requestMessage: responseMessage.RequestMessage, - subStatusCode: (int)responseMessage.Headers?.SubStatusCode) + subStatusCode: (int)responseMessage.Headers?.SubStatusCode, + activityId: responseMessage.Headers?.ActivityId, + correlatedActivityId: responseMessage.Headers?.CorrelatedActivityId, + operationType: responseMessage is QueryResponse ? Documents.OperationType.Query : Documents.OperationType.Invalid) { } @@ -29,7 +32,10 @@ internal OpenTelemetryResponse(Response responseMessage) diagnostics: responseMessage.Diagnostics, itemCount: responseMessage.Headers?.ItemCount, requestMessage: responseMessage.RequestMessage, - subStatusCode: (int)responseMessage.Headers?.SubStatusCode) + subStatusCode: (int)responseMessage.Headers?.SubStatusCode, + activityId: responseMessage.Headers?.ActivityId, + correlatedActivityId: responseMessage.Headers?.CorrelatedActivityId, + operationType: responseMessage is QueryResponse ? Documents.OperationType.Query : Documents.OperationType.Invalid) { } @@ -40,7 +46,10 @@ private OpenTelemetryResponse( CosmosDiagnostics diagnostics, string itemCount, RequestMessage requestMessage, - int subStatusCode) + int subStatusCode, + string activityId, + string correlatedActivityId, + Documents.OperationType operationType) : base(requestMessage) { this.StatusCode = statusCode; @@ -49,6 +58,9 @@ private OpenTelemetryResponse( this.Diagnostics = diagnostics; this.ItemCount = itemCount; this.SubStatusCode = subStatusCode; + this.ActivityId = activityId; + this.CorrelatedActivityId = correlatedActivityId; + this.OperationType = operationType; } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs index c68a6e6bdc..e9fbc54267 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs @@ -116,17 +116,13 @@ public void ExecuteTestSuite(IEnumerable inputs, [CallerMemberName] stri string outputText = Regex.Replace( Regex.Replace( - Regex.Replace( File.ReadAllText(outputPath), @"\s+", string.Empty), - @"[\w\W]*?", string.Empty), @"[\w\W]*?", string.Empty); // in changefeed test in was changing string baselineText = Regex.Replace( Regex.Replace( - Regex.Replace( File.ReadAllText(baselinePath), @"\s+", string.Empty), - @"[\w\W]*?", string.Empty), @"[\w\W]*?", string.Empty); int commonPrefixLength = 0; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index f650f1e6f5..a6683679f7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -129,7 +129,7 @@ } ] }]]> - Operation.ExecuteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index c10633d3fa..6fd72499bb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -134,16 +134,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -292,16 +292,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -450,16 +450,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -608,16 +608,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -766,16 +766,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -924,16 +924,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1082,16 +1082,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1240,16 +1240,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1398,16 +1398,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1556,16 +1556,16 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2288,7 +2288,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index e4fa3665a8..c04d573153 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -952,11 +952,11 @@ } ] }]]> - Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1569,11 +1569,11 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2167,11 +2167,11 @@ } ] }]]> - Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Change Feed Iterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2785,11 +2785,11 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3066,8 +3066,8 @@ } ] }]]> - Operation.Change Feed Estimator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Change Feed Estimator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 3825735788..cd053b58e2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -107,8 +107,8 @@ } ] }]]> - Operation.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -207,8 +207,8 @@ } ] }]]> - Operation.DeleteAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 80dbbfb7f1..7d6a68adca 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -148,7 +148,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -391,7 +391,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -616,7 +616,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -873,7 +873,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1194,7 +1194,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1348,7 +1348,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.message + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 5b54a51e31..21db429e27 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -574,10 +574,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1180,10 +1180,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1767,10 +1767,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2374,10 +2374,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3048,10 +3048,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3644,10 +3644,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4260,10 +4260,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 22feeace3c..070da7032d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -536,10 +536,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1104,10 +1104,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1653,10 +1653,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.FeedIterator Read Next Asynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2222,10 +2222,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.Typed FeedIterator ReadNextAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index c6a9fcee7f..dd99e1694b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -542,12 +542,12 @@ } ] }]]> - Operation.ReadManyItemsStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadManyItemsStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1112,7 +1112,7 @@ } ] }]]> - Operation.ReadManyItemsAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadManyItemsAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 5a764d9525..6172446645 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -89,7 +89,7 @@ } ] }]]> - Operation.CreateItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -178,7 +178,7 @@ } ] }]]> - Operation.ReadItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -275,7 +275,7 @@ } ] }]]> - Operation.ReplaceItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReplaceItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -367,7 +367,7 @@ } ] }]]> - Operation.DeleteItemStreamAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index 63edd0154e..2aeaf80b15 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -109,7 +109,7 @@ } ] }]]> - Operation.CreateItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -203,7 +203,7 @@ } ] }]]> - Operation.ReadItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReadItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -310,7 +310,7 @@ } ] }]]> - Operation.ReplaceItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.ReplaceItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -406,7 +406,7 @@ } ] }]]> - Operation.DeleteItemAsynckindaz.namespacedb.operationdb.namedb.cosmosdb.containerdb.cosmosdb.operation_typedb.systemdb.cosmosdb.machine_idnet.peer.namedb.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.regions_contacted + Operation.DeleteItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index f62d89e016..b0c605839e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -48,7 +48,9 @@ public static void IsValid(Activity activity) "db.cosmosdb.request_diagnostics", "exception.type", "exception.message", - "exception.stacktrace" + "exception.stacktrace", + "db.cosmosdb.activity_id", + "db.cosmosdb.correlated_activity_id" }; foreach (KeyValuePair actualTag in activity.Tags) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 5e86ee7270..c46d8578b0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -159,7 +159,6 @@ protected override void OnEventSourceCreated(EventSource eventSource) protected override void OnEventWritten(EventWrittenEventArgs eventData) { StringBuilder builder = new StringBuilder(); - Console.WriteLine(eventData.Payload[0].ToString()); builder.Append("") .Append("Ideally, this should contain request diagnostics but request diagnostics is " + "subject to change with each request as it contains few unique id. " + @@ -222,6 +221,17 @@ public override void Dispose() private string GenerateTagForBaselineTest(Activity activity) { + List tagsWithStaticValue = new List + { + "kind", + "az.namespace", + "db.operation", + "db.system", + "net.peer.name", + "db.cosmosdb.connection_mode", + "db.cosmosdb.operation_type", + "db.cosmosdb.regions_contacted" + }; StringBuilder builder = new StringBuilder(); builder.Append("") @@ -235,7 +245,16 @@ private string GenerateTagForBaselineTest(Activity activity) .Append("") .Append(tag.Key) .Append(""); + + if (tagsWithStaticValue.Contains(tag.Key)) + { + builder + .Append("") + .Append(tag.Value) + .Append(""); + } } + builder.Append(""); return builder.ToString(); @@ -246,7 +265,12 @@ public List GetRecordedAttributes() List generatedActivityTagsForBaselineXmls = new(); List collectedActivities = new List(CustomListener.CollectedActivities); - collectedActivities.ForEach(activity => generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity))); + collectedActivities.OrderBy(act => act.OperationName); + + foreach (Activity activity in collectedActivities) + { + generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity)); + } List outputList = new List(); if(generatedActivityTagsForBaselineXmls != null && generatedActivityTagsForBaselineXmls.Count > 0) From 612337cfbd445a95042457b672819e36e0a6319e Mon Sep 17 00:00:00 2001 From: Arthur Augsten Date: Wed, 11 Jan 2023 10:24:53 -0500 Subject: [PATCH 037/164] Documentation: Fixes CosmosClientBuilder.WithConnectionModeGateway parameter description (#3643) * Fixed CosmosClientBuilder.WithConnectionModeGateway documentation * Update Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs Co-authored-by: Ruben Bartelink Co-authored-by: Augsten Co-authored-by: Ruben Bartelink --- Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs index 4621e13557..d47f168764 100644 --- a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs +++ b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs @@ -438,7 +438,7 @@ internal CosmosClientBuilder WithDistributingTracing(DistributedTracingOptions o /// /// Sets the connection mode to Gateway. This is used by the client when connecting to the Azure Cosmos DB service. /// - /// The number specifies the time to wait for response to come back from network peer. Default is 60 connections + /// The number specifies the number of connections that may be opened simultaneously. Default is 50 connections /// Get or set the proxy information used for web requests. /// /// For more information, see Connection policy: Use direct connection mode. From 55f9ce8a5f07a99209b8b6a8d633d8ed15b14d5b Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Wed, 11 Jan 2023 13:07:42 -0800 Subject: [PATCH 038/164] Upgrade Resiliency: Refactors Implementation for Opening Rntbd Connections to Backend Replicas in Direct Mode. (#3640) * Code changes to refactor implementations for opening connections to all replicas. Fixed test failures due to Direct package upgrade. * Code changes to add poland central region as a part of Regions.cs * Code changes to update contract to reflect new regions. * Revert "Code changes to update contract to reflect new regions." This reverts commit f171b3c1c9889043556ddf96bcd33ccd79565ad9. * Revert "Code changes to add poland central region as a part of Regions.cs" This reverts commit 1aafbf18f6d80e9a92baa301b6b23cf065e4b155. --- Directory.Build.props | 2 +- .../src/Routing/GatewayAddressCache.cs | 46 +-- .../src/Routing/GlobalAddressResolver.cs | 24 +- .../src/Routing/IAddressCache.cs | 7 + .../CosmosHeaderTests.cs | 9 +- .../TransportWrapperTests.cs | 25 +- .../TraceWriterBaselineTests.TraceData.xml | 94 +----- .../ClientRetryPolicyTests.cs | 7 +- .../GatewayAddressCacheTests.cs | 268 +++++++++++++----- .../StoreReaderTest.cs | 2 +- ...entSideRequestStatisticsTraceDatumTests.cs | 21 +- .../Tracing/TraceTests.cs | 29 +- .../Tracing/TraceWriterBaselineTests.cs | 42 +-- 13 files changed, 266 insertions(+), 310 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 651e1f89e5..658186357b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ 3.31.2 3.31.2 preview - 3.29.4 + 3.30.0 2.0.0 2.0.0 preview diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index 210e5951fe..7c6355591e 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -50,6 +50,7 @@ internal class GatewayAddressCache : IAddressCache, IDisposable private Tuple masterPartitionAddressCache; private DateTime suboptimalMasterPartitionTimestamp; private bool disposedValue; + private IOpenConnectionsHandler openConnectionsHandler; public GatewayAddressCache( Uri serviceEndpoint, @@ -57,6 +58,7 @@ public GatewayAddressCache( ICosmosAuthorizationTokenProvider tokenProvider, IServiceConfigurationReader serviceConfigReader, CosmosHttpClient httpClient, + IOpenConnectionsHandler openConnectionsHandler, long suboptimalPartitionForceRefreshIntervalInSeconds = 600, bool enableTcpConnectionEndpointRediscovery = false) { @@ -80,6 +82,8 @@ public GatewayAddressCache( GatewayAddressCache.protocolFilterFormat, Constants.Properties.Protocol, GatewayAddressCache.ProtocolString(this.protocol)); + + this.openConnectionsHandler = openConnectionsHandler; } public Uri ServiceEndpoint => this.serviceEndpoint; @@ -88,7 +92,7 @@ public async Task OpenConnectionsAsync( string databaseName, ContainerProperties collection, IReadOnlyList partitionKeyRangeIdentities, - Func openConnectionHandler, + bool shouldOpenRntbdChannels, CancellationToken cancellationToken) { List>> tasks = new (); @@ -157,47 +161,21 @@ public async Task OpenConnectionsAsync( new PartitionKeyRangeIdentity(collection.ResourceId, addressInfo.Item1.PartitionKeyRangeId), addressInfo.Item2); - if (openConnectionHandler != null) + if (this.openConnectionsHandler != null && shouldOpenRntbdChannels) { - await this.OpenRntbdChannelsAsync( - addressInfo, - openConnectionHandler); + await this.openConnectionsHandler + .TryOpenRntbdChannelsAsync( + addresses: addressInfo.Item2.Get(Protocol.Tcp)?.ReplicaTransportAddressUris); } } } } } - /// - /// Invokes the transport client delegate to open the Rntbd connection - /// and establish Rntbd context negotiation to the backend replica nodes. - /// - /// An instance of containing the partition key id - /// and it's corresponding address information. - /// The transport client callback delegate to be invoked at a - /// later point of time. - private async Task OpenRntbdChannelsAsync( - Tuple addressInfo, - Func openConnectionHandlerAsync) + /// + public void SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionsHandler) { - foreach (AddressInformation address in addressInfo.Item2.AllAddresses) - { - DefaultTrace.TraceVerbose("Attempting to open Rntbd connection to backend uri: {0}. '{1}'", - address.PhysicalUri, - System.Diagnostics.Trace.CorrelationManager.ActivityId); - try - { - await openConnectionHandlerAsync( - new Uri(address.PhysicalUri)); - } - catch (Exception ex) - { - DefaultTrace.TraceWarning("Failed to open Rntbd connection to backend uri: {0} with exception: {1}. '{2}'", - address.PhysicalUri, - ex, - System.Diagnostics.Trace.CorrelationManager.ActivityId); - } - } + this.openConnectionsHandler = openConnectionsHandler; } public async Task TryGetAddressesAsync( diff --git a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs index 4e31b0fb40..51a6c6d2f3 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs @@ -39,6 +39,7 @@ internal sealed class GlobalAddressResolver : IAddressResolverExtension, IDispos private readonly CosmosHttpClient httpClient; private readonly ConcurrentDictionary addressCacheByEndpoint; private readonly bool enableTcpConnectionEndpointRediscovery; + private IOpenConnectionsHandler openConnectionsHandler; public GlobalAddressResolver( GlobalEndpointManager endpointManager, @@ -108,7 +109,7 @@ public async Task OpenAsync( databaseName: databaseName, collection: collection, partitionKeyRangeIdentities: ranges, - openConnectionHandler: null, + shouldOpenRntbdChannels: false, cancellationToken: cancellationToken)); } @@ -116,16 +117,14 @@ public async Task OpenAsync( } /// - /// Invokes the gateway address cache and passes the deligate to be invoked from the same. + /// Invokes the gateway address cache to open the rntbd connections to the backend replicas. /// /// A string containing the name of the database. /// A string containing the container's link uri. - /// The transport client callback delegate to be invoked at a later point of time. /// An Instance of the . public async Task OpenConnectionsToAllReplicasAsync( string databaseName, string containerLinkUri, - Func openConnectionHandlerAsync, CancellationToken cancellationToken = default) { try @@ -180,7 +179,7 @@ await this.addressCacheByEndpoint[firstPreferredReadRegion] databaseName: databaseName, collection: collection, partitionKeyRangeIdentities: partitionKeyRangeIdentities, - openConnectionHandler: openConnectionHandlerAsync, + shouldOpenRntbdChannels: true, cancellationToken: cancellationToken); } @@ -197,6 +196,20 @@ await this.addressCacheByEndpoint[firstPreferredReadRegion] } } + /// + public void SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionsHandler) + { + this.openConnectionsHandler = openConnectionsHandler; + + // Sets the openConnectionsHandler for the existing address cache. + // For the new address caches added later, the openConnectionsHandler + // will be set through the constructor. + foreach (EndpointCache endpointCache in this.addressCacheByEndpoint.Values) + { + endpointCache.AddressCache.SetOpenConnectionsHandler(openConnectionsHandler); + } + } + public async Task ResolveAsync( DocumentServiceRequest request, bool forceRefresh, @@ -284,6 +297,7 @@ private EndpointCache GetOrAddEndpoint(Uri endpoint) this.tokenProvider, this.serviceConfigReader, this.httpClient, + this.openConnectionsHandler, enableTcpConnectionEndpointRediscovery: this.enableTcpConnectionEndpointRediscovery); string location = this.endpointManager.GetLocation(endpoint); diff --git a/Microsoft.Azure.Cosmos/src/Routing/IAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/IAddressCache.cs index e8a6ade3ba..35d10fa622 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/IAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/IAddressCache.cs @@ -29,5 +29,12 @@ Task TryGetAddressesAsync( ServiceIdentity serviceIdentity, bool forceRefreshPartitionAddresses, CancellationToken cancellationToken); + + /// + /// Sets the instance to a global readonly + /// field for invoking the open connection request at a later point of time. + /// + /// An instance of . + void SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionsHandler); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosHeaderTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosHeaderTests.cs index 95501d0b91..4bc35b105c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosHeaderTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosHeaderTests.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { using System; using System.Collections.Generic; + using System.Linq; using System.Net; using System.Reflection; using System.Threading; @@ -102,13 +103,13 @@ public override async Task SendAsync(RequestMessage request, Ca private void ValidateLazyHeadersAreNotCreated(CosmosMessageHeadersInternal internalHeaders) { RequestNameValueCollection storeRequestHeaders = (RequestNameValueCollection)internalHeaders.INameValueCollection; - FieldInfo lazyHeaders = typeof(Documents.Collections.RequestNameValueCollection).GetField("lazyNotCommonHeaders", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic); - Lazy> lazyNotCommonHeaders = (Lazy>)lazyHeaders.GetValue(storeRequestHeaders); + FieldInfo fieldInfo = storeRequestHeaders.GetType().GetField("notCommonHeaders", BindingFlags.Instance | BindingFlags.NonPublic); + Dictionary notCommonHeaders = (Dictionary)fieldInfo.GetValue(storeRequestHeaders); // Use the if instead of Assert.IsFalse to avoid creating the dictionary in the error message - if (lazyNotCommonHeaders.IsValueCreated) + if (notCommonHeaders != null && notCommonHeaders.Any()) { - Assert.Fail($"The lazy dictionary should not be created. Please add the following headers to the {nameof(Documents.Collections.RequestNameValueCollection)}: {JsonConvert.SerializeObject(lazyNotCommonHeaders.Value)}"); + Assert.Fail($"The lazy dictionary should not be created. Please add the following headers to the {nameof(Documents.Collections.RequestNameValueCollection)}: {JsonConvert.SerializeObject(notCommonHeaders)}"); } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs index d90e23a397..720f37375c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs @@ -144,33 +144,10 @@ private static void ThrowTransportExceptionOnItemOperation( userPayload: true, payloadSent: false); - DocumentClientException documentClientException = new DocumentClientException( - message: "Exception", - innerException: transportException, - statusCode: System.Net.HttpStatusCode.Gone); IClientSideRequestStatistics requestStatistics = request.RequestContext.ClientRequestStatistics; requestStatistics.RecordResponse( request, - new StoreResult( - storeResponse: null, - exception: documentClientException, - partitionKeyRangeId: "PkRange", - lsn: 42, - quorumAckedLsn: 4242, - requestCharge: 9000.42, - currentReplicaSetSize: 3, - currentWriteQuorum: 4, - isValid: true, - storePhysicalAddress: physicalAddress, - globalCommittedLSN: 2, - numberOfReadRegions: 1, - itemLSN: 5, - sessionToken: null, - usingLocalLSN: true, - activityId: Guid.NewGuid().ToString(), - backendRequestDurationInMs: "0", - retryAfterInMs: "42", - transportRequestStats: new TransportRequestStats()), + StoreResult.CreateForTesting(transportRequestStats: new TransportRequestStats()).Target, DateTime.MinValue, DateTime.MaxValue); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml index f38fc77bb8..96c67772e6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml @@ -214,26 +214,7 @@ StoreResponseStatistics storeResponseStatistics = new StoreResponseStatistics( DateTime.MinValue, DateTime.MaxValue, - new Documents.StoreResult( - storeResponse: new StoreResponse(), - exception: null, - partitionKeyRangeId: 42.ToString(), - lsn: 1337, - quorumAckedLsn: 23, - requestCharge: 3.14, - currentReplicaSetSize: 4, - currentWriteQuorum: 3, - isValid: true, - storePhysicalAddress: new Uri("http://storephysicaladdress.com"), - globalCommittedLSN: 1234, - numberOfReadRegions: 13, - itemLSN: 15, - sessionToken: new SimpleSessionToken(42), - usingLocalLSN: true, - activityId: Guid.Empty.ToString(), - backendRequestDurationInMs: "4.2", - retryAfterInMs: "42", - transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()), + StoreResult.CreateForTesting(transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()).Target, ResourceType.Document, OperationType.Query, "42", @@ -357,7 +338,7 @@ "IsValid": true, "StorePhysicalAddress": "http://storephysicaladdress.com/", "RequestCharge": 3.14, - "RetryAfterInMs": "42", + "RetryAfterInMs": "9000", "BELatencyInMs": "4.2", "transportRequestTimeline": { "requestTimeline": [ @@ -439,26 +420,7 @@ StoreResponseStatistics storeResponseStatistics = new StoreResponseStatistics( requestStartTime: default, requestResponseTime: default, - new Documents.StoreResult( - storeResponse: new StoreResponse(), - exception: default, - partitionKeyRangeId: default, - lsn: default, - quorumAckedLsn: default, - requestCharge: default, - currentReplicaSetSize: default, - currentWriteQuorum: default, - isValid: default, - storePhysicalAddress: default, - globalCommittedLSN: default, - numberOfReadRegions: default, - itemLSN: default, - sessionToken: default, - usingLocalLSN: default, - activityId: default, - retryAfterInMs: default, - backendRequestDurationInMs: default, - transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()), + StoreResult.CreateForTesting(storeResponse: new StoreResponse()).Target, resourceType: default, operationType: default, requestSessionToken: default, @@ -567,55 +529,7 @@ "RequestCharge": 0, "RetryAfterInMs": null, "BELatencyInMs": null, - "transportRequestTimeline": { - "requestTimeline": [ - { - "event": "Created", - "startTimeUtc": "2021-12-31T23:59:59.059Z", - "durationInMs": 1 - }, - { - "event": "ChannelAcquisitionStarted", - "startTimeUtc": "2021-12-31T23:59:59.06Z", - "durationInMs": 0 - }, - { - "event": "Pipelined", - "startTimeUtc": "2021-12-31T23:59:59.06Z", - "durationInMs": 0 - }, - { - "event": "Transit Time", - "startTimeUtc": "2021-12-31T23:59:59.06Z", - "durationInMs": 0 - }, - { - "event": "Received", - "startTimeUtc": "2021-12-31T23:59:59.06Z", - "durationInMs": 0 - }, - { - "event": "Completed", - "startTimeUtc": "2021-12-31T23:59:59.06Z", - "durationInMs": 0 - } - ], - "serviceEndpointStats": { - "inflightRequests": 2, - "openConnections": 1 - }, - "connectionStats": { - "waitforConnectionInit": "True", - "callsPendingReceive": 1, - "lastSendAttempt": "2021-12-31T23:59:59.059Z", - "lastSend": "2021-12-31T23:59:59.059Z", - "lastReceive": "2021-12-31T23:59:59.059Z" - }, - "requestSizeInBytes": 2, - "requestBodySizeInBytes": 1, - "responseMetadataSizeInBytes": 1, - "responseBodySizeInBytes": 1 - }, + "transportRequestTimeline": null, "TransportException": null } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs index 7faeba2a35..a41f08afa1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs @@ -521,7 +521,6 @@ public Task UpdateAsync(IReadOnlyList addressCacheTokens, Can public Task OpenConnectionsToAllReplicasAsync( string databaseName, string containerLinkUri, - Func openConnectionHandlerAsync, CancellationToken cancellationToken = default) { throw new NotImplementedException(); @@ -531,6 +530,12 @@ public Task UpdateAsync(Documents.Rntbd.ServerKey serverKey, CancellationToken c { throw new NotImplementedException(); } + + public void SetOpenConnectionsHandler( + IOpenConnectionsHandler openConnectionHandler) + { + throw new NotImplementedException(); + } } private class MockTransportClient : TransportClient diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 46dbbc609e..3954b4ae8f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -81,6 +81,7 @@ public void TestGatewayAddressCacheAutoRefreshOnSuboptimalPartition() this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: null, suboptimalPartitionForceRefreshIntervalInSeconds: 2); int initialAddressesCount = cache.TryGetAddressesAsync( @@ -116,6 +117,7 @@ public async Task TestGatewayAddressCacheUpdateOnConnectionResetAsync() this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: null, suboptimalPartitionForceRefreshIntervalInSeconds: 2, enableTcpConnectionEndpointRediscovery: true); @@ -173,6 +175,7 @@ public async Task TestGatewayAddressCacheAvoidCacheRefresWhenAlreadyUpdatedAsync this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: null, suboptimalPartitionForceRefreshIntervalInSeconds: 2, enableTcpConnectionEndpointRediscovery: true); @@ -224,7 +227,6 @@ public async Task TestGatewayAddressCacheAvoidCacheRefresWhenAlreadyUpdatedAsync mockHttpHandler.VerifyAll(); } - [TestMethod] [Timeout(2000)] public void GlobalAddressResolverUpdateAsyncSynchronizationTest() @@ -287,6 +289,7 @@ public async Task GatewayAddressCacheInNetworkRequestTestAsync() this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: null, suboptimalPartitionForceRefreshIntervalInSeconds: 2, enableTcpConnectionEndpointRediscovery: true); @@ -323,15 +326,15 @@ public async Task GatewayAddressCacheInNetworkRequestTestAsync() /// /// Test to validate that when is called with a - /// valid open connection handler callback delegate, the delegate method is indeed invoked. + /// valid open connection handler, the handler method is indeed invoked. /// [TestMethod] [Owner("dkunda")] - public async Task OpenConnectionsAsync_WithValidOpenConnectionHandlerDelegate_ShouldInvokeDelegateMethod() + public async Task OpenConnectionsAsync_WithValidOpenConnectionHandler_ShouldInvokeHandlerMethod() { // Arrange. FakeMessageHandler messageHandler = new (); - FakeTransportClient transportClient = new (shouldFailTransport: false); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet()); ContainerProperties containerProperties = ContainerProperties.CreateWithResourceId("ccZ1ANCszwk="); containerProperties.Id = "TestId"; containerProperties.PartitionKeyPath = "/pk"; @@ -346,6 +349,7 @@ public async Task OpenConnectionsAsync_WithValidOpenConnectionHandlerDelegate_Sh this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: fakeOpenConnectionHandler, suboptimalPartitionForceRefreshIntervalInSeconds: 2); // Act. @@ -356,26 +360,30 @@ await cache.OpenConnectionsAsync( { this.testPartitionKeyRangeIdentity }, - openConnectionHandler: transportClient.OpenConnectionAsync, + shouldOpenRntbdChannels: true, cancellationToken: CancellationToken.None); // Assert. - Assert.AreEqual(0, transportClient.GetExceptionCount()); - Assert.AreEqual(3, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: 3, + expectedSuccessCount: 3); } /// /// Test to validate that when is invoked with a - /// open connection handler callback delegate that throws an exception, the delegate method is indeed invoked + /// open connection handler that throws an exception, the handler method is indeed invoked /// and the exception is handled in such a way that the cosmos client initialization does not fail. /// [TestMethod] [Owner("dkunda")] - public async Task OpenConnectionsAsync_WhenConnectionHandlerDelegateThrowsException_ShouldNotFailInitialization() + public async Task OpenConnectionsAsync_WhenConnectionHandlerThrowsException_ShouldNotFailInitialization() { // Arrange. FakeMessageHandler messageHandler = new (); - FakeTransportClient transportClient = new (shouldFailTransport: true); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new(failingIndexes: new HashSet() { 0, 1, 2}); ContainerProperties containerProperties = ContainerProperties.CreateWithResourceId("ccZ1ANCszwk="); containerProperties.Id = "TestId"; containerProperties.PartitionKeyPath = "/pk"; @@ -387,6 +395,7 @@ public async Task OpenConnectionsAsync_WhenConnectionHandlerDelegateThrowsExcept this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: fakeOpenConnectionHandler, suboptimalPartitionForceRefreshIntervalInSeconds: 2); // Act. @@ -397,26 +406,30 @@ await cache.OpenConnectionsAsync( { this.testPartitionKeyRangeIdentity }, - openConnectionHandler: transportClient.OpenConnectionAsync, + shouldOpenRntbdChannels: true, cancellationToken: CancellationToken.None); // Assert. - Assert.AreEqual(3, transportClient.GetExceptionCount()); - Assert.AreEqual(0, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 3, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: 3, + expectedSuccessCount: 0); } /// /// Test to validate that when is invoked with a null - /// open connection handler callback delegate, the delegate is never invoked, thus no attempt to open connection + /// open connection handler, the handler method is never invoked, thus no attempt to open connections /// to the backend replica happens. /// [TestMethod] [Owner("dkunda")] - public async Task OpenConnectionsAsync_WithNullOpenConnectionHandlerDelegate_ShouldNotInvokeDelegateMethod() + public async Task OpenConnectionsAsync_WithNullOpenConnectionHandler_ShouldNotInvokeHandlerMethod() { // Arrange. FakeMessageHandler messageHandler = new (); - FakeTransportClient transportClient = new(shouldFailTransport: false); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet()); ContainerProperties containerProperties = ContainerProperties.CreateWithResourceId("ccZ1ANCszwk="); containerProperties.Id = "TestId"; containerProperties.PartitionKeyPath = "/pk"; @@ -431,6 +444,7 @@ public async Task OpenConnectionsAsync_WithNullOpenConnectionHandlerDelegate_Sho this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: null, suboptimalPartitionForceRefreshIntervalInSeconds: 2); // Act. @@ -441,25 +455,29 @@ await cache.OpenConnectionsAsync( { this.testPartitionKeyRangeIdentity }, - openConnectionHandler: null, + shouldOpenRntbdChannels: true, cancellationToken: CancellationToken.None); // Assert. - Assert.AreEqual(0, transportClient.GetExceptionCount()); - Assert.AreEqual(0, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 0, + expectedReceivedAddressesCount: 0, + expectedSuccessCount: 0); } /// /// Test to validate that when is called with a - /// valid open connection handler callback delegate, the delegate method is indeed invoked and an attempt is made to open + /// valid open connection handler, the handler method is indeed invoked and an attempt is made to open /// the connections to the backend replicas. /// [TestMethod] [Owner("dkunda")] - public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WithValidHandlerDelegate_ShouldOpenConnectionsToBackend() + public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WithValidHandler_ShouldOpenConnectionsToBackend() { // Arrange. - FakeTransportClient transportClient = new (shouldFailTransport: false); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet()); UserAgentContainer container = new (clientId: 0); FakeMessageHandler messageHandler = new (); AccountProperties databaseAccount = new (); @@ -509,29 +527,35 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WithVa connectionPolicy: connectionPolicy, httpClient: MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler))); + globalAddressResolver.SetOpenConnectionsHandler( + openConnectionsHandler: fakeOpenConnectionHandler); + // Act. await globalAddressResolver.OpenConnectionsToAllReplicasAsync( databaseName: "test-db", containerLinkUri: "https://test.uri.cosmos.com", - openConnectionHandlerAsync: transportClient.OpenConnectionAsync, CancellationToken.None); // Assert. - Assert.AreEqual(0, transportClient.GetExceptionCount()); - Assert.AreEqual(3, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: 3, + expectedSuccessCount: 3); } /// /// Test to validate that when is called with a - /// open connection handler callback delegate that throws an exception, the delegate method is indeed invoked and the - /// exception is handled in such a way that the cosmos client initialization does not fail. + /// open connection handler that throws an exception, the handler method is indeed invoked and the exception is handled + /// in such a way that the cosmos client initialization does not fail. /// [TestMethod] [Owner("dkunda")] public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenHandlerDelegateThrowsException_ShouldNotFailInitialization() { // Arrange. - FakeTransportClient transportClient = new(shouldFailTransport: true); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet() { 0, 2}); UserAgentContainer container = new(clientId: 0); FakeMessageHandler messageHandler = new(); AccountProperties databaseAccount = new(); @@ -581,16 +605,22 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenHa connectionPolicy: connectionPolicy, httpClient: MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler))); + globalAddressResolver.SetOpenConnectionsHandler( + openConnectionsHandler: fakeOpenConnectionHandler); + // Act. await globalAddressResolver.OpenConnectionsToAllReplicasAsync( databaseName: "test-db", containerLinkUri: "https://test.uri.cosmos.com", - openConnectionHandlerAsync: transportClient.OpenConnectionAsync, CancellationToken.None); // Assert. - Assert.AreEqual(3, transportClient.GetExceptionCount()); - Assert.AreEqual(0, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 2, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: 3, + expectedSuccessCount: 1); } /// @@ -603,7 +633,7 @@ await globalAddressResolver.OpenConnectionsToAllReplicasAsync( public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenInternalExceptionThrownApartFromTransportError_ShouldThrowException() { // Arrange. - FakeTransportClient transportClient = new(shouldFailTransport: false); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet()); UserAgentContainer container = new(clientId: 0); FakeMessageHandler messageHandler = new(); AccountProperties databaseAccount = new(); @@ -664,18 +694,24 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenIn connectionPolicy: connectionPolicy, httpClient: MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler))); + globalAddressResolver.SetOpenConnectionsHandler( + openConnectionsHandler: fakeOpenConnectionHandler); + // Act. Exception ex = await Assert.ThrowsExceptionAsync(() => globalAddressResolver.OpenConnectionsToAllReplicasAsync( databaseName: "test-db", containerLinkUri: "https://test.uri.cosmos.com", - openConnectionHandlerAsync: transportClient.OpenConnectionAsync, CancellationToken.None)); // Assert. Assert.IsNotNull(ex); Assert.AreEqual(exceptionMessage, ex.Message); - Assert.AreEqual(0, transportClient.GetExceptionCount()); - Assert.AreEqual(0, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 0, + expectedReceivedAddressesCount: 0, + expectedSuccessCount: 0); } /// @@ -688,7 +724,7 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenIn public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenNullCollectionReturned_ShouldThrowException() { // Arrange. - FakeTransportClient transportClient = new (shouldFailTransport: false); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet()); UserAgentContainer container = new (clientId: 0); FakeMessageHandler messageHandler = new (); AccountProperties databaseAccount = new (); @@ -734,33 +770,39 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenNu connectionPolicy: connectionPolicy, httpClient: MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler))); + globalAddressResolver.SetOpenConnectionsHandler( + openConnectionsHandler: fakeOpenConnectionHandler); + // Act. CosmosException ce = await Assert.ThrowsExceptionAsync(() => globalAddressResolver.OpenConnectionsToAllReplicasAsync( databaseName: "test-db", containerLinkUri: "https://test.uri.cosmos.com", - openConnectionHandlerAsync: transportClient.OpenConnectionAsync, CancellationToken.None)); // Assert. Assert.IsNotNull(ce); Assert.IsTrue(ce.Message.Contains("Could not resolve the collection")); - Assert.AreEqual(0, transportClient.GetExceptionCount()); - Assert.AreEqual(0, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 0, + expectedReceivedAddressesCount: 0, + expectedSuccessCount: 0); } /// /// Test to validate that when is called with a - /// valid open connection handler callback delegate and some of the address resolving fails with exception, - /// then the GatewayAddressCache should ignore the failed addresses and the delegate method is indeed invoked + /// valid open connection handler and some of the address resolving fails with exception, then the + /// GatewayAddressCache should ignore the failed addresses and the handler method is indeed invoked /// for all resolved addresses. /// [TestMethod] [Owner("dkunda")] - public async Task OpenConnectionsAsync_WhenSomeAddressResolvingFailsWithException_ShouldIgnoreExceptionsAndInvokeDelegateMethodForOtherAddresses() + public async Task OpenConnectionsAsync_WhenSomeAddressResolvingFailsWithException_ShouldIgnoreExceptionsAndInvokeHandlerMethodForOtherAddresses() { // Arrange. FakeMessageHandler messageHandler = new (); - FakeTransportClient transportClient = new (shouldFailTransport: false); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new (failingIndexes: new HashSet()); ContainerProperties containerProperties = ContainerProperties.CreateWithResourceId("ccZ1ANCszwk="); containerProperties.Id = "TestId"; containerProperties.PartitionKeyPath = "/pk"; @@ -810,6 +852,7 @@ public async Task OpenConnectionsAsync_WhenSomeAddressResolvingFailsWithExceptio this.mockTokenProvider.Object, this.mockServiceConfigReader.Object, mockHttpClient.Object, + openConnectionsHandler: fakeOpenConnectionHandler, suboptimalPartitionForceRefreshIntervalInSeconds: 2); // Act. @@ -817,12 +860,38 @@ await cache.OpenConnectionsAsync( databaseName: "test-database", collection: containerProperties, partitionKeyRangeIdentities: partitionKeyRangeIdentities, - openConnectionHandler: transportClient.OpenConnectionAsync, + shouldOpenRntbdChannels: true, cancellationToken: CancellationToken.None); // Assert. - Assert.AreEqual(0, transportClient.GetExceptionCount()); - Assert.AreEqual(addresses.Count, transportClient.GetSuccessfulInvocationCount()); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: addresses.Count, + expectedSuccessCount: addresses.Count); + } + + /// + /// Helper method to assert on the class attributes + /// to match with that of the expected ones. + /// + /// An instance of the . + /// The expected exception count for the test. + /// The expected method invocation count for the test. + /// The expected received addresses count for the test. + /// The expected successful messages count for the test. + private static void AssertOpenConnectionHandlerAttributes( + FakeOpenConnectionHandler fakeOpenConnectionHandler, + int expectedExceptionCount, + int expectedMethodInvocationCount, + int expectedReceivedAddressesCount, + int expectedSuccessCount) + { + Assert.AreEqual(expectedExceptionCount, fakeOpenConnectionHandler.GetExceptionCount()); + Assert.AreEqual(expectedMethodInvocationCount, fakeOpenConnectionHandler.GetMethodInvocationCount()); + Assert.AreEqual(expectedReceivedAddressesCount, fakeOpenConnectionHandler.GetReceivedAddressesCount()); + Assert.AreEqual(expectedSuccessCount, fakeOpenConnectionHandler.GetSuccessfulInvocationCount()); } private class FakeMessageHandler : HttpMessageHandler @@ -911,44 +980,111 @@ public override void Post(SendOrPostCallback d, object state) } } - public class FakeTransportClient + public class FakeOpenConnectionHandler : IOpenConnectionsHandler { private int exceptionCounter = 0; + private int methodInvocationCounter = 0; private int successInvocationCounter = 0; - private readonly bool shouldFailTransport; + private int totalReceivedAddressesCounter = 0; + private readonly HashSet failingIndexes; + private readonly bool useAttemptBasedFailingIndexs; + private readonly ManualResetEvent manualResetEvent; + private readonly Dictionary> failIndexesByAttempts; + + public FakeOpenConnectionHandler( + HashSet failingIndexes, + ManualResetEvent manualResetEvent = null) + { + this.failingIndexes = failingIndexes; + this.manualResetEvent = manualResetEvent; + } + + public FakeOpenConnectionHandler( + Dictionary> failIndexesByAttempts, + ManualResetEvent manualResetEvent = null) + { + this.useAttemptBasedFailingIndexs = true; + this.failIndexesByAttempts = failIndexesByAttempts; + this.manualResetEvent = manualResetEvent; + } + + public int GetSuccessfulInvocationCount() + { + return this.successInvocationCounter; + } + + public int GetExceptionCount() + { + return this.exceptionCounter; + } - public FakeTransportClient(bool shouldFailTransport) + public int GetReceivedAddressesCount() { - this.shouldFailTransport = shouldFailTransport; + return this.totalReceivedAddressesCounter; } - public Task OpenConnectionAsync(Uri physicalAddress) + public int GetMethodInvocationCount() { - if (this.shouldFailTransport) + return this.methodInvocationCounter; + } + + Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( + IReadOnlyList addresses) + { + this.totalReceivedAddressesCounter = addresses.Count; + for (int i = 0; i < addresses.Count; i++) { - this.exceptionCounter++; - throw new TransportException( - errorCode: TransportErrorCode.ConnectionBroken, - innerException: new Exception("Transport Error Occurred."), - activityId: Guid.NewGuid(), - requestUri: physicalAddress, - sourceDescription: "SourceDescription", - userPayload: true, - payloadSent: false); + if (this.useAttemptBasedFailingIndexs) + { + if (this.failIndexesByAttempts.ContainsKey(i) && this.failIndexesByAttempts[i].Contains(this.methodInvocationCounter)) + { + this.ExecuteFailureCondition( + addresses: addresses, + index: i); + } + else + { + this.ExecuteSuccessCondition( + addresses: addresses, + index: i); + } + } + else + { + if (this.failingIndexes.Contains(i)) + { + this.ExecuteFailureCondition( + addresses: addresses, + index: i); + } + else + { + this.ExecuteSuccessCondition( + addresses: addresses, + index: i); + } + } } - this.successInvocationCounter++; + this.methodInvocationCounter++; + this.manualResetEvent?.Set(); return Task.CompletedTask; } - public int GetSuccessfulInvocationCount() + private void ExecuteSuccessCondition( + IReadOnlyList addresses, + int index) { - return this.successInvocationCounter; + addresses[index].SetConnected(); + this.successInvocationCounter++; } - public int GetExceptionCount() + private void ExecuteFailureCondition( + IReadOnlyList addresses, + int index) { - return this.exceptionCounter; + addresses[index].SetUnhealthy(); + this.exceptionCounter++; } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs index 7251848ea7..b92ca3c804 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs @@ -541,7 +541,7 @@ public void StoreReaderBarrierTest() // reads always go to read quorum (2) replicas int replicaCountToRead = 2; - IList result = storeReader.ReadMultipleReplicaAsync( + IList> result = storeReader.ReadMultipleReplicaAsync( entity, false /*includePrimary*/, replicaCountToRead, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs index aac19174c9..2ec6e9db62 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs @@ -21,26 +21,7 @@ public class ClientSideRequestStatisticsTraceDatumTests private static readonly HttpRequestMessage request = new HttpRequestMessage(); private static readonly Uri uri = new Uri("http://someUri1.com"); private static readonly DocumentServiceRequest requestDsr = DocumentServiceRequest.Create(OperationType.Read, resourceType: ResourceType.Document, authorizationTokenType: AuthorizationTokenType.PrimaryMasterKey); - private static readonly StoreResult storeResult = new Documents.StoreResult( - storeResponse: new StoreResponse(), - exception: null, - partitionKeyRangeId: 42.ToString(), - lsn: 1337, - quorumAckedLsn: 23, - requestCharge: 3.14, - currentReplicaSetSize: 4, - currentWriteQuorum: 3, - isValid: true, - storePhysicalAddress: new Uri("http://storephysicaladdress.com"), - globalCommittedLSN: 1234, - numberOfReadRegions: 13, - itemLSN: 15, - sessionToken: new SimpleSessionToken(42), - usingLocalLSN: true, - activityId: Guid.Empty.ToString(), - backendRequestDurationInMs: "4.2", - retryAfterInMs: "42", - transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()); + private static readonly StoreResult storeResult = StoreResult.CreateForTesting(storeResponse: new StoreResponse()).Target; /// /// This test is needed because different parts of the SDK use the same ClientSideRequestStatisticsTraceDatum across multiple diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs index 3a883d2456..f747d35d22 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs @@ -100,31 +100,12 @@ public void ValidateStoreResultSerialization() ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()); trace.AddDatum(datumKey, datum); - StoreResult storeResult = new StoreResult( - storeResponse: new StoreResponse(), - exception: null, - partitionKeyRangeId: 42.ToString(), - lsn: 1337, - quorumAckedLsn: 23, - requestCharge: 3.14, - currentReplicaSetSize: 4, - currentWriteQuorum: 3, - isValid: true, - storePhysicalAddress: new Uri("http://storephysicaladdress.com"), - globalCommittedLSN: 1234, - numberOfReadRegions: 13, - itemLSN: 15, - sessionToken: new SimpleSessionToken(42), - usingLocalLSN: true, - activityId: Guid.Empty.ToString(), - backendRequestDurationInMs: "4.2", - retryAfterInMs: "42", - transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()); + ReferenceCountedDisposable storeResult = StoreResult.CreateForTesting(storeResponse: new StoreResponse()); StoreResponseStatistics storeResponseStatistics = new StoreResponseStatistics( DateTime.MinValue, DateTime.MaxValue, - storeResult, + storeResult.Target, ResourceType.Document, OperationType.Query, "42", @@ -139,11 +120,11 @@ public void ValidateStoreResultSerialization() List jsonPropertyNames = storeResultJObject.Properties().Select(p => p.Name).ToList(); storeResultProperties.Add("BELatencyInMs"); - storeResultProperties.Remove(nameof(storeResult.BackendRequestDurationInMs)); + storeResultProperties.Remove(nameof(storeResult.Target.BackendRequestDurationInMs)); storeResultProperties.Add("TransportException"); - storeResultProperties.Remove(nameof(storeResult.Exception)); + storeResultProperties.Remove(nameof(storeResult.Target.Exception)); storeResultProperties.Add("transportRequestTimeline"); - storeResultProperties.Remove(nameof(storeResult.TransportRequestStats)); + storeResultProperties.Remove(nameof(storeResult.Target.TransportRequestStats)); foreach (string key in jsonPropertyNames) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs index eace2eb9df..67bafdbf56 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs @@ -363,26 +363,7 @@ public void TraceData() StoreResponseStatistics storeResponseStatistics = new StoreResponseStatistics( DateTime.MinValue, DateTime.MaxValue, - new Documents.StoreResult( - storeResponse: new StoreResponse(), - exception: null, - partitionKeyRangeId: 42.ToString(), - lsn: 1337, - quorumAckedLsn: 23, - requestCharge: 3.14, - currentReplicaSetSize: 4, - currentWriteQuorum: 3, - isValid: true, - storePhysicalAddress: new Uri("http://storephysicaladdress.com"), - globalCommittedLSN: 1234, - numberOfReadRegions: 13, - itemLSN: 15, - sessionToken: new SimpleSessionToken(42), - usingLocalLSN: true, - activityId: Guid.Empty.ToString(), - backendRequestDurationInMs: "4.2", - retryAfterInMs: "42", - transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()), + StoreResult.CreateForTesting(transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()).Target, ResourceType.Document, OperationType.Query, "42", @@ -416,26 +397,7 @@ public void TraceData() StoreResponseStatistics storeResponseStatistics = new StoreResponseStatistics( requestStartTime: default, requestResponseTime: default, - new Documents.StoreResult( - storeResponse: new StoreResponse(), - exception: default, - partitionKeyRangeId: default, - lsn: default, - quorumAckedLsn: default, - requestCharge: default, - currentReplicaSetSize: default, - currentWriteQuorum: default, - isValid: default, - storePhysicalAddress: default, - globalCommittedLSN: default, - numberOfReadRegions: default, - itemLSN: default, - sessionToken: default, - usingLocalLSN: default, - activityId: default, - retryAfterInMs: default, - backendRequestDurationInMs: default, - transportRequestStats: TraceWriterBaselineTests.CreateTransportRequestStats()), + StoreResult.CreateForTesting(storeResponse: new StoreResponse()).Target, resourceType: default, operationType: default, requestSessionToken: default, From 9dde99e697eacc9c61b6272fb0ea3b761ca041d6 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Fri, 13 Jan 2023 01:45:47 +0530 Subject: [PATCH 039/164] [Preview] AI integration: Adds IsDistributedTracingEnabled flag as public API to enable/disable this feature (#3598) * make api public for preview * add null check * fix tests * singleton listener initialization * assign null to listeners * fix test * concurrent bag in listener * renamed to LatencyThresholdForDiagnosticEvent * renamed to IsDistributedTracingEnabled * updated xml * update contract * made latency threshold flag internal * fix test * regeneratebaselines * update documentation * rename builder api * add docs * updated contracts and all * doc update * import cleanup Co-authored-by: Sourabh Jain --- .../src/CosmosClientOptions.cs | 20 ++++- .../src/Fluent/CosmosClientBuilder.cs | 24 ++++- .../DistributedTracingOptions.cs | 9 +- .../Filters/DiagnosticsFilterHelper.cs | 4 +- .../OpenTelemetryRecorderFactory.cs | 11 +-- ...riterBaselineTests.BulkOperationsAsync.xml | 10 +-- ...neTests.PointOperationsExceptionsAsync.xml | 15 ++-- .../Tracing/AssertActivity.cs | 20 +++-- .../Tracing/CustomListener.cs | 10 +-- .../EndToEndTraceWriterBaselineTests.cs | 89 +++++++------------ .../Utils/TestCommon.cs | 11 ++- .../Utils/TransportClientHelper.cs | 19 ++-- .../Utils/Util.cs | 38 ++++++++ .../Contracts/DotNetPreviewSDKAPI.json | 36 ++++++++ .../CosmosClientOptionsUnitTests.cs | 8 +- .../Telemetry/DiagnosticsFilterHelperTest.cs | 8 +- 16 files changed, 213 insertions(+), 119 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs index 21df876c68..a75b508e3b 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs @@ -988,17 +988,29 @@ public override bool CanConvert(Type objectType) return objectType == typeof(DateTime); } } - + /// /// Distributed Tracing Options. /// + /// Applicable only when Operation level distributed tracing is enabled through internal DistributedTracingOptions DistributedTracingOptions { get; set; } /// - /// Gets or sets value indicating whether distributed tracing activities () are going to be created for the SDK methods calls and HTTP calls. - /// By default true for Preview package + /// Gets or sets the flag to generate operation level for methods calls using the Source Name "Azure.Cosmos.Operation". /// - internal bool EnableDistributedTracing { get; set; } + /// + /// The default value is true (for preview package). + /// + /// This flag is there to disable it from source. Please Refer https://opentelemetry.io/docs/instrumentation/net/exporters/ to know more about open telemetry exporters +#if PREVIEW + public +#else + internal +#endif + bool IsDistributedTracingEnabled { get; set; } +#if PREVIEW + = true; +#endif } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs index d47f168764..44c38ec51b 100644 --- a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs +++ b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs @@ -424,12 +424,30 @@ public CosmosClientBuilder WithConsistencyLevel(Cosmos.ConsistencyLevel consiste } /// - /// If Open Telemetry listener is subscribed for Azure.Cosmos namespace, There are you can leverage to control it.

+ /// Sets whether Distributed Tracing for "Azure.Cosmos.Operation" source is enabled. ///
- /// Tracing Options + /// Whether is enabled. /// The current . - internal CosmosClientBuilder WithDistributingTracing(DistributedTracingOptions options) +#if PREVIEW + public +#else + internal +#endif + CosmosClientBuilder WithDistributedTracing(bool isEnabled = true) + { + this.clientOptions.IsDistributedTracingEnabled = isEnabled; + return this; + } + + /// + /// Enables Distributed Tracing with a Configuration ref. + /// + /// . + /// The current .] + /// Refer https://opentelemetry.io/docs/instrumentation/net/exporters/ to know more about open telemetry exporters + internal CosmosClientBuilder WithDistributedTracingOptions(DistributedTracingOptions options) { + this.clientOptions.IsDistributedTracingEnabled = true; this.clientOptions.DistributedTracingOptions = options; return this; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs index 652b6b9e3f..6c44f06bf2 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/DistributedTracingOptions.cs @@ -7,8 +7,7 @@ namespace Microsoft.Azure.Cosmos using System; /// - /// Open Telemetry Configuration - /// It needs to be public once AppInsight is ready + /// Options for configuring the distributed tracing and event tracing /// internal sealed class DistributedTracingOptions { @@ -23,9 +22,9 @@ internal sealed class DistributedTracingOptions internal static readonly TimeSpan DefaultQueryTimeoutThreshold = TimeSpan.FromMilliseconds(500); /// - /// Latency Threshold to generate () with Request diagnostics in distributing Tracing.

- /// If it is not set then by default it will generate () for query operation which are taking more than 500 ms and non-query operations taking more than 100 ms. + /// SDK generates (Event Source Name is "Azure-Cosmos-Operation-Request-Diagnostics") with Request Diagnostics String, If Operation level distributed tracing is not disabled i.e. ///
- public TimeSpan? DiagnosticsLatencyThreshold { get; set; } + /// If it is not set then, by default, it will generate for query operation which are taking more than 500 ms and non-query operations taking more than 100 ms. + public TimeSpan? LatencyThresholdForDiagnosticEvent { get; set; } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs index e4db97bc3f..7649977fa0 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs @@ -22,9 +22,9 @@ public static bool IsTracingNeeded( { TimeSpan latencyThreshold; - if (config?.DiagnosticsLatencyThreshold != null) + if (config?.LatencyThresholdForDiagnosticEvent != null) { - latencyThreshold = config.DiagnosticsLatencyThreshold.Value; + latencyThreshold = config.LatencyThresholdForDiagnosticEvent.Value; } else { diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index 2cd6e3a481..6c88b3d5db 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -4,6 +4,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry { + using System; using global::Azure.Core.Pipeline; /// @@ -15,7 +16,7 @@ internal static class OpenTelemetryRecorderFactory /// Singleton to make sure we only have one instance of the DiagnosticScopeFactory and pattern matching of listener happens only once /// private static DiagnosticScopeFactory ScopeFactory { get; set; } - + public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, string containerName, string databaseName, @@ -23,11 +24,11 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, RequestOptions requestOptions, CosmosClientContext clientContext) { - if (clientContext is { ClientOptions.EnableDistributedTracing: true }) + if (clientContext is { ClientOptions.IsDistributedTracingEnabled: true }) { - ScopeFactory = new DiagnosticScopeFactory(clientNamespace: OpenTelemetryAttributeKeys.DiagnosticNamespace, - resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, - isActivityEnabled: true); + OpenTelemetryRecorderFactory.ScopeFactory ??= new DiagnosticScopeFactory(clientNamespace: OpenTelemetryAttributeKeys.DiagnosticNamespace, + resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, + isActivityEnabled: true); // If there is no source then it will return default otherwise a valid diagnostic scope DiagnosticScope scope = OpenTelemetryRecorderFactory diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index 6fd72499bb..e79fa6d301 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -1590,6 +1590,10 @@ maxRetryWaitTimeOnThrottledRequests: TimeSpan.FromSeconds(1), maxRetryAttemptsOnThrottledRequests: 3) .WithBulkExecution(true) + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) .WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( transportClient, (uri, resourceOperation, request) => TransportClientHelper.ReturnThrottledStoreResponseOnItemOperation( @@ -1599,12 +1603,6 @@ exceptionActivityId, errorMessage)))); - throttleClient.ClientOptions.EnableDistributedTracing = true; - throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; - ItemRequestOptions requestOptions = new ItemRequestOptions(); Container containerWithThrottleException = throttleClient.GetContainer( database.Id, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 7d6a68adca..2a3b1439ae 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -160,7 +160,12 @@ string errorMessage = "Mock throttle exception" + Guid.NewGuid().ToString(); Guid exceptionActivityId = Guid.NewGuid(); using CosmosClient throttleClient = TestCommon.CreateCosmosClient(builder => - builder.WithThrottlingRetryOptions( + builder + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) + .WithThrottlingRetryOptions( maxRetryWaitTimeOnThrottledRequests: TimeSpan.FromSeconds(1), maxRetryAttemptsOnThrottledRequests: 3) .WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( @@ -171,13 +176,7 @@ request, exceptionActivityId, errorMessage)))); - - throttleClient.ClientOptions.EnableDistributedTracing = true; - throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; - + ItemRequestOptions requestOptions = new ItemRequestOptions(); Container containerWithThrottleException = throttleClient.GetContainer( database.Id, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index b0c605839e..d19b330d98 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -1,4 +1,8 @@ -namespace Microsoft.Azure.Cosmos.Tracing +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tracing { using System.Collections.Generic; using System.Diagnostics; @@ -13,14 +17,16 @@ internal static class AssertActivity public static void IsValid(Activity activity) { Assert.IsTrue(activity.OperationName == activity.DisplayName); - Assert.IsNotNull(activity.GetTagItem("db.cosmosdb.connection_mode")); + + Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is emtpy for {activity.OperationName}"); + if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString()) { - Assert.AreEqual(ActivityKind.Internal, activity.Kind); + Assert.AreEqual(ActivityKind.Internal, activity.Kind, $" Actual Kind is {activity.Kind} but expected is {ActivityKind.Internal} for {activity.OperationName}"); } - else + else if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Direct.ToString()) { - Assert.AreEqual(ActivityKind.Client, activity.Kind); + Assert.AreEqual(ActivityKind.Client, activity.Kind, $" Actual Kind is {activity.Kind} but expected is {ActivityKind.Client} for {activity.OperationName}"); } IList expectedTags = new List @@ -73,8 +79,10 @@ private static void AssertDatabaseAndContainerName(string name, KeyValuePair exceptionsForContainerAttribute = new List { "Operation.CreateDatabaseAsync", + "Operation.CreateDatabaseIfNotExistsAsync", "Operation.ReadAsync", - "Operation.DeleteAsync" + "Operation.DeleteAsync", + "Operation.DeleteStreamAsync" }; if ((tag.Key == OpenTelemetryAttributeKeys.ContainerName && !exceptionsForContainerAttribute.Contains(name)) || diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index c46d8578b0..410843f3d2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Cosmos.Tests /// /// It is a custom listener for Activities and Event. It is used to validate the Activities generated by cosmosDb SDK. /// - public class CustomListener : + internal class CustomListener : EventListener, // Override Event Listener to capture Event source events IObserver>, // Override IObserver to capture Activity events IObserver, @@ -27,8 +27,8 @@ public class CustomListener : private readonly Func sourceNameFilter; private readonly string eventName; - private List subscriptions = new(); - private List Scopes { get; } = new(); + private ConcurrentBag subscriptions = new(); + private ConcurrentBag Scopes { get; } = new(); public static ConcurrentBag CollectedActivities { private set; get; } = new(); private static ConcurrentBag CollectedEvents { set; get; } = new(); @@ -75,7 +75,7 @@ public void OnNext(KeyValuePair value) string startSuffix = ".Start"; string stopSuffix = ".Stop"; string exceptionSuffix = ".Exception"; - + if (value.Key.EndsWith(startSuffix)) { string name = value.Key[..^startSuffix.Length]; @@ -181,7 +181,7 @@ public override void Dispose() return; } - List subscriptions; + ConcurrentBag subscriptions; lock (this.Scopes) { subscriptions = this.subscriptions; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index b91fc76b8b..22b4be1814 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -1,4 +1,8 @@ -namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing { using System; using System.Collections.Generic; @@ -19,10 +23,7 @@ using Microsoft.Azure.Cosmos.Tracing; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; - using OpenTelemetry; - using Telemetry; using static Microsoft.Azure.Cosmos.SDK.EmulatorTests.TransportClientHelper; - using OpenTelemetry.Trace; [VisualStudio.TestTools.UnitTesting.TestClass] [TestCategory("UpdateContract")] @@ -34,55 +35,35 @@ public sealed class EndToEndTraceWriterBaselineTests : BaselineTests builder - .WithBulkExecution(true)); + .WithBulkExecution(true) + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + })); // Set a small retry count to reduce test time miscCosmosClient = TestCommon.CreateCosmosClient(builder => builder - .AddCustomHandlers(requestHandler)); - - client.ClientOptions.EnableDistributedTracing = true; - bulkClient.ClientOptions.EnableDistributedTracing = true; - miscCosmosClient.ClientOptions.EnableDistributedTracing = true; - - client.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; - - bulkClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; + .AddCustomHandlers(requestHandler) + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + })); - miscCosmosClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; - EndToEndTraceWriterBaselineTests.database = await client.CreateDatabaseAsync( Guid.NewGuid().ToString(), cancellationToken: default); @@ -114,8 +95,7 @@ public static async Task ClassCleanupAsync() await EndToEndTraceWriterBaselineTests.database.DeleteStreamAsync(); } - oTelTracerProvider?.Dispose(); - testListener?.Dispose(); + Util.DisposeOpenTelemetryAndCustomListeners(); await Task.Delay(5000); } @@ -994,7 +974,12 @@ public async Task PointOperationsExceptionsAsync() string errorMessage = "Mock throttle exception" + Guid.NewGuid().ToString(); Guid exceptionActivityId = Guid.NewGuid(); using CosmosClient throttleClient = TestCommon.CreateCosmosClient(builder => - builder.WithThrottlingRetryOptions( + builder + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) + .WithThrottlingRetryOptions( maxRetryWaitTimeOnThrottledRequests: TimeSpan.FromSeconds(1), maxRetryAttemptsOnThrottledRequests: 3) .WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( @@ -1005,13 +990,7 @@ public async Task PointOperationsExceptionsAsync() request, exceptionActivityId, errorMessage)))); - - throttleClient.ClientOptions.EnableDistributedTracing = true; - throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; - + ItemRequestOptions requestOptions = new ItemRequestOptions(); Container containerWithThrottleException = throttleClient.GetContainer( database.Id, @@ -1284,6 +1263,10 @@ public async Task BulkOperationsAsync() maxRetryWaitTimeOnThrottledRequests: TimeSpan.FromSeconds(1), maxRetryAttemptsOnThrottledRequests: 3) .WithBulkExecution(true) + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) .WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( transportClient, (uri, resourceOperation, request) => TransportClientHelper.ReturnThrottledStoreResponseOnItemOperation( @@ -1293,12 +1276,6 @@ public async Task BulkOperationsAsync() exceptionActivityId, errorMessage)))); - throttleClient.ClientOptions.EnableDistributedTracing = true; - throttleClient.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(0) - }; - ItemRequestOptions requestOptions = new ItemRequestOptions(); Container containerWithThrottleException = throttleClient.GetContainer( database.Id, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs index 265e9542ef..8cfa5be33b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TestCommon.cs @@ -130,7 +130,8 @@ internal static CosmosClient CreateCosmosClient( internal static CosmosClient CreateCosmosClient( bool useGateway, - Action customizeClientBuilder = null) + Action customizeClientBuilder = null, + bool enableDistributingTracing = false) { CosmosClientBuilder cosmosClientBuilder = GetDefaultConfiguration(); @@ -140,6 +141,14 @@ internal static CosmosClient CreateCosmosClient( { cosmosClientBuilder.WithConnectionModeGateway(); } + + if(enableDistributingTracing) + { + cosmosClientBuilder.WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }); + } return cosmosClientBuilder.Build(); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TransportClientHelper.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TransportClientHelper.cs index d701c069c0..f34135b695 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TransportClientHelper.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/TransportClientHelper.cs @@ -81,21 +81,20 @@ internal static Container GetContainerWithIntercepter( builder.WithSessionContainer(sessionContainer); } + if (enableDistributingTracing) + { + builder.WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(.0001) + }); + } + builder.WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( transportClient, interceptor, interceptorWithStoreResult)); }); - - if(enableDistributingTracing) - { - clientWithIntercepter.ClientOptions.EnableDistributedTracing = true; - clientWithIntercepter.ClientOptions.DistributedTracingOptions = new DistributedTracingOptions() - { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(.0001) - }; - } - + return clientWithIntercepter.GetContainer(databaseId, containerId); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index 4533b2b562..bdb688673d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -14,10 +14,14 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Services.Management.Tests; using Microsoft.Azure.Cosmos.Telemetry; + using Microsoft.Azure.Cosmos.Tests; + using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Client; using Microsoft.Azure.Documents.Collections; using Microsoft.VisualStudio.TestTools.UnitTesting; + using OpenTelemetry; + using OpenTelemetry.Trace; internal enum DocumentClientType { @@ -533,6 +537,40 @@ internal static void DisableClientTelemetryEnvironmentVariables() Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, null); } + private static TracerProvider OTelTracerProvider; + private static CustomListener TestListener; + + internal static CustomListener ConfigureOpenTelemetryAndCustomListeners() + { + AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); + + // Open Telemetry Listener + Util.OTelTracerProvider = Sdk.CreateTracerProviderBuilder() + .AddCustomOtelExporter() // use any exporter here + .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*") // Right now, it will capture only "Azure.Cosmos.Operation" + .Build(); + + // Custom Listener + Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*", "Azure-Cosmos-Operation-Request-Diagnostics"); + + return Util.TestListener; + + } + + internal static void DisposeOpenTelemetryAndCustomListeners() + { + // Open Telemetry Listener + Util.OTelTracerProvider?.Dispose(); + + // Custom Listener + Util.TestListener?.Dispose(); + + Util.OTelTracerProvider = null; + Util.TestListener = null; + + AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", false); + } + /// /// Enables traces for local debugging /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index add1fce30e..c5bb91849b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -314,6 +314,31 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.CosmosClientOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "Boolean get_IsDistributedTracingEnabled()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_IsDistributedTracingEnabled();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean IsDistributedTracingEnabled": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean IsDistributedTracingEnabled;CanRead:True;CanWrite:True;Boolean get_IsDistributedTracingEnabled();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_IsDistributedTracingEnabled(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_IsDistributedTracingEnabled(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_IsDistributedTracingEnabled(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { @@ -336,6 +361,17 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithDistributedTracing(Boolean)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder WithDistributedTracing(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.Linq.CosmosLinqExtensions;System.Object;IsAbstract:True;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs index e39bb8d0f3..986b9cc997 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs @@ -159,9 +159,9 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() portReuseMode, enableTcpConnectionEndpointRediscovery) .WithApplicationPreferredRegions(preferredLocations) - .WithDistributingTracing(new DistributedTracingOptions + .WithDistributedTracingOptions(new DistributedTracingOptions { - DiagnosticsLatencyThreshold = TimeSpan.FromMilliseconds(100) + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(100) }); cosmosClient = cosmosClientBuilder.Build(new MockDocumentClient()); @@ -174,8 +174,8 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.AreEqual(portReuseMode, clientOptions.PortReuseMode); Assert.IsTrue(clientOptions.EnableTcpConnectionEndpointRediscovery); CollectionAssert.AreEqual(preferredLocations.ToArray(), clientOptions.ApplicationPreferredRegions.ToArray()); - Assert.AreEqual(TimeSpan.FromMilliseconds(100), clientOptions.DistributedTracingOptions.DiagnosticsLatencyThreshold); - Assert.IsFalse(clientOptions.EnableDistributedTracing); + Assert.AreEqual(TimeSpan.FromMilliseconds(100), clientOptions.DistributedTracingOptions.LatencyThresholdForDiagnosticEvent); + Assert.IsTrue(clientOptions.IsDistributedTracingEnabled); //Verify GetConnectionPolicy returns the correct values policy = clientOptions.GetConnectionPolicy(clientId: 0); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs index 98f4d62954..698b99524e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs @@ -38,7 +38,7 @@ public void CheckReturnFalseOnSuccessAndLowerLatencyThanConfiguredConfig() DistributedTracingOptions distributedTracingOptions = new DistributedTracingOptions { - DiagnosticsLatencyThreshold = this.rootTrace.Duration.Add(TimeSpan.FromSeconds(1)) + LatencyThresholdForDiagnosticEvent = this.rootTrace.Duration.Add(TimeSpan.FromSeconds(1)) }; OpenTelemetryAttributes response = new OpenTelemetryAttributes @@ -51,7 +51,7 @@ public void CheckReturnFalseOnSuccessAndLowerLatencyThanConfiguredConfig() DiagnosticsFilterHelper .IsTracingNeeded(distributedTracingOptions, OperationType.Read, response), $" Response time is {response.Diagnostics.GetClientElapsedTime().Milliseconds}ms " + - $"and Configured threshold value is {distributedTracingOptions.DiagnosticsLatencyThreshold.Value.Milliseconds}ms " + + $"and Configured threshold value is {distributedTracingOptions.LatencyThresholdForDiagnosticEvent.Value.Milliseconds}ms " + $"and Is response Success : {response.StatusCode.IsSuccess()}" ); } @@ -63,7 +63,7 @@ public void CheckReturnTrueOnFailedStatusCode() DistributedTracingOptions distributedTracingOptions = new DistributedTracingOptions { - DiagnosticsLatencyThreshold = this.rootTrace.Duration.Add(TimeSpan.FromSeconds(1)) + LatencyThresholdForDiagnosticEvent = this.rootTrace.Duration.Add(TimeSpan.FromSeconds(1)) }; OpenTelemetryAttributes response = new OpenTelemetryAttributes @@ -76,7 +76,7 @@ public void CheckReturnTrueOnFailedStatusCode() DiagnosticsFilterHelper .IsTracingNeeded(distributedTracingOptions, OperationType.Read, response), $" Response time is {response.Diagnostics.GetClientElapsedTime().Milliseconds}ms " + - $"and Configured threshold value is {distributedTracingOptions.DiagnosticsLatencyThreshold.Value.Milliseconds}ms " + + $"and Configured threshold value is {distributedTracingOptions.LatencyThresholdForDiagnosticEvent.Value.Milliseconds}ms " + $"and Is response Success : {response.StatusCode.IsSuccess()}"); } From 36d0e0f4f8e9919f2512d7520f6f159a9cec0825 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Fri, 13 Jan 2023 07:41:33 -0800 Subject: [PATCH 040/164] Change Feed Processor: Fixes behavior with StartTime on Local (#3645) * To UTC * Test --- .../ChangeFeedProcessorOptions.cs | 2 +- .../ChangeFeedProcessorBuilderTests.cs | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Configuration/ChangeFeedProcessorOptions.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Configuration/ChangeFeedProcessorOptions.cs index 81e38dde16..3c9223a02e 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Configuration/ChangeFeedProcessorOptions.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Configuration/ChangeFeedProcessorOptions.cs @@ -66,7 +66,7 @@ public DateTime? StartTime throw new ArgumentException("StartTime cannot have DateTimeKind.Unspecified", nameof(value)); } - this.startTime = value; + this.startTime = value.HasValue && value.Value.Kind == DateTimeKind.Local ? value.Value.ToUniversalTime() : value; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorBuilderTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorBuilderTests.cs index 939bfdec8c..ae44b20d71 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorBuilderTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/ChangeFeedProcessorBuilderTests.cs @@ -220,6 +220,41 @@ public void CanBuildWithInMemoryContainer() Assert.IsInstanceOfType(builder.Build(), typeof(ChangeFeedProcessor)); } + [TestMethod] + public void ConvertsToUTC() + { + DateTime localTime = DateTime.Now; + + Assert.AreEqual(DateTimeKind.Local, localTime.Kind); + + Action verifier = (DocumentServiceLeaseStoreManager leaseStoreManager, + Container leaseContainer, + string instanceName, + ChangeFeedLeaseOptions changeFeedLeaseOptions, + ChangeFeedProcessorOptions changeFeedProcessorOptions, + Container monitoredContainer) => + { + Assert.AreEqual(DateTimeKind.Utc, changeFeedProcessorOptions.StartTime.Value.Kind); + Assert.AreEqual(localTime.ToUniversalTime(), changeFeedProcessorOptions.StartTime.Value); + }; + + ChangeFeedProcessorBuilder builder = new ChangeFeedProcessorBuilder("workflowName", + ChangeFeedProcessorBuilderTests.GetMockedContainer(), + ChangeFeedProcessorBuilderTests.GetMockedProcessor(), + verifier); + + builder.WithLeaseContainer(ChangeFeedProcessorBuilderTests.GetMockedContainer()); + + builder.WithStartTime(localTime); + + Assert.IsInstanceOfType(builder.Build(), typeof(ChangeFeedProcessor)); + } + private static ContainerInternal GetMockedContainer(string containerName = null) { Mock mockedContainer = MockCosmosUtil.CreateMockContainer(containerName: containerName); From bdd059d1bf60af19442cbc4b879f093581d871a3 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Tue, 17 Jan 2023 20:42:26 +0530 Subject: [PATCH 041/164] [Internal] Client Telemetry: Refactors code to use base useragent string (#3653) --- Microsoft.Azure.Cosmos/src/DocumentClient.cs | 2 +- .../ClientTelemetryTests.cs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index 8aafec61fc..61e7c99665 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -1036,7 +1036,7 @@ private void InitializeClientTelemetry() this.clientTelemetry = ClientTelemetry.CreateAndStartBackgroundTelemetry( clientId: this.clientId, httpClient: this.httpClient, - userAgent: this.ConnectionPolicy.UserAgentContainer.UserAgent, + userAgent: this.ConnectionPolicy.UserAgentContainer.BaseUserAgent, connectionMode: this.ConnectionPolicy.ConnectionMode, authorizationTokenProvider: this.cosmosAuthorization, diagnosticsHelper: DiagnosticsHandlerHelper.Instance, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs index 961c5d25d1..737be92e05 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs @@ -974,6 +974,7 @@ private static void AssertAccountLevelInformation( Assert.IsNotNull(telemetryInfo.ProcessId); Assert.AreEqual(HashingExtension.ComputeHash(System.Diagnostics.Process.GetCurrentProcess().ProcessName), telemetryInfo.ProcessId); Assert.IsNotNull(telemetryInfo.UserAgent); + Assert.IsFalse(telemetryInfo.UserAgent.Contains("userAgentSuffix"), "Useragent should not have suffix appended"); // Useragent should not contain useragentsuffix as it can have PII Assert.IsNotNull(telemetryInfo.ConnectionMode); if(!string.IsNullOrEmpty(telemetryInfo.MachineId)) @@ -1090,7 +1091,8 @@ private async Task CreateClientAndContainer(ConnectionMode mode, } this.cosmosClientBuilder = this.cosmosClientBuilder - .WithHttpClientFactory(() => new HttpClient(handlerHelper)); + .WithHttpClientFactory(() => new HttpClient(handlerHelper)) + .WithApplicationName("userAgentSuffix"); this.cosmosClient = mode == ConnectionMode.Gateway ? this.cosmosClientBuilder.WithConnectionModeGateway().Build() From b3cf7dfb0a156d3e4fdfbb6a8832339d07241b8f Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 18 Jan 2023 00:24:51 +0530 Subject: [PATCH 042/164] [Internal] AI Integration: Refactors code to rename event name (#3648) * first draft * rename event name * updated xmls * update files --- .../OpenTelemetry/CosmosDbEventSource.cs | 14 +- ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 208 +++++++++--------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 44 ++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 20 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 ++--- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 14 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- .../Tracing/CustomListener.cs | 5 +- .../EndToEndTraceWriterBaselineTests.cs | 100 ++++----- 13 files changed, 257 insertions(+), 262 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs index af1115367f..091373b0de 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs @@ -40,7 +40,7 @@ public static void RecordDiagnosticsForRequests( operationType: operationType, response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning)) { - CosmosDbEventSource.Singleton.WriteWarningEvent(response.Diagnostics.ToString()); + CosmosDbEventSource.Singleton.LatencyOverThreshold(response.Diagnostics.ToString()); } } @@ -49,26 +49,20 @@ public static void RecordDiagnosticsForExceptions(CosmosDiagnostics diagnostics) { if (CosmosDbEventSource.IsEnabled(EventLevel.Error)) { - CosmosDbEventSource.Singleton.WriteErrorEvent(diagnostics.ToString()); + CosmosDbEventSource.Singleton.Exception(diagnostics.ToString()); } } [Event(1, Level = EventLevel.Error)] - private void WriteErrorEvent(string message) + private void Exception(string message) { this.WriteEvent(1, message); } [Event(2, Level = EventLevel.Warning)] - private void WriteWarningEvent(string message) + private void LatencyOverThreshold(string message) { this.WriteEvent(2, message); } - - [Event(3, Level = EventLevel.Informational)] - private void WriteInfoEvent(string message) - { - this.WriteEvent(3, message); - } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index a6683679f7..0bee1cd007 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -130,7 +130,7 @@ ] }]]> Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index e79fa6d301..b99e457c3b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -144,16 +144,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -302,16 +302,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -460,16 +460,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -618,16 +618,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -776,16 +776,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -934,16 +934,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1092,16 +1092,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1250,16 +1250,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1408,16 +1408,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1566,16 +1566,16 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1591,9 +1591,9 @@ maxRetryAttemptsOnThrottledRequests: 3) .WithBulkExecution(true) .WithDistributedTracingOptions(new DistributedTracingOptions() - { - LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) - }) + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) .WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( transportClient, (uri, resourceOperation, request) => TransportClientHelper.ReturnThrottledStoreResponseOnItemOperation( @@ -2287,7 +2287,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index c04d573153..1415343fc9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -957,11 +957,11 @@ Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1574,11 +1574,11 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2172,11 +2172,11 @@ Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2790,11 +2790,11 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3068,8 +3068,8 @@ }]]> Operation.Change Feed Estimator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index cd053b58e2..a6a935fe01 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -109,8 +109,8 @@ }]]> Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -209,8 +209,8 @@ }]]> Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 2a3b1439ae..c409236892 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -149,7 +149,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -161,10 +161,10 @@ Guid exceptionActivityId = Guid.NewGuid(); using CosmosClient throttleClient = TestCommon.CreateCosmosClient(builder => builder - .WithDistributedTracingOptions(new DistributedTracingOptions() - { - LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) - }) + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) .WithThrottlingRetryOptions( maxRetryWaitTimeOnThrottledRequests: TimeSpan.FromSeconds(1), maxRetryAttemptsOnThrottledRequests: 3) @@ -391,7 +391,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -616,7 +616,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -873,7 +873,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1194,7 +1194,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1348,7 +1348,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 21db429e27..ba77a115a1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -578,10 +578,10 @@ Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1184,10 +1184,10 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1771,10 +1771,10 @@ Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2378,10 +2378,10 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3052,10 +3052,10 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3648,10 +3648,10 @@ Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4264,10 +4264,10 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 070da7032d..be14de122e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -540,10 +540,10 @@ Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1108,10 +1108,10 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1657,10 +1657,10 @@ Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2226,10 +2226,10 @@ Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index dd99e1694b..5b8f8e29a0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -548,12 +548,12 @@ Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1113,7 +1113,7 @@ ] }]]> Operation.ReadManyItemsAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 6172446645..8f2ad00f94 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -90,7 +90,7 @@ ] }]]> Operation.CreateItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -179,7 +179,7 @@ ] }]]> Operation.ReadItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -276,7 +276,7 @@ ] }]]> Operation.ReplaceItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -368,7 +368,7 @@ ] }]]> Operation.DeleteItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index 2aeaf80b15..603fec2b24 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -110,7 +110,7 @@ ] }]]> Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -204,7 +204,7 @@ ] }]]> Operation.ReadItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -311,7 +311,7 @@ ] }]]> Operation.ReplaceItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -407,7 +407,7 @@ ] }]]> Operation.DeleteItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. +LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 410843f3d2..1f192bb086 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -160,10 +160,11 @@ protected override void OnEventWritten(EventWrittenEventArgs eventData) { StringBuilder builder = new StringBuilder(); builder.Append("") - .Append("Ideally, this should contain request diagnostics but request diagnostics is " + + .Append("").Append(eventData.EventName).Append("") + .Append("Ideally, this should contain request diagnostics but request diagnostics is " + "subject to change with each request as it contains few unique id. " + "So just putting this tag with this static text to make sure event is getting generated" + - " for each test.") + " for each test.") .Append(""); CustomListener.CollectedEvents.Add(builder.ToString()); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index 22b4be1814..bb46c0f3f3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -35,9 +35,9 @@ public sealed class EndToEndTraceWriterBaselineTests : BaselineTests builder .WithBulkExecution(true) .WithDistributedTracingOptions(new DistributedTracingOptions() - { + { LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) - })); + })); + // Set a small retry count to reduce test time miscCosmosClient = TestCommon.CreateCosmosClient(builder => builder @@ -63,7 +64,7 @@ public static async Task ClassInitAsync(TestContext context) { LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) })); - + EndToEndTraceWriterBaselineTests.database = await client.CreateDatabaseAsync( Guid.NewGuid().ToString(), cancellationToken: default); @@ -105,10 +106,9 @@ private static void AssertAndResetActivityInformation() AssertActivity.AreEqualAcrossListeners(); CustomOtelExporter.CollectedActivities = new(); - testListener.ResetAttributes(); + testListener?.ResetAttributes(); } - [TestMethod] public async Task ReadFeedAsync() { @@ -143,7 +143,7 @@ public async Task ReadFeedAsync() trace: traceForest, startLineNumber: startLineNumber, endLineNumber: endLineNumber, - oTelActivities: testListener.GetRecordedAttributes())); + oTelActivities: testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); @@ -174,7 +174,7 @@ public async Task ReadFeedAsync() trace: traceForest, startLineNumber: startLineNumber, endLineNumber: endLineNumber, - oTelActivities: testListener.GetRecordedAttributes())); + oTelActivities: testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -205,7 +205,7 @@ public async Task ReadFeedAsync() trace: traceForest, startLineNumber: startLineNumber, endLineNumber: endLineNumber, - oTelActivities: testListener.GetRecordedAttributes())); + oTelActivities: testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -231,7 +231,7 @@ public async Task ReadFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ReadFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("ReadFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -273,7 +273,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -305,7 +305,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -338,7 +338,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed Public API", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed Public API", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -371,7 +371,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -432,7 +432,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Change Feed Estimator", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Change Feed Estimator", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -468,7 +468,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -493,7 +493,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -519,7 +519,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -545,7 +545,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API Typed", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -574,7 +574,7 @@ public async Task QueryAsync() Documents.ServiceInteropWrapper.AssembliesExist = currentLazy; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query - Without ServiceInterop", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query - Without ServiceInterop", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -602,7 +602,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -630,7 +630,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API Typed with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API Typed with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -701,7 +701,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -719,7 +719,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -745,7 +745,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -787,7 +787,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -822,7 +822,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -840,7 +840,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -866,7 +866,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -911,7 +911,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -960,7 +960,7 @@ public async Task PointOperationsExceptionsAsync() } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Operation with Request Timeout", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Operation with Request Timeout", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -975,10 +975,10 @@ public async Task PointOperationsExceptionsAsync() Guid exceptionActivityId = Guid.NewGuid(); using CosmosClient throttleClient = TestCommon.CreateCosmosClient(builder => builder - .WithDistributedTracingOptions(new DistributedTracingOptions() - { - LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) - }) + .WithDistributedTracingOptions(new DistributedTracingOptions() + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) .WithThrottlingRetryOptions( maxRetryWaitTimeOnThrottledRequests: TimeSpan.FromSeconds(1), maxRetryAttemptsOnThrottledRequests: 3) @@ -1012,7 +1012,7 @@ public async Task PointOperationsExceptionsAsync() } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Operation With Throttle", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Operation With Throttle", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1143,7 +1143,7 @@ void interceptor(Uri uri, Documents.ResourceOperation operation, Documents.Docum } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Operation with Service Unavailable", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Point Operation with Service Unavailable", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1194,7 +1194,7 @@ public async Task BatchOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)response.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Batch Operation", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Batch Operation", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1244,7 +1244,7 @@ public async Task BulkOperationsAsync() foreach (ITrace trace in traces) { - inputs.Add(new Input("Bulk Operation", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Bulk Operation", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); } EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); @@ -1264,9 +1264,9 @@ public async Task BulkOperationsAsync() maxRetryAttemptsOnThrottledRequests: 3) .WithBulkExecution(true) .WithDistributedTracingOptions(new DistributedTracingOptions() - { - LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) - }) + { + LatencyThresholdForDiagnosticEvent = TimeSpan.FromMilliseconds(0) + }) .WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( transportClient, (uri, resourceOperation, request) => TransportClientHelper.ReturnThrottledStoreResponseOnItemOperation( @@ -1298,7 +1298,7 @@ public async Task BulkOperationsAsync() endLineNumber = GetLineNumber(); - inputs.Add(new Input("Bulk Operation With Throttle", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Bulk Operation With Throttle", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1330,7 +1330,7 @@ public async Task MiscellanousAsync() await databaseResponse.Database.DeleteAsync(); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1349,7 +1349,7 @@ public async Task MiscellanousAsync() await databaseResponse.Database.DeleteAsync(); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1390,7 +1390,7 @@ public async Task ReadManyAsync() } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Read Many Stream Api", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Read Many Stream Api", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1405,7 +1405,7 @@ public async Task ReadManyAsync() ITrace trace = ((CosmosTraceDiagnostics)feedResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Read Many Typed Api", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input("Read Many Typed Api", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } From 4b77519162968e8b7fe29c04ccdfa3dcb403888c Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Tue, 17 Jan 2023 14:17:22 -0800 Subject: [PATCH 043/164] Region Availability: Adds Poland Central Region For Public Usage (#3656) --- Directory.Build.props | 2 +- Microsoft.Azure.Cosmos/src/Regions.cs | 5 +++++ .../Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 658186357b..b163dedaac 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ 3.31.2 3.31.2 preview - 3.30.0 + 3.30.1 2.0.0 2.0.0 preview diff --git a/Microsoft.Azure.Cosmos/src/Regions.cs b/Microsoft.Azure.Cosmos/src/Regions.cs index f08bbf4c91..853bc48267 100644 --- a/Microsoft.Azure.Cosmos/src/Regions.cs +++ b/Microsoft.Azure.Cosmos/src/Regions.cs @@ -344,5 +344,10 @@ public static class Regions /// Name of the Azure China East 3 region in the Azure Cosmos DB service. ///
public const string ChinaEast3 = "China East 3"; + + /// + /// Name of the Azure Poland Central region in the Azure Cosmos DB service. + /// + public const string PolandCentral = "Poland Central"; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 4e18b8084b..70e4a5d780 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -6570,6 +6570,11 @@ "Attributes": [], "MethodInfo": "System.String NorwayWest;IsInitOnly:False;IsStatic:True;" }, + "System.String PolandCentral": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "System.String PolandCentral;IsInitOnly:False;IsStatic:True;" + }, "System.String QatarCentral": { "Type": "Field", "Attributes": [], From 171011567abbffac60cf1e61f9fa4bb7ad081ad6 Mon Sep 17 00:00:00 2001 From: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com> Date: Thu, 19 Jan 2023 20:02:16 +0530 Subject: [PATCH 044/164] Client Encryption: Adds validation code to check if the Key Vault URI provided in wrap metadata is a valid key identifier. (#3642) * Check if the key vault uri provided is a valid Kid * test fix. * update changelog and build props * Update Directory.Build.props * Update Microsoft.Azure.Cosmos.Encryption.csproj * Fixed preview version * Refactor * Update EncryptionDatabaseExtensions.cs --- Directory.Build.props | 5 +- .../changelog.md | 10 +++ .../src/EncryptionDatabaseExtensions.cs | 22 +++++++ .../Microsoft.Azure.Cosmos.Encryption.csproj | 4 +- .../tests/EmulatorTests/MdeEncryptionTests.cs | 63 +++++++++++++++++++ 5 files changed, 99 insertions(+), 5 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index b163dedaac..2891c05569 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,12 +1,11 @@ - 3.31.2 3.31.2 preview 3.30.1 - 2.0.0 - 2.0.0 + 2.0.1 + 2.0.1 preview 1.0.0-preview04 1.1.0-preview3 diff --git a/Microsoft.Azure.Cosmos.Encryption/changelog.md b/Microsoft.Azure.Cosmos.Encryption/changelog.md index e3274bce7e..a5e7101074 100644 --- a/Microsoft.Azure.Cosmos.Encryption/changelog.md +++ b/Microsoft.Azure.Cosmos.Encryption/changelog.md @@ -3,6 +3,16 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.1) - 2023-03-11 + +#### Added +- [#3642](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3642) Adds validation code to check if the Key Vault URI provided in wrap metadata is a valid key identifier. + +### [2.0.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.1-preview) - 2023-01-11 + +#### Added +- [#3642](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3642) Adds validation code to check if the Key Vault URI provided in wrap metadata is a valid key identifier. + ### [2.0.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.0) - 2022-06-28 #### Added diff --git a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs index 47a68b38ae..f867921946 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs +++ b/Microsoft.Azure.Cosmos.Encryption/src/EncryptionDatabaseExtensions.cs @@ -91,6 +91,17 @@ public static async Task CreateClientEncryptionKeyA + " Please refer to https://aka.ms/CosmosClientEncryption for more details."); } + if (string.Equals(encryptionCosmosClient.KeyEncryptionKeyResolverName, KeyEncryptionKeyResolverName.AzureKeyVault)) + { + // https://KEYVAULTNAME.vault.azure.net/keys/KEYNAME/KEYVERSION + string[] keyVaultUriSegments = new Uri(encryptionKeyWrapMetadata.Value).Segments; + + if (keyVaultUriSegments.Length != 4 || !string.Equals(keyVaultUriSegments[1], "keys/", StringComparison.InvariantCultureIgnoreCase)) + { + throw new ArgumentException($"Invalid Key Vault URI'{encryptionKeyWrapMetadata.Value}' passed. Pass the complete Azure keyvault key identifier. Please refer to https://aka.ms/CosmosClientEncryption for more details."); + } + } + KeyEncryptionKey keyEncryptionKey = KeyEncryptionKey.GetOrCreate( encryptionKeyWrapMetadata.Name, encryptionKeyWrapMetadata.Value, @@ -192,6 +203,17 @@ public static async Task RewrapClientEncryptionKeyA + " Please refer to https://aka.ms/CosmosClientEncryption for more details."); } + if (string.Equals(encryptionCosmosClient.KeyEncryptionKeyResolverName, KeyEncryptionKeyResolverName.AzureKeyVault)) + { + // https://KEYVAULTNAME.vault.azure.net/keys/KEYNAME/KEYVERSION + string[] keyVaultUriSegments = new Uri(newEncryptionKeyWrapMetadata.Value).Segments; + + if (keyVaultUriSegments.Length != 4 || !string.Equals(keyVaultUriSegments[1], "keys/", StringComparison.InvariantCultureIgnoreCase)) + { + throw new ArgumentException($"Invalid Key Vault URI'{newEncryptionKeyWrapMetadata.Value}' passed. Pass the complete Azure keyvault key identifier. Please refer to https://aka.ms/CosmosClientEncryption for more details."); + } + } + ClientEncryptionKeyProperties clientEncryptionKeyProperties = await clientEncryptionKey.ReadAsync(cancellationToken: cancellationToken); RequestOptions requestOptions = new RequestOptions diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index 6aa1f85932..9fe41b765f 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -28,11 +28,11 @@ - + - + diff --git a/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/MdeEncryptionTests.cs b/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/MdeEncryptionTests.cs index 6ab6d8c333..65efd425aa 100644 --- a/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/MdeEncryptionTests.cs +++ b/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/MdeEncryptionTests.cs @@ -296,6 +296,69 @@ await MdeEncryptionTests.CreateClientEncryptionKeyAsync( if (ex is CosmosException cosmosException) Assert.AreEqual(HttpStatusCode.Conflict, cosmosException.StatusCode); } + + cekId = "testAkvKid"; + CosmosClient client = TestCommon.CreateCosmosClient(); + TestKeyEncryptionKeyResolver testKeyEncryptionKeyResolver = new TestKeyEncryptionKeyResolver(); + + EncryptionKeyWrapMetadata metadata = MdeEncryptionTests.CreateEncryptionKeyWrapMetadata(KeyEncryptionKeyResolverName.AzureKeyVault, "key1", "https://testkeyvault.vault.azure.net/keys/testkey/12345678"); + + CosmosClient encryptionCosmosClient = client.WithEncryption( + testKeyEncryptionKeyResolver, + KeyEncryptionKeyResolverName.AzureKeyVault, + TimeSpan.Zero); + + Database database = await encryptionCosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()); + + ClientEncryptionKeyResponse clientEncrytionKeyResponse = await database.CreateClientEncryptionKeyAsync( + cekId, + DataEncryptionAlgorithm.AeadAes256CbcHmacSha256, + metadata); + + Assert.AreEqual(HttpStatusCode.Created, clientEncrytionKeyResponse.StatusCode); + + metadata = MdeEncryptionTests.CreateEncryptionKeyWrapMetadata(KeyEncryptionKeyResolverName.AzureKeyVault, "key1", "https://testkeyvault.vault.azure.net/keys/testkey/9101112"); + + clientEncrytionKeyResponse = await database.RewrapClientEncryptionKeyAsync( + cekId, + metadata); + + Assert.AreEqual(HttpStatusCode.OK, clientEncrytionKeyResponse.StatusCode); + + // complete key identifier not passed + metadata = MdeEncryptionTests.CreateEncryptionKeyWrapMetadata(KeyEncryptionKeyResolverName.AzureKeyVault, "key1", "https://testkeyvault.vault.azure.net/keys/testkey"); + + try + { + clientEncrytionKeyResponse = await database.CreateClientEncryptionKeyAsync( + cekId, + DataEncryptionAlgorithm.AeadAes256CbcHmacSha256, + metadata); + + Assert.Fail("Key creation should have failed."); + + } + catch(Exception ex) + { + Assert.AreEqual(true, ex.Message.Contains("Invalid Key Vault URI")); + } + + // rewrap old key with new key vault uri without complete key identifier + try + { + clientEncrytionKeyResponse = await database.RewrapClientEncryptionKeyAsync( + cekId, + metadata); + + Assert.Fail("Key rewrap should have failed."); + + } + catch (Exception ex) + { + Assert.AreEqual(true, ex.Message.Contains("Invalid Key Vault URI")); + } + + encryptionCosmosClient.Dispose(); } [TestMethod] From e383d83946bf7c9eddeb161cd577b18609e2ac19 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Thu, 19 Jan 2023 17:32:54 -0800 Subject: [PATCH 045/164] [Internal] Query: Adds Split Support for Ode (#3572) * Added tests to test different aspects of merge/split support with OptimisticDirectExecution pipeline. Tests check for gone exception handling, pipeline switching etc. * Added gone exception simulation tests. * Added new tests and improved test infra * Removed ParalleContEvocation test. Fixed comments * Removed CreateParallelCrossPartitionPipelineStateAsync() as it is not being used anymore * Removed while loop in CreateDocumentContainerAsync() * Fixed comments. * Updated ExecuteGoneExceptionOnODEPipeline() * Added type Assert for ExecuteGoneExceptionOnODEPipeline() * Replaced try-catch with if statement in MoveNextAsync() * Added delegate to access TryCreateCoreContextAsync() * Added check to confirm Ode pipeline is not called in fallback plan * Updated method name from OptimisticDirectExecutionContext() to TryCreateOptimisticDirectExecutionContext() * Using delegate instead of Func<>. * Ode fallback plan always calls Specialized pipeline * Using ServiceInterop/Gateway to get QueryPlan for Specialized Pipeline * Added new test to check handling of failing fallback pipeline * Code cleanup * Added logic for handling non ODE continuation tokens * Moved delegate away from member variables * Added tests for Merge case * Updated method names * Added checks for tryCatch * Updated SetCancellationToken() to use Try * Updated TryUnwrapContinuationToken() * Removed changes in FlakyDocumentContainer.cs * Removed unused imports * Updated comments * Fixed comments and cleaned up test code * Added CosmosElement null check in TryUnwrapContinuationToken() * Removed FlakyDocumentContainer.cs from pull request * Removed unused imports * Updated TryUnwrapContinuationToken() * Update MoveNextAsync() call in OptimisticDirectExecutionQueryBaselineTests.cs * Made MergeTestUtil.IsFailedFallbackPipelineTest a readonly property * Added IsPartitionSplitException() overload to take CosmosElement * Fixed bug regarding syntax error queries --- .../Query/Core/Monads/TryCatch{TResult}.cs | 32 + .../Pipeline/CosmosExceptionExtensions.cs | 28 + .../CosmosQueryExecutionContextFactory.cs | 339 ++++++++--- ...OrderByCrossPartitionQueryPipelineStage.cs | 4 +- ...imisticDirectExecutionContinuationToken.cs | 6 +- ...misticDirectExecutionQueryPipelineStage.cs | 316 ++++++---- ...egativeOptimisticDirectExecutionOutput.xml | 26 + ...ositiveOptimisticDirectExecutionOutput.xml | 26 + ...misticDirectExecutionQueryBaselineTests.cs | 553 +++++++++++------- 9 files changed, 929 insertions(+), 401 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosExceptionExtensions.cs diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Monads/TryCatch{TResult}.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Monads/TryCatch{TResult}.cs index 8d9c43b036..38d0f4d1fc 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Monads/TryCatch{TResult}.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Monads/TryCatch{TResult}.cs @@ -126,6 +126,38 @@ public async Task> TryAsync( return matchResult; } + public async ValueTask> TryAsync( + Func> onSuccess) + { + TryCatch matchResult; + if (this.Succeeded) + { + matchResult = TryCatch.FromResult(await onSuccess(this.either.FromRight(default))); + } + else + { + matchResult = TryCatch.FromException(this.either.FromLeft(default)); + } + + return matchResult; + } + + public TryCatch Try( + Func> onSuccess) + { + TryCatch matchResult; + if (this.Succeeded) + { + matchResult = onSuccess(this.either.FromRight(default)); + } + else + { + matchResult = TryCatch.FromException(this.either.FromLeft(default)); + } + + return matchResult; + } + public TryCatch Catch( Action onError) { diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosExceptionExtensions.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosExceptionExtensions.cs new file mode 100644 index 0000000000..dca1ef488d --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosExceptionExtensions.cs @@ -0,0 +1,28 @@ +// ------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +// ------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Query.Core.Pipeline +{ + using System; + + internal static class CosmosExceptionExtensions + { + public static bool IsPartitionSplitException(this Exception ex) + { + if (ex != null) + { + return IsPartitionSplitException(ex as CosmosException); + } + + return false; + } + + public static bool IsPartitionSplitException(this CosmosException ex) + { + return ex is CosmosException cosmosException + && (cosmosException.StatusCode == System.Net.HttpStatusCode.Gone) + && (cosmosException.SubStatusCode == (int)Documents.SubStatusCodes.PartitionKeyRangeGone); + } + } +} diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 36e14d78bd..371391386e 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -136,23 +136,24 @@ private static async Task> TryCreateCoreContextAsy cancellationToken); cosmosQueryContext.ContainerResourceId = containerQueryProperties.ResourceId; - Documents.PartitionKeyRange targetRange = await GetTargetRangeOptimisticDirectExecutionAsync( - inputParameters, - queryPlanFromContinuationToken, - cosmosQueryContext, - containerQueryProperties, + Documents.PartitionKeyRange targetRange = await TryGetTargetRangeOptimisticDirectExecutionAsync( + inputParameters, + queryPlanFromContinuationToken, + cosmosQueryContext, + containerQueryProperties, trace); - + if (targetRange != null) { - // Test code added to confirm the correct pipeline is being utilized - SetTestInjectionPipelineType(inputParameters, OptimisticDirectExecution); - - return OptimisticDirectExecutionContext( - documentContainer, - inputParameters, - targetRange, - cancellationToken); + return await TryCreateExecutionContextAsync( + documentContainer, + partitionedQueryExecutionInfo: null, + cosmosQueryContext, + containerQueryProperties, + inputParameters, + targetRange, + trace, + cancellationToken); } PartitionedQueryExecutionInfo partitionedQueryExecutionInfo; @@ -226,33 +227,12 @@ private static async Task> TryCreateCoreContextAsy } } - if (cosmosQueryContext.QueryClient.ByPassQueryParsing()) - { - // For non-Windows platforms(like Linux and OSX) in .NET Core SDK, we cannot use ServiceInterop, so need to bypass in that case. - // We are also now bypassing this for 32 bit host process running even on Windows as there are many 32 bit apps that will not work without this - partitionedQueryExecutionInfo = await QueryPlanRetriever.GetQueryPlanThroughGatewayAsync( - cosmosQueryContext, - inputParameters.SqlQuerySpec, - cosmosQueryContext.ResourceLink, - inputParameters.PartitionKey, - createQueryPipelineTrace, - cancellationToken); - } - else - { - Documents.PartitionKeyDefinition partitionKeyDefinition = GetPartitionKeyDefinition(inputParameters, containerQueryProperties); - - partitionedQueryExecutionInfo = await QueryPlanRetriever.GetQueryPlanWithServiceInteropAsync( - cosmosQueryContext.QueryClient, - inputParameters.SqlQuerySpec, - cosmosQueryContext.ResourceTypeEnum, - partitionKeyDefinition, - inputParameters.PartitionKey != null, - containerQueryProperties.GeospatialType, - cosmosQueryContext.UseSystemPrefix, - createQueryPipelineTrace, - cancellationToken); - } + partitionedQueryExecutionInfo = await GetPartitionedQueryExecutionInfoAsync( + cosmosQueryContext, + inputParameters, + containerQueryProperties, + createQueryPipelineTrace, + cancellationToken); } return await TryCreateFromPartitionedQueryExecutionInfoAsync( @@ -306,79 +286,187 @@ private static async Task> TryCreateFromPartitione TryCatch tryCreatePipelineStage; - Documents.PartitionKeyRange targetRange = await GetTargetRangeOptimisticDirectExecutionAsync( + Documents.PartitionKeyRange targetRange = await TryGetTargetRangeOptimisticDirectExecutionAsync( inputParameters, partitionedQueryExecutionInfo, cosmosQueryContext, - containerQueryProperties, + containerQueryProperties, trace); if (targetRange != null) { - SetTestInjectionPipelineType(inputParameters, OptimisticDirectExecution); - - tryCreatePipelineStage = CosmosQueryExecutionContextFactory.OptimisticDirectExecutionContext( + tryCreatePipelineStage = await TryCreateExecutionContextAsync( documentContainer, + partitionedQueryExecutionInfo, + cosmosQueryContext, + containerQueryProperties, inputParameters, targetRange, + trace, cancellationToken); - - return tryCreatePipelineStage; } - - if (createPassthroughQuery) + else { - SetTestInjectionPipelineType(inputParameters, Passthrough); + if (createPassthroughQuery) + { + SetTestInjectionPipelineType(inputParameters, Passthrough); - tryCreatePipelineStage = CosmosQueryExecutionContextFactory.TryCreatePassthroughQueryExecutionContext( - documentContainer, - inputParameters, - targetRanges, - cancellationToken); + tryCreatePipelineStage = CosmosQueryExecutionContextFactory.TryCreatePassthroughQueryExecutionContext( + documentContainer, + inputParameters, + targetRanges, + cancellationToken); + } + else + { + tryCreatePipelineStage = TryCreateSpecializedDocumentQueryExecutionContext(documentContainer, cosmosQueryContext, inputParameters, targetRanges, partitionedQueryExecutionInfo, cancellationToken); + } } - else + + return tryCreatePipelineStage; + } + + private static async Task> TryCreateExecutionContextAsync( + DocumentContainer documentContainer, + PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, + CosmosQueryContext cosmosQueryContext, + ContainerQueryProperties containerQueryProperties, + InputParameters inputParameters, + Documents.PartitionKeyRange targetRange, + ITrace trace, + CancellationToken cancellationToken) + { + // Test code added to confirm the correct pipeline is being utilized + SetTestInjectionPipelineType(inputParameters, OptimisticDirectExecution); + + TryCatch tryCreatePipelineStage = CosmosQueryExecutionContextFactory.TryCreateOptimisticDirectExecutionContext( + documentContainer, + cosmosQueryContext, + containerQueryProperties, + inputParameters, + targetRange, + cancellationToken); + + // A malformed continuation token exception would happen for 2 reasons here + // 1. the token is actually malformed + // 2. Its a non Ode continuation token + // In both cases, Ode pipeline delegates the work to the Specialized pipeline + // as Ode pipeline should not take over execution while some other pipeline is already handling it + if (tryCreatePipelineStage.Failed && tryCreatePipelineStage.InnerMostException is MalformedContinuationTokenException) { SetTestInjectionPipelineType(inputParameters, Specialized); - if (!string.IsNullOrEmpty(partitionedQueryExecutionInfo.QueryInfo.RewrittenQuery)) + if (partitionedQueryExecutionInfo != null) { - // We need pass down the rewritten query. - SqlQuerySpec rewrittenQuerySpec = new SqlQuerySpec() + List targetRanges = new List { - QueryText = partitionedQueryExecutionInfo.QueryInfo.RewrittenQuery, - Parameters = inputParameters.SqlQuerySpec.Parameters + targetRange }; - inputParameters = new InputParameters( - rewrittenQuerySpec, - inputParameters.InitialUserContinuationToken, - inputParameters.InitialFeedRange, - inputParameters.MaxConcurrency, - inputParameters.MaxItemCount, - inputParameters.MaxBufferedItemCount, - inputParameters.PartitionKey, - inputParameters.Properties, - inputParameters.PartitionedQueryExecutionInfo, - inputParameters.ExecutionEnvironment, - inputParameters.ReturnResultsInDeterministicOrder, - inputParameters.ForcePassthrough, - inputParameters.TestInjections); + tryCreatePipelineStage = TryCreateSpecializedDocumentQueryExecutionContext( + documentContainer, + cosmosQueryContext, + inputParameters, + targetRanges, + partitionedQueryExecutionInfo, + cancellationToken); + } + else + { + tryCreatePipelineStage = await TryCreateSpecializedDocumentQueryExecutionContextAsync( + documentContainer, + cosmosQueryContext, + containerQueryProperties, + inputParameters, + trace, + cancellationToken); } - - tryCreatePipelineStage = CosmosQueryExecutionContextFactory.TryCreateSpecializedDocumentQueryExecutionContext( - documentContainer, - cosmosQueryContext, - inputParameters, - partitionedQueryExecutionInfo, - targetRanges, - cancellationToken); } return tryCreatePipelineStage; } - - private static TryCatch OptimisticDirectExecutionContext( + + private static TryCatch TryCreateSpecializedDocumentQueryExecutionContext( DocumentContainer documentContainer, + CosmosQueryContext cosmosQueryContext, + InputParameters inputParameters, + List targetRanges, + PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, + CancellationToken cancellationToken) + { + SetTestInjectionPipelineType(inputParameters, Specialized); + + if (!string.IsNullOrEmpty(partitionedQueryExecutionInfo.QueryInfo.RewrittenQuery)) + { + // We need pass down the rewritten query. + SqlQuerySpec rewrittenQuerySpec = new SqlQuerySpec() + { + QueryText = partitionedQueryExecutionInfo.QueryInfo.RewrittenQuery, + Parameters = inputParameters.SqlQuerySpec.Parameters + }; + + inputParameters = new InputParameters( + rewrittenQuerySpec, + inputParameters.InitialUserContinuationToken, + inputParameters.InitialFeedRange, + inputParameters.MaxConcurrency, + inputParameters.MaxItemCount, + inputParameters.MaxBufferedItemCount, + inputParameters.PartitionKey, + inputParameters.Properties, + inputParameters.PartitionedQueryExecutionInfo, + inputParameters.ExecutionEnvironment, + inputParameters.ReturnResultsInDeterministicOrder, + inputParameters.ForcePassthrough, + inputParameters.TestInjections); + } + + return CosmosQueryExecutionContextFactory.TryCreateSpecializedDocumentQueryExecutionContext( + documentContainer, + cosmosQueryContext, + inputParameters, + partitionedQueryExecutionInfo, + targetRanges, + cancellationToken); + } + + private static async Task> TryCreateSpecializedDocumentQueryExecutionContextAsync( + DocumentContainer documentContainer, + CosmosQueryContext cosmosQueryContext, + ContainerQueryProperties containerQueryProperties, + InputParameters inputParameters, + ITrace trace, + CancellationToken cancellationToken) + { + PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = await GetPartitionedQueryExecutionInfoAsync( + cosmosQueryContext, + inputParameters, + containerQueryProperties, + trace, + cancellationToken); + + List targetRanges = await CosmosQueryExecutionContextFactory.GetTargetPartitionKeyRangesAsync( + cosmosQueryContext.QueryClient, + cosmosQueryContext.ResourceLink, + partitionedQueryExecutionInfo, + containerQueryProperties, + inputParameters.Properties, + inputParameters.InitialFeedRange, + trace); + + return TryCreateSpecializedDocumentQueryExecutionContext( + documentContainer, + cosmosQueryContext, + inputParameters, + targetRanges, + partitionedQueryExecutionInfo, + cancellationToken); + } + + private static TryCatch TryCreateOptimisticDirectExecutionContext( + DocumentContainer documentContainer, + CosmosQueryContext cosmosQueryContext, + ContainerQueryProperties containerQueryProperties, InputParameters inputParameters, Documents.PartitionKeyRange targetRange, CancellationToken cancellationToken) @@ -386,14 +474,26 @@ private static TryCatch OptimisticDirectExecutionContext( // Return a OptimisticDirectExecution context return OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( documentContainer: documentContainer, - sqlQuerySpec: inputParameters.SqlQuerySpec, + inputParameters: inputParameters, targetRange: new FeedRangeEpk(targetRange.ToRange()), queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: inputParameters.MaxItemCount), - partitionKey: inputParameters.PartitionKey, - continuationToken: inputParameters.InitialUserContinuationToken, + fallbackQueryPipelineStageFactory: (continuationToken) => + { + // In fallback scenario, the Specialized pipeline is always invoked + Task> tryCreateContext = + CosmosQueryExecutionContextFactory.TryCreateSpecializedDocumentQueryExecutionContextAsync( + documentContainer, + cosmosQueryContext, + containerQueryProperties, + inputParameters.WithContinuationToken(continuationToken), + NoOpTrace.Singleton, + default); + + return tryCreateContext; + }, cancellationToken: cancellationToken); } - + private static TryCatch TryCreatePassthroughQueryExecutionContext( DocumentContainer documentContainer, InputParameters inputParameters, @@ -478,6 +578,45 @@ private static TryCatch TryCreateSpecializedDocumentQueryEx requestCancellationToken: cancellationToken); } + private static async Task GetPartitionedQueryExecutionInfoAsync( + CosmosQueryContext cosmosQueryContext, + InputParameters inputParameters, + ContainerQueryProperties containerQueryProperties, + ITrace trace, + CancellationToken cancellationToken) + { + PartitionedQueryExecutionInfo partitionedQueryExecutionInfo; + if (cosmosQueryContext.QueryClient.ByPassQueryParsing()) + { + // For non-Windows platforms(like Linux and OSX) in .NET Core SDK, we cannot use ServiceInterop, so need to bypass in that case. + // We are also now bypassing this for 32 bit host process running even on Windows as there are many 32 bit apps that will not work without this + partitionedQueryExecutionInfo = await QueryPlanRetriever.GetQueryPlanThroughGatewayAsync( + cosmosQueryContext, + inputParameters.SqlQuerySpec, + cosmosQueryContext.ResourceLink, + inputParameters.PartitionKey, + trace, + cancellationToken); + } + else + { + Documents.PartitionKeyDefinition partitionKeyDefinition = GetPartitionKeyDefinition(inputParameters, containerQueryProperties); + + partitionedQueryExecutionInfo = await QueryPlanRetriever.GetQueryPlanWithServiceInteropAsync( + cosmosQueryContext.QueryClient, + inputParameters.SqlQuerySpec, + cosmosQueryContext.ResourceTypeEnum, + partitionKeyDefinition, + inputParameters.PartitionKey != null, + containerQueryProperties.GeospatialType, + cosmosQueryContext.UseSystemPrefix, + trace, + cancellationToken); + } + + return partitionedQueryExecutionInfo; + } + /// /// Gets the list of partition key ranges. /// 1. Check partition key range id @@ -606,7 +745,7 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP return partitionKeyDefinition; } - private static async Task GetTargetRangeOptimisticDirectExecutionAsync( + private static async Task TryGetTargetRangeOptimisticDirectExecutionAsync( InputParameters inputParameters, PartitionedQueryExecutionInfo partitionedQueryExecutionInfo, CosmosQueryContext cosmosQueryContext, @@ -734,6 +873,24 @@ public InputParameters( public bool ReturnResultsInDeterministicOrder { get; } public TestInjections TestInjections { get; } public bool ForcePassthrough { get; } + + public InputParameters WithContinuationToken(CosmosElement token) + { + return new InputParameters( + this.SqlQuerySpec, + token, + this.InitialFeedRange, + this.MaxConcurrency, + this.MaxItemCount, + this.MaxBufferedItemCount, + this.PartitionKey, + this.Properties, + this.PartitionedQueryExecutionInfo, + this.ExecutionEnvironment, + this.ReturnResultsInDeterministicOrder, + this.ForcePassthrough, + this.TestInjections); + } } internal sealed class AggregateProjectionDetector diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs index bbd3d7be4e..10c3b0ee5e 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CrossPartition/OrderBy/OrderByCrossPartitionQueryPipelineStage.cs @@ -1153,9 +1153,7 @@ private static bool IsSplitException(Exception exception) exception = exception.InnerException; } - return exception is CosmosException cosmosException - && (cosmosException.StatusCode == HttpStatusCode.Gone) - && (cosmosException.SubStatusCode == (int)Documents.SubStatusCodes.PartitionKeyRangeGone); + return exception.IsPartitionSplitException(); } public void SetCancellationToken(CancellationToken cancellationToken) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionContinuationToken.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionContinuationToken.cs index c81c378029..59f87295f3 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionContinuationToken.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionContinuationToken.cs @@ -43,11 +43,11 @@ public static CosmosElement ToCosmosElement(OptimisticDirectExecutionContinuatio public static TryCatch TryCreateFromCosmosElement(CosmosElement cosmosElement) { CosmosObject cosmosObjectContinuationToken = cosmosElement as CosmosObject; - if (cosmosObjectContinuationToken == null) + if (cosmosObjectContinuationToken == null || !cosmosObjectContinuationToken.ContainsKey(OptimisticDirectExecutionToken)) { return TryCatch.FromException( - new MalformedChangeFeedContinuationTokenException( - message: $"Malformed Continuation Token")); + new MalformedContinuationTokenException( + message: $"Malformed Continuation Token: Expected OptimisticDirectExecutionToken\r\n")); } TryCatch inner = ParallelContinuationToken.TryCreateFromCosmosElement(cosmosObjectContinuationToken[OptimisticDirectExecutionToken]); diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs index 9f86b0ad8b..0664603024 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs @@ -12,168 +12,268 @@ namespace Microsoft.Azure.Cosmos.Query.Core.Pipeline.OptimisticDirectExecutionQu using System.Threading.Tasks; using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.Pagination; - using Microsoft.Azure.Cosmos.Query.Core.Exceptions; + using Microsoft.Azure.Cosmos.Query.Core.ExecutionContext; using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.Query.Core.Pipeline; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.Parallel; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.Pagination; using Microsoft.Azure.Cosmos.Tracing; - using static Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.PartitionMapper; internal sealed class OptimisticDirectExecutionQueryPipelineStage : IQueryPipelineStage { - private readonly QueryPartitionRangePageAsyncEnumerator queryPartitionRangePageAsyncEnumerator; - - private OptimisticDirectExecutionQueryPipelineStage( - QueryPartitionRangePageAsyncEnumerator queryPartitionRangePageAsyncEnumerator) + private enum ExecutionState { - this.queryPartitionRangePageAsyncEnumerator = queryPartitionRangePageAsyncEnumerator ?? throw new ArgumentNullException(nameof(queryPartitionRangePageAsyncEnumerator)); + OptimisticDirectExecution, + SpecializedDocumentQueryExecution, } - public TryCatch Current { get; private set; } + private const string optimisticDirectExecutionToken = "OptimisticDirectExecutionToken"; + private readonly FallbackQueryPipelineStageFactory queryPipelineStageFactory; + private TryCatch inner; + private CosmosElement continuationToken; + private ExecutionState executionState; - public ValueTask DisposeAsync() + private OptimisticDirectExecutionQueryPipelineStage(TryCatch inner, FallbackQueryPipelineStageFactory queryPipelineStageFactory, CosmosElement continuationToken) { - return this.queryPartitionRangePageAsyncEnumerator.DisposeAsync(); + this.inner = inner; + this.queryPipelineStageFactory = queryPipelineStageFactory; + this.continuationToken = continuationToken; + this.executionState = ExecutionState.OptimisticDirectExecution; } - public void SetCancellationToken(CancellationToken cancellationToken) + public delegate Task> FallbackQueryPipelineStageFactory(CosmosElement continuationToken); + + public TryCatch Current => this.inner.Try(pipelineStage => pipelineStage.Current); + + public ValueTask DisposeAsync() { - this.queryPartitionRangePageAsyncEnumerator.SetCancellationToken(cancellationToken); + return this.inner.Failed ? default : this.inner.Result.DisposeAsync(); } public async ValueTask MoveNextAsync(ITrace trace) { - if (trace == null) - { - throw new ArgumentNullException(nameof(trace)); - } + TryCatch hasNext = await this.inner.TryAsync(pipelineStage => pipelineStage.MoveNextAsync(trace)); + bool success = hasNext.Succeeded && hasNext.Result; + bool isPartitionSplitException = hasNext.Succeeded && this.Current.Failed && this.Current.InnerMostException.IsPartitionSplitException(); - if (!await this.queryPartitionRangePageAsyncEnumerator.MoveNextAsync(trace)) + if (success && !isPartitionSplitException) { - this.Current = default; - return false; + this.continuationToken = this.Current.Succeeded ? this.Current.Result.State?.Value : null; } - - TryCatch partitionPage = this.queryPartitionRangePageAsyncEnumerator.Current; - if (partitionPage.Failed) + else if (isPartitionSplitException && this.executionState == ExecutionState.OptimisticDirectExecution) { - this.Current = partitionPage; - return true; + this.inner = await this.queryPipelineStageFactory(this.TryUnwrapContinuationToken()); + this.executionState = ExecutionState.SpecializedDocumentQueryExecution; + if (this.inner.Failed) + { + return false; + } + + success = await this.inner.Result.MoveNextAsync(trace); } - QueryPage backendQueryPage = partitionPage.Result; + return success; + } - QueryState queryState; - if (backendQueryPage.State == null) - { - queryState = null; - } - else + public void SetCancellationToken(CancellationToken cancellationToken) + { + this.inner.Try(pipelineStage => pipelineStage.SetCancellationToken(cancellationToken)); + } + + private CosmosElement TryUnwrapContinuationToken() + { + if (this.continuationToken != null) { - QueryState backendQueryState = backendQueryPage.State; - ParallelContinuationToken parallelContinuationToken = new ParallelContinuationToken( - token: (backendQueryState?.Value as CosmosString)?.Value, - range: ((FeedRangeEpk)this.queryPartitionRangePageAsyncEnumerator.FeedRangeState.FeedRange).Range); - - OptimisticDirectExecutionContinuationToken optimisticDirectExecutionContinuationToken = new OptimisticDirectExecutionContinuationToken(parallelContinuationToken); - CosmosElement cosmosElementContinuationToken = OptimisticDirectExecutionContinuationToken.ToCosmosElement(optimisticDirectExecutionContinuationToken); - queryState = new QueryState(cosmosElementContinuationToken); + CosmosObject cosmosObject = this.continuationToken as CosmosObject; + CosmosElement backendContinuationToken = cosmosObject[optimisticDirectExecutionToken]; + Debug.Assert(backendContinuationToken != null); + return CosmosArray.Create(backendContinuationToken); } - QueryPage queryPage = new QueryPage( - backendQueryPage.Documents, - backendQueryPage.RequestCharge, - backendQueryPage.ActivityId, - backendQueryPage.ResponseLengthInBytes, - backendQueryPage.CosmosQueryExecutionInfo, - disallowContinuationTokenMessage: null, - backendQueryPage.AdditionalHeaders, - queryState); - - this.Current = TryCatch.FromResult(queryPage); - return true; + return null; } public static TryCatch MonadicCreate( - IDocumentContainer documentContainer, - SqlQuerySpec sqlQuerySpec, - FeedRangeEpk targetRange, - Cosmos.PartitionKey? partitionKey, - QueryPaginationOptions queryPaginationOptions, - CosmosElement continuationToken, - CancellationToken cancellationToken) + DocumentContainer documentContainer, + CosmosQueryExecutionContextFactory.InputParameters inputParameters, + FeedRangeEpk targetRange, + QueryPaginationOptions queryPaginationOptions, + FallbackQueryPipelineStageFactory fallbackQueryPipelineStageFactory, + CancellationToken cancellationToken) { - if (targetRange == null) + TryCatch pipelineStage = OptimisticDirectExecutionQueryPipelineImpl.MonadicCreate( + documentContainer: documentContainer, + sqlQuerySpec: inputParameters.SqlQuerySpec, + targetRange: targetRange, + queryPaginationOptions: queryPaginationOptions, + partitionKey: inputParameters.PartitionKey, + continuationToken: inputParameters.InitialUserContinuationToken, + cancellationToken: cancellationToken); + + if (pipelineStage.Failed) { - throw new ArgumentNullException(nameof(targetRange)); + return pipelineStage; } - - TryCatch> monadicExtractState; - if (continuationToken == null) + + OptimisticDirectExecutionQueryPipelineStage odePipelineStageMonadicCreate = new OptimisticDirectExecutionQueryPipelineStage(pipelineStage, fallbackQueryPipelineStageFactory, inputParameters.InitialUserContinuationToken); + return TryCatch.FromResult(odePipelineStageMonadicCreate); + } + + private class OptimisticDirectExecutionQueryPipelineImpl : IQueryPipelineStage + { + private readonly QueryPartitionRangePageAsyncEnumerator queryPartitionRangePageAsyncEnumerator; + + private OptimisticDirectExecutionQueryPipelineImpl( + QueryPartitionRangePageAsyncEnumerator queryPartitionRangePageAsyncEnumerator) { - FeedRangeState getState = new (targetRange, (QueryState)null); - monadicExtractState = TryCatch>.FromResult(getState); + this.queryPartitionRangePageAsyncEnumerator = queryPartitionRangePageAsyncEnumerator ?? throw new ArgumentNullException(nameof(queryPartitionRangePageAsyncEnumerator)); } - else + + public TryCatch Current { get; private set; } + + public ValueTask DisposeAsync() { - monadicExtractState = MonadicExtractState(continuationToken, targetRange); + return this.queryPartitionRangePageAsyncEnumerator.DisposeAsync(); } - - if (monadicExtractState.Failed) + + public void SetCancellationToken(CancellationToken cancellationToken) { - return TryCatch.FromException(monadicExtractState.Exception); + this.queryPartitionRangePageAsyncEnumerator.SetCancellationToken(cancellationToken); } - FeedRangeState feedRangeState = monadicExtractState.Result; + public async ValueTask MoveNextAsync(ITrace trace) + { + if (trace == null) + { + throw new ArgumentNullException(nameof(trace)); + } - QueryPartitionRangePageAsyncEnumerator partitionPageEnumerator = new QueryPartitionRangePageAsyncEnumerator( - documentContainer, - sqlQuerySpec, - feedRangeState, - partitionKey, - queryPaginationOptions, - cancellationToken); + if (!await this.queryPartitionRangePageAsyncEnumerator.MoveNextAsync(trace)) + { + this.Current = default; + return false; + } - OptimisticDirectExecutionQueryPipelineStage stage = new OptimisticDirectExecutionQueryPipelineStage(partitionPageEnumerator); - return TryCatch.FromResult(stage); - } + TryCatch partitionPage = this.queryPartitionRangePageAsyncEnumerator.Current; + if (partitionPage.Failed) + { + this.Current = TryCatch.FromException(partitionPage.Exception); + return true; + } - private static TryCatch> MonadicExtractState( - CosmosElement continuationToken, - FeedRangeEpk range) - { - if (continuationToken == null) - { - throw new ArgumentNullException(nameof(continuationToken)); + QueryPage backendQueryPage = partitionPage.Result; + + QueryState queryState; + if (backendQueryPage.State == null) + { + queryState = null; + } + else + { + QueryState backendQueryState = backendQueryPage.State; + ParallelContinuationToken parallelContinuationToken = new ParallelContinuationToken( + token: (backendQueryState?.Value as CosmosString)?.Value, + range: ((FeedRangeEpk)this.queryPartitionRangePageAsyncEnumerator.FeedRangeState.FeedRange).Range); + + OptimisticDirectExecutionContinuationToken optimisticDirectExecutionContinuationToken = new OptimisticDirectExecutionContinuationToken(parallelContinuationToken); + CosmosElement cosmosElementContinuationToken = OptimisticDirectExecutionContinuationToken.ToCosmosElement(optimisticDirectExecutionContinuationToken); + queryState = new QueryState(cosmosElementContinuationToken); + } + + QueryPage queryPage = new QueryPage( + backendQueryPage.Documents, + backendQueryPage.RequestCharge, + backendQueryPage.ActivityId, + backendQueryPage.ResponseLengthInBytes, + backendQueryPage.CosmosQueryExecutionInfo, + disallowContinuationTokenMessage: null, + backendQueryPage.AdditionalHeaders, + queryState); + + this.Current = TryCatch.FromResult(queryPage); + return true; } - TryCatch tryCreateContinuationToken = OptimisticDirectExecutionContinuationToken.TryCreateFromCosmosElement(continuationToken); - if (tryCreateContinuationToken.Failed) + public static TryCatch MonadicCreate( + IDocumentContainer documentContainer, + SqlQuerySpec sqlQuerySpec, + FeedRangeEpk targetRange, + Cosmos.PartitionKey? partitionKey, + QueryPaginationOptions queryPaginationOptions, + CosmosElement continuationToken, + CancellationToken cancellationToken) { - return TryCatch>.FromException(tryCreateContinuationToken.Exception); - } + if (targetRange == null) + { + throw new ArgumentNullException(nameof(targetRange)); + } - TryCatch> partitionMappingMonad = PartitionMapper.MonadicGetPartitionMapping( - range, - tryCreateContinuationToken.Result); + TryCatch> monadicExtractState; + if (continuationToken == null) + { + FeedRangeState getState = new (targetRange, (QueryState)null); + monadicExtractState = TryCatch>.FromResult(getState); + } + else + { + monadicExtractState = MonadicExtractState(continuationToken, targetRange); + } - if (partitionMappingMonad.Failed) + if (monadicExtractState.Failed) + { + return TryCatch.FromException(monadicExtractState.Exception); + } + + FeedRangeState feedRangeState = monadicExtractState.Result; + + QueryPartitionRangePageAsyncEnumerator partitionPageEnumerator = new QueryPartitionRangePageAsyncEnumerator( + documentContainer, + sqlQuerySpec, + feedRangeState, + partitionKey, + queryPaginationOptions, + cancellationToken); + + OptimisticDirectExecutionQueryPipelineImpl stage = new OptimisticDirectExecutionQueryPipelineImpl(partitionPageEnumerator); + return TryCatch.FromResult(stage); + } + + private static TryCatch> MonadicExtractState( + CosmosElement continuationToken, + FeedRangeEpk range) { - return TryCatch>.FromException( - partitionMappingMonad.Exception); + if (continuationToken == null) + { + throw new ArgumentNullException(nameof(continuationToken)); + } + + TryCatch tryCreateContinuationToken = OptimisticDirectExecutionContinuationToken.TryCreateFromCosmosElement(continuationToken); + if (tryCreateContinuationToken.Failed) + { + return TryCatch>.FromException(tryCreateContinuationToken.Exception); + } + + TryCatch> partitionMappingMonad = PartitionMapper.MonadicGetPartitionMapping( + range, + tryCreateContinuationToken.Result); + + if (partitionMappingMonad.Failed) + { + return TryCatch>.FromException( + partitionMappingMonad.Exception); + } + + PartitionMapper.PartitionMapping partitionMapping = partitionMappingMonad.Result; + + KeyValuePair kvpRange = new KeyValuePair( + partitionMapping.TargetMapping.Keys.First(), + partitionMapping.TargetMapping.Values.First()); + + FeedRangeState feedRangeState = new FeedRangeState(kvpRange.Key, kvpRange.Value?.Token != null ? new QueryState(CosmosString.Create(kvpRange.Value.Token.Token)) : null); + + return TryCatch>.FromResult(feedRangeState); } - - PartitionMapping partitionMapping = partitionMappingMonad.Result; - - KeyValuePair kvpRange = new KeyValuePair( - partitionMapping.TargetMapping.Keys.First(), - partitionMapping.TargetMapping.Values.First()); - - FeedRangeState feedRangeState = new FeedRangeState(kvpRange.Key, kvpRange.Value?.Token != null ? new QueryState(CosmosString.Create(kvpRange.Value.Token.Token)) : null); - - return TryCatch>.FromResult(feedRangeState); } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml index b56c470469..7a8259eefc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml @@ -38,4 +38,30 @@ false + + + Single Partition Key with Parallel continuation token + SELECT * FROM c + + /pk + + Hash + + + false + + + + + Single Partition Key with OrderBy continuation token + SELECT * FROM c ORDER BY c._ts + + /pk + + Hash + + + false + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml index 7d4f7ce18d..2482925bd8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml @@ -38,4 +38,30 @@ true + + + Single Partition Key and Value Field + SELECT * FROM c + + /pk + + Hash + + + true + + + + + Single Partition Key and Ode continuation token + SELECT * FROM c + + /pk + + Hash + + + true + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index f849a04913..6737a3d338 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -3,33 +3,31 @@ using System; using System.Collections.Generic; using System.Collections.ObjectModel; - using System.Xml; - using Microsoft.Azure.Documents; - using Microsoft.Azure.Documents.Routing; - using Microsoft.Azure.Cosmos.Query.Core; - using Microsoft.Azure.Cosmos.Test.BaselineTest; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using Newtonsoft.Json; - using Microsoft.Azure.Cosmos.Query.Core.QueryPlan; - using Microsoft.Azure.Cosmos.Query.Core.Monads; - using Microsoft.Azure.Cosmos.Query.Core.ExecutionContext; + using System.IO; + using System.Linq; + using System.Net; + using System.Threading; using System.Threading.Tasks; + using System.Xml; using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.Pagination; - using Microsoft.Azure.Cosmos.Tests.Pagination; - using Microsoft.Azure.Cosmos.Tracing; - using Microsoft.Azure.Cosmos.Query.Core.QueryClient; - using Moq; using Microsoft.Azure.Cosmos.Query; + using Microsoft.Azure.Cosmos.Query.Core; + using Microsoft.Azure.Cosmos.Query.Core.ExecutionContext; + using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.Query.Core.Pipeline; - using Microsoft.Azure.Cosmos.Routing; - using System.Threading; - using System.Linq; - using Microsoft.Azure.Cosmos.Query.Core.Pipeline.Pagination; - using System.IO; - using Microsoft.Azure.Cosmos.Query.Core.Pipeline.OptimisticDirectExecutionQuery; + using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.OrderBy; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.Parallel; - using Microsoft.IdentityModel.Tokens; + using Microsoft.Azure.Cosmos.Query.Core.Pipeline.Pagination; + using Microsoft.Azure.Cosmos.Query.Core.QueryClient; + using Microsoft.Azure.Cosmos.Query.Core.QueryPlan; + using Microsoft.Azure.Cosmos.Test.BaselineTest; + using Microsoft.Azure.Cosmos.Tests.Pagination; + using Microsoft.Azure.Cosmos.Tracing; + using Microsoft.Azure.Documents; + using Microsoft.Azure.Documents.Routing; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Newtonsoft.Json; [TestClass] public class OptimisticDirectExecutionQueryBaselineTests : BaselineTests @@ -38,6 +36,10 @@ public class OptimisticDirectExecutionQueryBaselineTests : BaselineTests testVariations = new List { CreateInput( @@ -60,6 +62,22 @@ public void PositiveOptimisticDirectExecutionOutput() expectedOptimisticDirectExecution: true, partitionKeyPath: @"/pk", partitionKeyValue: @"value"), + + CreateInput( + description: @"Single Partition Key and Value Field", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a", + continuationToken: null), + + CreateInput( + description: @"Single Partition Key and Ode continuation token", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a", + continuationToken: cosmosElementOdeContinuationToken), }; this.ExecuteTestSuite(testVariations); } @@ -68,6 +86,23 @@ public void PositiveOptimisticDirectExecutionOutput() [Owner("akotalwar")] public void NegativeOptimisticDirectExecutionOutput() { + ParallelContinuationToken parallelContinuationToken = new ParallelContinuationToken( + token: Guid.NewGuid().ToString(), + range: new Documents.Routing.Range("A", "B", true, false)); + + OrderByContinuationToken orderByContinuationToken = new OrderByContinuationToken( + parallelContinuationToken, + new List() { new OrderByItem(CosmosObject.Create(new Dictionary() { { "item", CosmosString.Create("asdf") } })) }, + rid: "43223532", + skipCount: 42, + filter: "filter"); + + CosmosElement cosmosElementOrderByContinuationToken = CosmosArray.Create( + new List() + { + OrderByContinuationToken.ToCosmosElement(orderByContinuationToken) + }); + List testVariations = new List { CreateInput( @@ -90,58 +125,67 @@ public void NegativeOptimisticDirectExecutionOutput() expectedOptimisticDirectExecution: false, partitionKeyPath: @"/pk", partitionKeyValue: null), + + CreateInput( + description: @"Single Partition Key with Parallel continuation token", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: false, + partitionKeyPath: @"/pk", + partitionKeyValue: "a", + continuationToken: CosmosArray.Create(new List() { ParallelContinuationToken.ToCosmosElement(parallelContinuationToken) })), + + CreateInput( + description: @"Single Partition Key with OrderBy continuation token", + query: "SELECT * FROM c ORDER BY c._ts", + expectedOptimisticDirectExecution: false, + partitionKeyPath: @"/pk", + partitionKeyValue: "a", + continuationToken: cosmosElementOrderByContinuationToken), }; this.ExecuteTestSuite(testVariations); } - + // This test confirms that TestInjection.EnableOptimisticDirectExection is set to false from default. // Check test "TestPipelineForDistributedQueryAsync" to understand why this is done [TestMethod] - public async Task TestDefaultTestInjectionSettings() + public async Task TestDefaultTestInjectionSettingsAsync() { TestInjections testInjection = new TestInjections(simulate429s: false, simulateEmptyPages: false); Assert.AreEqual(testInjection.EnableOptimisticDirectExecution, false); } - [TestMethod] - [Owner("akotalwar")] - public async Task TestMonadicCreateOdePipeline() - { - int numItems = 10; - bool multiPartition = false; - string query = "SELECT * FROM c"; - - // null continuation token - Assert.IsTrue(await TryMonadicCreate(numItems, multiPartition, query, targetRange: FeedRangeEpk.FullRange, continuationToken: null)); - - CosmosElement cosmosElementContinuationToken = CosmosElement.Parse( - "{\"OptimisticDirectExecutionToken\":{\"token\":\"{\\\"resourceId\\\":\\\"AQAAAMmFOw8LAAAAAAAAAA==\\\",\\\"skipCount\\\":1}\"," + - "\"range\":{\"min\":\"\",\"max\":\"FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF\"}}}"); - Range range = new Documents.Routing.Range("", "FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF", isMinInclusive: true, isMaxInclusive: false); - - // single continuation token - Assert.IsTrue(await TryMonadicCreate(numItems, multiPartition, query, targetRange: new FeedRangeEpk(range), continuationToken: cosmosElementContinuationToken)); - - //TODO: Add non Ode continuation token case - } - - // test checks that the pipeline can take a query to the backend and returns its associated document(s). + // test checks that the pipeline can take a query to the backend and returns its associated document(s). [TestMethod] public async Task TestPipelineForBackendDocumentsOnSinglePartitionAsync() { int numItems = 100; - string query = "SELECT VALUE COUNT(1) FROM c"; + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Single Partition Key and Value Field", + query: "SELECT VALUE COUNT(1) FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); + + QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: false); - IQueryPipelineStage queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); + IQueryPipelineStage queryPipelineStage = await GetOdePipelineAsync(input, inMemoryCollection, queryRequestOptions); int documentCountInSinglePartition = 0; while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) { + Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + TryCatch tryGetPage = queryPipelineStage.Current; tryGetPage.ThrowIfFailed(); documentCountInSinglePartition += Int32.Parse(tryGetPage.Result.Documents[0].ToString()); + + if (tryGetPage.Result.State == null) + { + break; + } } Assert.AreEqual(100, documentCountInSinglePartition); @@ -152,10 +196,17 @@ public async Task TestPipelineForBackendDocumentsOnSinglePartitionAsync() public async Task TestPipelineForContinuationTokenOnSinglePartitionAsync() { int numItems = 100; - int result = await this.CreateOptimisticPipelineAndDrainAsync( - numItems: numItems, - isMultiPartition: false, - query: "SELECT * FROM c", + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Single Partition Key and Value Field", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); + + int result = await this.GetPipelineAndDrainAsync( + input, + numItems: numItems, + isMultiPartition: false, expectedContinuationTokenCount: 10); Assert.AreEqual(numItems, result); @@ -165,9 +216,18 @@ public async Task TestPipelineForContinuationTokenOnSinglePartitionAsync() [TestMethod] public async Task TestPipelineForGoneExceptionOnSingleAndMultiplePartitionAsync() { - Assert.IsTrue(await ExecuteGoneExceptionOnOdePipeline(isMultiPartition: false)); + Assert.IsTrue(await ExecuteGoneExceptionOnODEPipeline(isMultiPartition: false)); + + Assert.IsTrue(await ExecuteGoneExceptionOnODEPipeline(isMultiPartition: true)); + } + + // test to check if failing fallback pipeline is handled properly + [TestMethod] + public async Task TestHandlingOfFailedFallbackPipelineOnSingleAndMultiplePartitionAsync() + { + Assert.IsTrue(await TestHandlingOfFailedFallbackPipeline(isMultiPartition: false)); - Assert.IsTrue(await ExecuteGoneExceptionOnOdePipeline(isMultiPartition: true)); + Assert.IsTrue(await TestHandlingOfFailedFallbackPipeline(isMultiPartition: true)); } // The reason we have the below test is to show the missing capabilities of the OptimisticDirectExecution pipeline. @@ -177,66 +237,126 @@ public async Task TestPipelineForGoneExceptionOnSingleAndMultiplePartitionAsync( public async Task TestPipelineForDistributedQueryAsync() { int numItems = 100; - int result = await this.CreateOptimisticPipelineAndDrainAsync( - numItems: numItems, - isMultiPartition: false, - query: "SELECT AVG(c) FROM c", + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Single Partition Key and Value Field", + query: "SELECT AVG(c) FROM c", + expectedOptimisticDirectExecution: false, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); + + int result = await this.GetPipelineAndDrainAsync( + input, + numItems: numItems, + isMultiPartition: false, expectedContinuationTokenCount: 0); //TODO: Add validation for actual value of average Assert.AreEqual(1, result); } - private static async Task TryMonadicCreate(int numItems, bool multiPartition, string query, FeedRangeEpk targetRange, CosmosElement continuationToken) + // Creates a gone exception after the first MoveNexyAsync() call. This allows for the pipeline to return some documents before failing + private static async Task ExecuteGoneExceptionOnODEPipeline(bool isMultiPartition) + { + int numItems = 100; + List documents = new List(); + QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); + (MergeTestUtil mergeTest, IQueryPipelineStage queryPipelineStage) = await CreateFallbackPipelineTestInfrastructure(numItems, isFailedFallbackPipelineTest: false, isMultiPartition, queryRequestOptions); + + while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) + { + if (mergeTest.MoveNextCounter == 1) + { + Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + } + else + { + Assert.AreNotEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + } + + TryCatch tryGetPage = queryPipelineStage.Current; + + if (tryGetPage.Failed) + { + // failure should never come till here. Should be handled before + Assert.Fail("Unexpected error. Gone Exception should not reach till here"); + } + + documents.AddRange(tryGetPage.Result.Documents); + } + + Assert.AreEqual(numItems, documents.Count); + return true; + } + + private static async Task TestHandlingOfFailedFallbackPipeline(bool isMultiPartition) { - DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition); + int numItems = 100; + List documents = new List(); + QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); + (MergeTestUtil mergeTest, IQueryPipelineStage queryPipelineStage) = await CreateFallbackPipelineTestInfrastructure(numItems, isFailedFallbackPipelineTest: true, isMultiPartition, queryRequestOptions); + + while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) + { + TryCatch tryGetPage = queryPipelineStage.Current; + if (tryGetPage.Failed) + { + if (mergeTest.MoveNextCounter == 3) + { + Assert.IsTrue(tryGetPage.InnerMostException.Message.Equals("Injected failure")); + Assert.AreNotEqual(numItems, documents.Count); + return true; + } + else + { + Assert.Fail("Fallback pipeline failure not handled correctly"); + return false; + } + } - TryCatch monadicQueryPipelineStage = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( - documentContainer: inMemoryCollection, - sqlQuerySpec: new SqlQuerySpec(query), - targetRange: targetRange, - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), - partitionKey: null, - cancellationToken: default, - continuationToken: continuationToken); + documents.AddRange(tryGetPage.Result.Documents); + } - return monadicQueryPipelineStage.Succeeded; + return false; } - private static async Task CreateOptimisticDirectExecutionPipelineStateAsync(DocumentContainer documentContainer, string query, CosmosElement continuationToken) + private static async Task<(MergeTestUtil, IQueryPipelineStage)> CreateFallbackPipelineTestInfrastructure(int numItems, bool isFailedFallbackPipelineTest, bool isMultiPartition, QueryRequestOptions queryRequestOptions) { - List targetRanges = await documentContainer.GetFeedRangesAsync( - trace: NoOpTrace.Singleton, - cancellationToken: default); + List documents = new List(); + MergeTestUtil mergeTest = new MergeTestUtil(isFailedFallbackPipelineTest); - // only one range is taken because Ode pipeline can only accept one range - FeedRangeEpk firstRange = targetRanges[0]; + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Single Partition Key and Value Field", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); - TryCatch monadicQueryPipelineStage = OptimisticDirectExecutionQueryPipelineStage.MonadicCreate( - documentContainer: documentContainer, - sqlQuerySpec: new SqlQuerySpec(query), - targetRange: firstRange, - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: 10), - partitionKey: null, - continuationToken: continuationToken, - cancellationToken: default); + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync( + numItems, + multiPartition: isMultiPartition, + failureConfigs: new FlakyDocumentContainer.FailureConfigs( + inject429s: false, + injectEmptyPages: false, + shouldReturnFailure: mergeTest.ShouldReturnFailure)); - Assert.IsTrue(monadicQueryPipelineStage.Succeeded); - IQueryPipelineStage queryPipelineStage = monadicQueryPipelineStage.Result; + IQueryPipelineStage queryPipelineStage = await GetOdePipelineAsync(input, inMemoryCollection, queryRequestOptions); - return queryPipelineStage; + return (mergeTest, queryPipelineStage); } - private async Task CreateOptimisticPipelineAndDrainAsync(int numItems, bool isMultiPartition, string query, int expectedContinuationTokenCount) + private async Task GetPipelineAndDrainAsync(OptimisticDirectExecutionTestInput input, int numItems, bool isMultiPartition, int expectedContinuationTokenCount) { + QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: isMultiPartition); - IQueryPipelineStage queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); - + IQueryPipelineStage queryPipelineStage = await GetOdePipelineAsync(input, inMemoryCollection, queryRequestOptions); + List documents = new List(); int continuationTokenCount = 0; while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) { + Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + TryCatch tryGetPage = queryPipelineStage.Current; tryGetPage.ThrowIfFailed(); @@ -248,7 +368,15 @@ private async Task CreateOptimisticPipelineAndDrainAsync(int numItems, bool } else { - queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: tryGetPage.Result.State.Value); + input = CreateInput( + description: input.Description, + query: input.Query, + expectedOptimisticDirectExecution: input.ExpectedOptimisticDirectExecution, + partitionKeyPath: @"/pk", + partitionKeyValue: input.PartitionKeyValue, + continuationToken: tryGetPage.Result.State.Value); + + queryPipelineStage = await GetOdePipelineAsync(input, inMemoryCollection, queryRequestOptions); } continuationTokenCount++; @@ -258,57 +386,34 @@ private async Task CreateOptimisticPipelineAndDrainAsync(int numItems, bool return documents.Count; } - // it creates a gone exception after the first MoveNexyAsync() call. This allows for the pipeline to return some documents before failing - // TODO: With the addition of the merge/split support, this queryPipelineStage should be able to return all documents regardless of a gone exception happening - private static async Task ExecuteGoneExceptionOnOdePipeline(bool isMultiPartition) + internal static PartitionedQueryExecutionInfo GetPartitionedQueryExecutionInfo(string querySpecJsonString, PartitionKeyDefinition pkDefinition) { - int numItems = 100; - string query = "SELECT * FROM c"; - List documents = new List(); - string goneExceptionMessage = $"Epk Range: Partition does not exist at the given range."; - CosmosException goneException = new CosmosException( - message: goneExceptionMessage, - statusCode: System.Net.HttpStatusCode.Gone, - subStatusCode: (int)SubStatusCodes.PartitionKeyRangeGone, - activityId: "0f8fad5b-d9cb-469f-a165-70867728950e", - requestCharge: default); - - int moveNextAsyncCounter = 0; - bool caughtGoneException = false; - DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync( - numItems, - multiPartition: isMultiPartition, - failureConfigs: new FlakyDocumentContainer.FailureConfigs( - inject429s: false, - injectEmptyPages: false, - shouldReturnFailure: () => Task.FromResult(moveNextAsyncCounter == 1 ? goneException : null))); - - IQueryPipelineStage queryPipelineStage = await CreateOptimisticDirectExecutionPipelineStateAsync(inMemoryCollection, query, continuationToken: null); - while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) - { - moveNextAsyncCounter++; - TryCatch tryGetPage = queryPipelineStage.Current; - - if (tryGetPage.Failed == true) - { - string errorRecieved = tryGetPage.Exception.InnerException.Message; - Assert.AreEqual(goneException.GetType(), tryGetPage.Exception.InnerException.GetType()); + TryCatch tryGetQueryPlan = QueryPartitionProviderTestInstance.Object.TryGetPartitionedQueryExecutionInfo( + querySpecJsonString: querySpecJsonString, + partitionKeyDefinition: pkDefinition, + requireFormattableOrderByQuery: true, + isContinuationExpected: true, + allowNonValueAggregateQuery: true, + hasLogicalPartitionKey: false, + allowDCount: true, + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); - if (errorRecieved.Equals(goneExceptionMessage)) - { - caughtGoneException = true; - break; - } - } + return tryGetQueryPlan.Result; + } - documents.AddRange(tryGetPage.Result.Documents); - } + private static async Task GetOdePipelineAsync(OptimisticDirectExecutionTestInput input, DocumentContainer documentContainer, QueryRequestOptions queryRequestOptions) + { + (CosmosQueryExecutionContextFactory.InputParameters inputParameters, CosmosQueryContextCore cosmosQueryContextCore) = CreateInputParamsAndQueryContext(input, queryRequestOptions); - // Once fallback plan is implemented, this test should be able to return all 100 documents - Assert.AreEqual(10, documents.Count); - Assert.IsTrue(caughtGoneException); + IQueryPipelineStage queryPipelineStage = CosmosQueryExecutionContextFactory.Create( + documentContainer, + cosmosQueryContextCore, + inputParameters, + NoOpTrace.Singleton); - return true; + Assert.IsNotNull(queryPipelineStage); + return queryPipelineStage; } private static async Task CreateDocumentContainerAsync( @@ -335,7 +440,7 @@ private static async Task CreateDocumentContainerAsync( DocumentContainer documentContainer = new DocumentContainer(monadicDocumentContainer); // a value of 2 would lead to 4 partitions (2 * 2). 4 partitions are used because they're easy to manage + demonstrates multi partition use case - int exponentPartitionKeyRanges = 2; + int exponentPartitionKeyRanges = 2; IReadOnlyList ranges; @@ -359,7 +464,7 @@ private static async Task CreateDocumentContainerAsync( ranges = await documentContainer.GetFeedRangesAsync( trace: NoOpTrace.Singleton, cancellationToken: default); - + int rangeCount = multiPartition ? 4 : 1; Assert.AreEqual(rangeCount, ranges.Count); @@ -367,7 +472,7 @@ private static async Task CreateDocumentContainerAsync( for (int i = 0; i < numItems; i++) { // Insert an item - CosmosObject item = CosmosObject.Parse($"{{\"pk\" : {i} }}"); + CosmosObject item = CosmosObject.Parse($"{{\"pk\" : \"a\" }}"); TryCatch monadicCreateRecord = await documentContainer.MonadicCreateItemAsync(item, cancellationToken: default); Assert.IsTrue(monadicCreateRecord.Succeeded); } @@ -400,52 +505,43 @@ private static OptimisticDirectExecutionTestInput CreateInput( return new OptimisticDirectExecutionTestInput(description, query, new SqlQuerySpec(query), expectedOptimisticDirectExecution, partitionKeyPath, partitionKeyValue, continuationToken); } - private static PartitionedQueryExecutionInfo GetPartitionedQueryExecutionInfo(string querySpecJsonString, PartitionKeyDefinition pkDefinition) - { - TryCatch tryGetQueryPlan = QueryPartitionProviderTestInstance.Object.TryGetPartitionedQueryExecutionInfo( - querySpecJsonString: querySpecJsonString, - partitionKeyDefinition: pkDefinition, - requireFormattableOrderByQuery: true, - isContinuationExpected: true, - allowNonValueAggregateQuery: true, - hasLogicalPartitionKey: false, - allowDCount: true, - useSystemPrefix: false, - geospatialType: Cosmos.GeospatialType.Geography); - - return tryGetQueryPlan.Result; - } - public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirectExecutionTestInput input) { // gets DocumentContainer IMonadicDocumentContainer monadicDocumentContainer = new InMemoryContainer(input.PartitionKeyDefinition); DocumentContainer documentContainer = new DocumentContainer(monadicDocumentContainer); - SqlQuerySpec sqlQuerySpec = new SqlQuerySpec(input.Query); + QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); - // gets query context - string databaseId = "db1234"; - string resourceLink = $"dbs/{databaseId}/colls"; - CosmosQueryContextCore cosmosQueryContextCore = new CosmosQueryContextCore( - client: new TestCosmosQueryClient(), - resourceTypeEnum: Documents.ResourceType.Document, - operationType: Documents.OperationType.Query, - resourceType: typeof(QueryResponseCore), - resourceLink: resourceLink, - isContinuationExpected: true, - allowNonValueAggregateQuery: true, - useSystemPrefix: false, - correlatedActivityId: Guid.NewGuid()); + (CosmosQueryExecutionContextFactory.InputParameters inputParameters, CosmosQueryContextCore cosmosQueryContextCore) = CreateInputParamsAndQueryContext(input, queryRequestOptions); - // gets input parameters - QueryRequestOptions queryRequestOptions = new QueryRequestOptions + IQueryPipelineStage queryPipelineStage = CosmosQueryExecutionContextFactory.Create( + documentContainer, + cosmosQueryContextCore, + inputParameters, + NoOpTrace.Singleton); + + bool result = queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton).AsTask().GetAwaiter().GetResult(); + + if (input.ExpectedOptimisticDirectExecution) { - TestSettings = new TestInjections(simulate429s: true, simulateEmptyPages: false, enableOptimisticDirectExecution: true, new TestInjections.ResponseStats()) - }; + Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + } + else + { + Assert.AreNotEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + } + + Assert.IsNotNull(queryPipelineStage); + Assert.IsTrue(result); + return new OptimisticDirectExecutionTestOutput(input.ExpectedOptimisticDirectExecution); + } + + private static Tuple CreateInputParamsAndQueryContext(OptimisticDirectExecutionTestInput input, QueryRequestOptions queryRequestOptions) + { CosmosSerializerCore serializerCore = new(); - using StreamReader streamReader = new(serializerCore.ToStreamSqlQuerySpec(sqlQuerySpec, Documents.ResourceType.Document)); + using StreamReader streamReader = new(serializerCore.ToStreamSqlQuerySpec(new SqlQuerySpec(input.Query), Documents.ResourceType.Document)); string sqlQuerySpecJsonString = streamReader.ReadToEnd(); PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = GetPartitionedQueryExecutionInfo(sqlQuerySpecJsonString, input.PartitionKeyDefinition); @@ -455,7 +551,7 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect } CosmosQueryExecutionContextFactory.InputParameters inputParameters = new CosmosQueryExecutionContextFactory.InputParameters( - sqlQuerySpec: sqlQuerySpec, + sqlQuerySpec: new SqlQuerySpec(input.Query), initialUserContinuationToken: input.ContinuationToken, initialFeedRange: null, maxConcurrency: queryRequestOptions.MaxConcurrency, @@ -466,30 +562,81 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect partitionedQueryExecutionInfo: partitionedQueryExecutionInfo, executionEnvironment: null, returnResultsInDeterministicOrder: null, - forcePassthrough: true, + forcePassthrough: false, testInjections: queryRequestOptions.TestSettings); - IQueryPipelineStage queryPipelineStage = CosmosQueryExecutionContextFactory.Create( - documentContainer, - cosmosQueryContextCore, - inputParameters, - NoOpTrace.Singleton); + string databaseId = "db1234"; + string resourceLink = $"dbs/{databaseId}/colls"; + CosmosQueryContextCore cosmosQueryContextCore = new CosmosQueryContextCore( + client: new TestCosmosQueryClient(), + resourceTypeEnum: Documents.ResourceType.Document, + operationType: Documents.OperationType.Query, + resourceType: typeof(QueryResponseCore), + resourceLink: resourceLink, + isContinuationExpected: true, + allowNonValueAggregateQuery: true, + useSystemPrefix: false, + correlatedActivityId: Guid.NewGuid()); - bool result = queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton).Result; + return Tuple.Create(inputParameters, cosmosQueryContextCore); + } - if (input.ExpectedOptimisticDirectExecution) + private static QueryRequestOptions GetQueryRequestOptions(bool enableOptimisticDirectExecution) + { + return new QueryRequestOptions { - Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + MaxConcurrency = 0, + MaxItemCount = 10, + TestSettings = new TestInjections(simulate429s: true, simulateEmptyPages: false, enableOptimisticDirectExecution: enableOptimisticDirectExecution, new TestInjections.ResponseStats()), + Properties = new Dictionary() + { + { HttpConstants.HttpHeaders.EnumerationDirection, ""}, } - else + }; + } + + private class MergeTestUtil + { + public int MoveNextCounter { get; private set; } + + public bool GoneExceptionCreated { get; private set; } + + public bool TooManyRequestsFailureCreated { get; private set; } + + public bool IsFailedFallbackPipelineTest { get; } + + public MergeTestUtil(bool isFailedFallbackPipelineTest) { - Assert.AreNotEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + this.IsFailedFallbackPipelineTest = isFailedFallbackPipelineTest; } - Assert.IsNotNull(queryPipelineStage); - Assert.IsTrue(result); + public async Task ShouldReturnFailure() + { + this.MoveNextCounter++; + if (this.MoveNextCounter == 2 && !this.GoneExceptionCreated) + { + this.GoneExceptionCreated = true; + return new CosmosException( + message: $"Epk Range: Partition does not exist at the given range.", + statusCode: System.Net.HttpStatusCode.Gone, + subStatusCode: (int)SubStatusCodes.PartitionKeyRangeGone, + activityId: "0f8fad5b-d9cb-469f-a165-70867728950e", + requestCharge: default); + } + + if (this.IsFailedFallbackPipelineTest && this.GoneExceptionCreated && !this.TooManyRequestsFailureCreated) + { + this.TooManyRequestsFailureCreated = true; + return new CosmosException( + message: "Injected failure", + statusCode: HttpStatusCode.TooManyRequests, + subStatusCode: 3200, + activityId: "111fad5b-d9cb-469f-a165-70867728950e", + requestCharge: 0); + } - return new OptimisticDirectExecutionTestOutput(input.ExpectedOptimisticDirectExecution); + return null; + } } } @@ -578,14 +725,14 @@ public override void SerializeAsXml(XmlWriter xmlWriter) } } } - + internal class TestCosmosQueryClient : CosmosQueryClient { public override Action OnExecuteScalarQueryCallback => throw new NotImplementedException(); public override bool ByPassQueryParsing() { - throw new NotImplementedException(); + return false; } public override void ClearSessionTokenCache(string collectionFullName) @@ -610,7 +757,11 @@ public override Task ForceRefreshCollectionCacheAsync(string collectionLink, Can public override Task GetCachedContainerQueryPropertiesAsync(string containerLink, Cosmos.PartitionKey? partitionKey, ITrace trace, CancellationToken cancellationToken) { - return Task.FromResult(new ContainerQueryProperties()); + return Task.FromResult(new ContainerQueryProperties( + "test", + WFConstants.BackendHeaders.EffectivePartitionKeyString, + new PartitionKeyDefinition(), + Cosmos.GeospatialType.Geometry)); } public override Task> GetTargetPartitionKeyRangeByFeedRangeAsync(string resourceLink, string collectionResourceId, PartitionKeyDefinition partitionKeyDefinition, FeedRangeInternal feedRangeInternal, bool forceRefresh, ITrace trace) @@ -630,7 +781,12 @@ public override Task> GetTargetPartitionKeyRangesAsync(s public override Task> GetTargetPartitionKeyRangesByEpkStringAsync(string resourceLink, string collectionResourceId, string effectivePartitionKeyString, bool forceRefresh, ITrace trace) { - throw new NotImplementedException(); + return Task.FromResult(new List{new PartitionKeyRange() + { + MinInclusive = PartitionKeyInternal.MinimumInclusiveEffectivePartitionKey, + MaxExclusive = PartitionKeyInternal.MaximumExclusiveEffectivePartitionKey + } + }); } public override Task> TryGetOverlappingRangesAsync(string collectionResourceId, Range range, bool forceRefresh = false) @@ -638,9 +794,14 @@ public override Task> TryGetOverlappingRangesAs throw new NotImplementedException(); } - public override Task> TryGetPartitionedQueryExecutionInfoAsync(SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) - { - throw new NotImplementedException(); + public override async Task> TryGetPartitionedQueryExecutionInfoAsync(SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) + { + CosmosSerializerCore serializerCore = new(); + using StreamReader streamReader = new(serializerCore.ToStreamSqlQuerySpec(sqlQuerySpec, Documents.ResourceType.Document)); + string sqlQuerySpecJsonString = streamReader.ReadToEnd(); + + PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = OptimisticDirectExecutionQueryBaselineTests.GetPartitionedQueryExecutionInfo(sqlQuerySpecJsonString, partitionKeyDefinition); + return TryCatch.FromResult(partitionedQueryExecutionInfo); } } } From ccaf8fb9dd8517295044e32f1af43b7d0437c64b Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Mon, 23 Jan 2023 20:58:16 +0530 Subject: [PATCH 046/164] [Internal] AI Integration : Fixes operation type for batch (#3660) * fix op type * fix conflict --- Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs | 2 +- .../EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs b/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs index e211117d6f..35aad1be10 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/BatchCore.cs @@ -222,7 +222,7 @@ public override Task ExecuteAsync( operationName: nameof(ExecuteAsync), containerName: this.container.Id, databaseName: this.container.Database.Id, - operationType: Documents.OperationType.Replace, + operationType: Documents.OperationType.Batch, requestOptions: requestOptions, task: (trace) => { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 0bee1cd007..59a5eabf76 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -129,7 +129,7 @@ } ] }]]> - Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeBatchdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. From c29abfedcbd98edf5ac49c9e58c3befc21dd9c3e Mon Sep 17 00:00:00 2001 From: aavasthy <113193425+aavasthy@users.noreply.github.com> Date: Tue, 24 Jan 2023 11:52:53 -0500 Subject: [PATCH 047/164] CosmosClientOptions: Adds ServerCertificateCustomValidationCallback for Http and TCP (#3636) * Adding ServerCertificateCustomValidationCallback in clientoptions * Adding Server callback for Http and fixing tests * Fixing failing E2Etests * Resolving merge conflicts * Running update contracts script * Running Update contracts script * Running Update contracts script * Reverting the v3 version change * Update based on review comments * Added unit tests * Added remarks for callback delegate * Ran update contracts script * Update based on review comments * Ran update contracts script * Updated unit tests * Making ssl validation function private * Updating test files * Update remarks for sslvalidation public contract * Added emulator tests for server validation Co-authored-by: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> --- .../src/ConnectionPolicy.cs | 13 +++++- .../src/CosmosClientOptions.cs | 15 +++++- Microsoft.Azure.Cosmos/src/DocumentClient.cs | 18 ++++++-- .../src/HttpClient/CosmosHttpClientCore.cs | 11 ++++- .../src/Resource/ClientContextCore.cs | 13 +++++- .../ClientTests.cs | 37 ++++++++++++++- .../Contracts/DotNetPreviewSDKAPI.json | 10 ++-- .../Contracts/DotNetSDKAPI.json | 19 ++++++++ .../CosmosClientResourceUnitTests.cs | 46 ++++++++++++++++++- 9 files changed, 164 insertions(+), 18 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs b/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs index dca46a883f..172aac4fbb 100644 --- a/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs @@ -8,6 +8,8 @@ namespace Microsoft.Azure.Cosmos using System.Collections.ObjectModel; using System.Collections.Specialized; using System.Net.Http; + using System.Net.Security; + using System.Security.Cryptography.X509Certificates; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Client; @@ -46,8 +48,8 @@ public ConnectionPolicy() this.MaxConnectionLimit = defaultMaxConcurrentConnectionLimit; this.RetryOptions = new RetryOptions(); this.EnableReadRequestsFallback = null; - this.EnableClientTelemetry = ClientTelemetryOptions.IsClientTelemetryEnabled(); + this.ServerCertificateCustomValidationCallback = null; } /// @@ -295,6 +297,15 @@ public bool EnablePartitionLevelFailover set; } + /// + /// Gets or sets the certificate validation callback. + /// + internal Func ServerCertificateCustomValidationCallback + { + get; + set; + } + /// /// Gets or sets the flag to enable writes on any locations (regions) for geo-replicated database accounts in the Azure Cosmos DB service. /// diff --git a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs index a75b508e3b..fec7f4ac2f 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs @@ -12,6 +12,8 @@ namespace Microsoft.Azure.Cosmos using System.Net; using System.Net.Http; using System.Net.Http.Headers; + using System.Net.Security; + using System.Security.Cryptography.X509Certificates; using Microsoft.Azure.Cosmos.Fluent; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Client; @@ -633,6 +635,16 @@ internal Protocol ConnectionProtocol /// internal Func TransportClientHandlerFactory { get; set; } + /// + /// A callback delegate to do custom certificate validation for both HTTP and TCP. + /// + /// + /// + /// Customizing SSL verification is not recommended in production environments. + /// + /// + public Func ServerCertificateCustomValidationCallback { get; set; } + /// /// API type for the account /// @@ -746,7 +758,8 @@ internal virtual ConnectionPolicy GetConnectionPolicy(int clientId) EnablePartitionLevelFailover = this.EnablePartitionLevelFailover, PortReuseMode = this.portReuseMode, EnableTcpConnectionEndpointRediscovery = this.EnableTcpConnectionEndpointRediscovery, - HttpClientFactory = this.httpClientFactory + HttpClientFactory = this.httpClientFactory, + ServerCertificateCustomValidationCallback = this.ServerCertificateCustomValidationCallback }; if (this.EnableClientTelemetry.HasValue) diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index 61e7c99665..c7504d312c 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -12,6 +12,7 @@ namespace Microsoft.Azure.Cosmos using System.Linq; using System.Net; using System.Net.Http; + using System.Net.Security; using System.Security; using System.Text; using System.Threading; @@ -163,6 +164,9 @@ internal partial class DocumentClient : IDisposable, IAuthorizationTokenProvider //Trace Id. private int traceId; + //RemoteCertificateValidationCallback + internal RemoteCertificateValidationCallback remoteCertificateValidationCallback; + //SessionContainer. internal ISessionContainer sessionContainer; @@ -421,6 +425,7 @@ internal DocumentClient(Uri serviceEndpoint, /// Factory that creates store clients sharing the same transport client to optimize network resource reuse across multiple document clients in the same process. /// Flag to allow Quorum Read with Eventual Consistency Account /// + /// This delegate responsible for validating the third party certificate. /// /// The service endpoint can be obtained from the Azure Management Portal. /// If you are connecting using one of the Master Keys, these can be obtained along with the endpoint from the Azure Management Portal @@ -446,7 +451,8 @@ internal DocumentClient(Uri serviceEndpoint, Func transportClientHandlerFactory = null, IStoreClientFactory storeClientFactory = null, bool isLocalQuorumConsistency = false, - string cosmosClientId = null) + string cosmosClientId = null, + RemoteCertificateValidationCallback remoteCertificateValidationCallback = null) { if (sendingRequestEventArgs != null) { @@ -478,7 +484,8 @@ internal DocumentClient(Uri serviceEndpoint, sessionContainer: sessionContainer, enableCpuMonitor: enableCpuMonitor, storeClientFactory: storeClientFactory, - cosmosClientId: cosmosClientId); + cosmosClientId: cosmosClientId, + remoteCertificateValidationCallback: remoteCertificateValidationCallback); } /// @@ -660,7 +667,8 @@ internal virtual void Initialize(Uri serviceEndpoint, bool? enableCpuMonitor = null, IStoreClientFactory storeClientFactory = null, TokenCredential tokenCredential = null, - string cosmosClientId = null) + string cosmosClientId = null, + RemoteCertificateValidationCallback remoteCertificateValidationCallback = null) { if (serviceEndpoint == null) { @@ -668,6 +676,7 @@ internal virtual void Initialize(Uri serviceEndpoint, } this.clientId = cosmosClientId; + this.remoteCertificateValidationCallback = remoteCertificateValidationCallback; this.queryPartitionProvider = new AsyncLazy(async () => { @@ -6648,7 +6657,8 @@ private void InitializeDirectConnectivity(IStoreClientFactory storeClientFactory retryWithConfiguration: this.ConnectionPolicy.RetryOptions?.GetRetryWithConfiguration(), enableTcpConnectionEndpointRediscovery: this.ConnectionPolicy.EnableTcpConnectionEndpointRediscovery, addressResolver: this.AddressResolver, - rntbdMaxConcurrentOpeningConnectionCount: this.rntbdMaxConcurrentOpeningConnectionCount); + rntbdMaxConcurrentOpeningConnectionCount: this.rntbdMaxConcurrentOpeningConnectionCount, + remoteCertificateValidationCallback: this.remoteCertificateValidationCallback ); if (this.transportClientHandlerFactory != null) { diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs index f86bd6b183..a48666f16d 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs @@ -10,6 +10,8 @@ namespace Microsoft.Azure.Cosmos using System.Net; using System.Net.Http; using System.Net.Http.Headers; + using System.Net.Security; + using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Resource.CosmosExceptions; @@ -73,7 +75,8 @@ public static CosmosHttpClient CreateWithConnectionPolicy( { httpMessageHandler = CosmosHttpClientCore.CreateHttpClientHandler( gatewayModeMaxConnectionLimit: connectionPolicy.MaxConnectionLimit, - webProxy: null); + webProxy: null, + serverCertificateCustomValidationCallback: connectionPolicy.ServerCertificateCustomValidationCallback); } if (sendingRequestEventArgs != null || @@ -96,7 +99,7 @@ public static CosmosHttpClient CreateWithConnectionPolicy( eventSource: eventSource); } - public static HttpMessageHandler CreateHttpClientHandler(int gatewayModeMaxConnectionLimit, IWebProxy webProxy) + public static HttpMessageHandler CreateHttpClientHandler(int gatewayModeMaxConnectionLimit, IWebProxy webProxy, Func serverCertificateCustomValidationCallback) { HttpClientHandler httpClientHandler = new HttpClientHandler(); @@ -110,6 +113,10 @@ public static HttpMessageHandler CreateHttpClientHandler(int gatewayModeMaxConne try { httpClientHandler.MaxConnectionsPerServer = gatewayModeMaxConnectionLimit; + if (serverCertificateCustomValidationCallback != null) + { + httpClientHandler.ServerCertificateCustomValidationCallback = (_, certificate2, x509Chain, sslPolicyErrors) => serverCertificateCustomValidationCallback(certificate2, x509Chain, sslPolicyErrors); + } } // MaxConnectionsPerServer is not supported on some platforms. catch (PlatformNotSupportedException) diff --git a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs index 191399943f..a9c475615a 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs @@ -8,6 +8,8 @@ namespace Microsoft.Azure.Cosmos using System.Diagnostics; using System.IO; using System.Net.Http; + using System.Net.Security; + using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -65,7 +67,8 @@ internal static CosmosClientContext Create( clientOptions = ClientContextCore.CreateOrCloneClientOptions(clientOptions); HttpMessageHandler httpMessageHandler = CosmosHttpClientCore.CreateHttpClientHandler( clientOptions.GatewayModeMaxConnectionLimit, - clientOptions.WebProxy); + clientOptions.WebProxy, + clientOptions.ServerCertificateCustomValidationCallback); DocumentClient documentClient = new DocumentClient( cosmosClient.Endpoint, @@ -79,7 +82,8 @@ internal static CosmosClientContext Create( desiredConsistencyLevel: clientOptions.GetDocumentsConsistencyLevel(), handler: httpMessageHandler, sessionContainer: clientOptions.SessionContainer, - cosmosClientId: cosmosClient.Id); + cosmosClientId: cosmosClient.Id, + remoteCertificateValidationCallback: ClientContextCore.SslCustomValidationCallBack(clientOptions.ServerCertificateCustomValidationCallback)); return ClientContextCore.Create( cosmosClient, @@ -87,6 +91,11 @@ internal static CosmosClientContext Create( clientOptions); } + private static RemoteCertificateValidationCallback SslCustomValidationCallBack(Func serverCertificateCustomValidationCallback) + { + return serverCertificateCustomValidationCallback == null ? null : (_, cert, chain, policy) => serverCertificateCustomValidationCallback((X509Certificate2)cert, chain, policy); + } + internal static CosmosClientContext Create( CosmosClient cosmosClient, DocumentClient documentClient, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs index c6a7bc16f7..2c9bf3325c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs @@ -7,13 +7,13 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System; using System.Collections.Generic; using System.Diagnostics; - using System.Formats.Asn1; using System.IO; using System.Linq; using System.Net; using System.Net.Http; - using System.Net.NetworkInformation; + using System.Net.Security; using System.Reflection; + using System.Security.Cryptography.X509Certificates; using System.Text; using System.Threading; using System.Threading.Tasks; @@ -446,6 +446,39 @@ internal async Task TestEtagOnUpsertOperation(bool useGateway, Protocol protocol } } } + + [TestMethod] + public async Task Verify_CertificateCallBackGetsCalled_ForTCP_HTTP() + { + string authKey = ConfigurationManager.AppSettings["MasterKey"]; + string endpoint = ConfigurationManager.AppSettings["GatewayEndpoint"]; + int counter = 0; + AzureKeyCredential masterKeyCredential = new AzureKeyCredential(authKey); + CosmosClient cosmosClient = new CosmosClient( + endpoint, + masterKeyCredential, + new CosmosClientOptions() + { + ConnectionMode = ConnectionMode.Direct, + ConnectionProtocol = Protocol.Tcp, + ServerCertificateCustomValidationCallback = (X509Certificate2 cerf, X509Chain chain, SslPolicyErrors error) => { counter ++; return true; } + }); + + string databaseName = Guid.NewGuid().ToString(); + string databaseId = Guid.NewGuid().ToString(); + Cosmos.Database database = null; + //HTTP callback + database = await cosmosClient.CreateDatabaseAsync(databaseId); + + Cosmos.Container container = await database.CreateContainerAsync(Guid.NewGuid().ToString(), "/id"); + + //TCP callback + ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(); + ResponseMessage responseMessage = await container.CreateItemStreamAsync(TestCommon.SerializerCore.ToStream(item), new Cosmos.PartitionKey(item.id)); + + Assert.IsTrue(counter >= 2); + + } [TestMethod] public void SqlQuerySpecSerializationTest() diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index c5bb91849b..43801584fe 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -165,11 +165,6 @@ "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode AllVersionsAndDeletes;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_AllVersionsAndDeletes();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, - "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion": { - "Type": "Property", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, "Microsoft.Azure.Cosmos.ChangeFeedMode get_AllVersionsAndDeletes()": { "Type": "Method", "Attributes": [], @@ -179,6 +174,11 @@ "Type": "Method", "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 70e4a5d780..9edd8d6de1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -2764,6 +2764,18 @@ ], "MethodInfo": "System.Func`1[System.Net.Http.HttpClient] HttpClientFactory;CanRead:True;CanWrite:True;System.Func`1[System.Net.Http.HttpClient] get_HttpClientFactory();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_HttpClientFactory(System.Func`1[System.Net.Http.HttpClient]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean] get_ServerCertificateCustomValidationCallback()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean] get_ServerCertificateCustomValidationCallback();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean] ServerCertificateCustomValidationCallback": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean] ServerCertificateCustomValidationCallback;CanRead:True;CanWrite:True;System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean] get_ServerCertificateCustomValidationCallback();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_ServerCertificateCustomValidationCallback(System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "System.Net.IWebProxy get_WebProxy()": { "Type": "Method", "Attributes": [], @@ -3050,6 +3062,13 @@ "Attributes": [], "MethodInfo": "Void set_SerializerOptions(Microsoft.Azure.Cosmos.CosmosSerializationOptions);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Void set_ServerCertificateCustomValidationCallback(System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_ServerCertificateCustomValidationCallback(System.Func`4[System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.X509Certificates.X509Chain,System.Net.Security.SslPolicyErrors,System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_TokenCredentialBackgroundRefreshInterval(System.Nullable`1[System.TimeSpan])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientResourceUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientResourceUnitTests.cs index 8ca17376ed..8d3f53edfb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientResourceUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientResourceUnitTests.cs @@ -7,10 +7,16 @@ namespace Microsoft.Azure.Cosmos.Core.Tests using System; using System.Collections.Generic; using System.Net.Http; + using System.Net.Security; + using System.Security.Cryptography.X509Certificates; + using System.Security.Cryptography; using Microsoft.Azure.Cosmos.Tests; using Microsoft.Azure.Documents; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; + using System.Globalization; + using System.Threading.Tasks; + using Microsoft.Azure.Documents.Collections; [TestClass] public class CosmosClientResourceUnitTests @@ -132,6 +138,44 @@ public void InitializeBatchExecutorForContainer_NotNull_WhenAllowBulk_True() Assert.IsNotNull(container.BatchExecutor); } + [TestMethod] + public void WithServerCertificateAddedClientOptions_CreateContext_RemoteCertificateCallbackReturnsTrue() + { + //Arrange + X509Certificate2 x509Certificate2 = new CertificateRequest("cn=www.test", ECDsa.Create(), HashAlgorithmName.SHA256).CreateSelfSigned(DateTime.Now, DateTime.Now.AddYears(1)); + X509Chain x509Chain = new X509Chain(); + SslPolicyErrors sslPolicyErrors = new SslPolicyErrors(); + + string authKeyValue = "MockAuthKey"; + Mock mockAuth = new Mock(MockBehavior.Strict); + mockAuth.Setup(x => x.Dispose()); + mockAuth.Setup(x => x.AddAuthorizationHeaderAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .Callback( + (headers, uri, verb, tokenType) => headers.Add(Documents.HttpConstants.HttpHeaders.Authorization, authKeyValue)) + .Returns(() => new ValueTask()); + + CosmosClient client = new CosmosClient( + "https://localhost:8081", + authorizationTokenProvider: mockAuth.Object, + new CosmosClientOptions() + { + ServerCertificateCustomValidationCallback = (X509Certificate2 cerf, X509Chain chain, SslPolicyErrors error) => true + }); + + //Act + CosmosClientContext context = ClientContextCore.Create( + client, + client.ClientOptions); + + //Assert + Assert.IsTrue(context.DocumentClient.remoteCertificateValidationCallback(new object(), x509Certificate2, x509Chain, sslPolicyErrors)); + + } + private CosmosClientContext CreateMockClientContext(bool allowBulkExecution = false) { Mock mockClient = new Mock(); @@ -141,6 +185,6 @@ private CosmosClientContext CreateMockClientContext(bool allowBulkExecution = fa mockClient.Object, new MockDocumentClient(), new CosmosClientOptions() { AllowBulkExecution = allowBulkExecution }); - } + } } } From 2608d4af7c45ffb417b72c11d711bca2c570a739 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Thu, 26 Jan 2023 11:36:56 -0800 Subject: [PATCH 048/164] Query: Adds EnableOptimisticDirectExecution flag to QueryRequestOptions (#3664) * Added new flag to QueryRequestOptions to allow customers to use Ode pipeline * Updated comments in QueryRequestOptions.cs * Renamed enabledOde to enableOde * Removed default setting for EnableOptimisticDirectExecution --- .../CosmosQueryExecutionContextFactory.cs | 7 +++++- .../src/Query/Core/TestInjections.cs | 5 +--- .../src/Query/v3Query/QueryIterator.cs | 1 + .../src/RequestOptions/QueryRequestOptions.cs | 8 +++++++ .../OptimisticDirectExecutionQueryTests.cs | 23 ++++++------------- .../Query/QueryTestsBase.cs | 1 + ...misticDirectExecutionQueryBaselineTests.cs | 11 +++++---- 7 files changed, 31 insertions(+), 25 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 371391386e..d8a885a07b 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -418,6 +418,7 @@ private static TryCatch TryCreateSpecializedDocumentQueryEx inputParameters.ExecutionEnvironment, inputParameters.ReturnResultsInDeterministicOrder, inputParameters.ForcePassthrough, + inputParameters.EnableOptimisticDirectExecution, inputParameters.TestInjections); } @@ -752,7 +753,7 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP ContainerQueryProperties containerQueryProperties, ITrace trace) { - if (inputParameters.TestInjections == null || !inputParameters.TestInjections.EnableOptimisticDirectExecution) return null; + if (!inputParameters.EnableOptimisticDirectExecution) return null; // case 1: Is query going to a single partition bool hasPartitionKey = inputParameters.PartitionKey.HasValue @@ -824,6 +825,7 @@ public InputParameters( ExecutionEnvironment? executionEnvironment, bool? returnResultsInDeterministicOrder, bool forcePassthrough, + bool enableOptimisticDirectExecution, TestInjections testInjections) { this.SqlQuerySpec = sqlQuerySpec ?? throw new ArgumentNullException(nameof(sqlQuerySpec)); @@ -857,6 +859,7 @@ public InputParameters( this.ExecutionEnvironment = executionEnvironment.GetValueOrDefault(InputParameters.DefaultExecutionEnvironment); this.ReturnResultsInDeterministicOrder = returnResultsInDeterministicOrder.GetValueOrDefault(InputParameters.DefaultReturnResultsInDeterministicOrder); this.ForcePassthrough = forcePassthrough; + this.EnableOptimisticDirectExecution = enableOptimisticDirectExecution; this.TestInjections = testInjections; } @@ -873,6 +876,7 @@ public InputParameters( public bool ReturnResultsInDeterministicOrder { get; } public TestInjections TestInjections { get; } public bool ForcePassthrough { get; } + public bool EnableOptimisticDirectExecution { get; } public InputParameters WithContinuationToken(CosmosElement token) { @@ -889,6 +893,7 @@ public InputParameters WithContinuationToken(CosmosElement token) this.ExecutionEnvironment, this.ReturnResultsInDeterministicOrder, this.ForcePassthrough, + this.EnableOptimisticDirectExecution, this.TestInjections); } } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/TestInjections.cs b/Microsoft.Azure.Cosmos/src/Query/Core/TestInjections.cs index 7ee877bd14..1328d4dbab 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/TestInjections.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/TestInjections.cs @@ -13,16 +13,13 @@ public enum PipelineType OptimisticDirectExecution, } - public TestInjections(bool simulate429s, bool simulateEmptyPages, bool enableOptimisticDirectExecution = false, ResponseStats responseStats = null) + public TestInjections(bool simulate429s, bool simulateEmptyPages, ResponseStats responseStats = null) { this.SimulateThrottles = simulate429s; this.SimulateEmptyPages = simulateEmptyPages; this.Stats = responseStats; - this.EnableOptimisticDirectExecution = enableOptimisticDirectExecution; } - public bool EnableOptimisticDirectExecution { get; } - public bool SimulateThrottles { get; } public bool SimulateEmptyPages { get; } diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs index 01a4e1b12e..a820a0a49a 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs @@ -144,6 +144,7 @@ public static QueryIterator Create( executionEnvironment: queryRequestOptions.ExecutionEnvironment, returnResultsInDeterministicOrder: queryRequestOptions.ReturnResultsInDeterministicOrder, forcePassthrough: forcePassthrough, + enableOptimisticDirectExecution: queryRequestOptions.EnableOptimisticDirectExecution, testInjections: queryRequestOptions.TestSettings); return new QueryIterator( diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index 9e478c96b9..8711836191 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -43,6 +43,14 @@ public class QueryRequestOptions : RequestOptions /// public bool? EnableLowPrecisionOrderBy { get; set; } + /// + /// Gets or sets the option for customers to opt in for direct (optimistic) execution of the query.. + /// + /// + /// Direct (optimistic) execution offers improved performance for several kinds of queries such as a single partition streaming query. + /// + internal bool EnableOptimisticDirectExecution { get; set; } + /// /// Gets or sets the maximum number of items that can be buffered client side during /// parallel query execution in the Azure Cosmos DB service. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs index acdb4d92de..9d89f6362a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs @@ -67,7 +67,8 @@ private static async Task TestPositiveOptimisticDirectExecutionOutput( QueryRequestOptions feedOptions = new QueryRequestOptions { MaxItemCount = -1, - TestSettings = GetTestInjections(simulate429s:false, simulateEmptyPages:false, enableOptimisticDirectExecution:true) + EnableOptimisticDirectExecution = true, + TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) }; // check if pipeline returns empty continuation token @@ -172,13 +173,11 @@ private static async Task TestPositiveOptimisticDirectExecutionOutput( feedOptions = new QueryRequestOptions { MaxItemCount = pageSizeOptions[i], - PartitionKey = queryAndResults[j].PartitionKey == null + PartitionKey = queryAndResults[j].PartitionKey == null ? null : new Cosmos.PartitionKey(queryAndResults[j].PartitionKey), - TestSettings = GetTestInjections( - simulate429s: false, - simulateEmptyPages: false, - enableOptimisticDirectExecution: queryAndResults[j].EnableOptimisticDirectExecution) + EnableOptimisticDirectExecution = queryAndResults[j].EnableOptimisticDirectExecution, + TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) }; List items = await RunQueryAsync( @@ -208,7 +207,8 @@ private static async Task TestNegativeOptimisticDirectExecutionOutput( QueryRequestOptions feedOptions = new QueryRequestOptions { PartitionKey = new Cosmos.PartitionKey("/value"), - TestSettings = GetTestInjections(simulate429s: false, simulateEmptyPages: false, enableOptimisticDirectExecution: true) + EnableOptimisticDirectExecution = true, + TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) }; // check if bad continuation queries and syntax error queries are handled by pipeline @@ -241,15 +241,6 @@ await container.GetItemQueryIterator( } } - private static TestInjections GetTestInjections(bool simulate429s, bool simulateEmptyPages, bool enableOptimisticDirectExecution) - { - return new TestInjections( - simulate429s, - simulateEmptyPages, - enableOptimisticDirectExecution, - new TestInjections.ResponseStats()); - } - private struct SinglePartitionWithContinuationsArgs { public int NumberOfDocuments; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs index 4775716efa..c196af9d44 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs @@ -597,6 +597,7 @@ internal static async Task> QueryWithCosmosElementContinuationTokenAsync Properties = queryRequestOptions.Properties, IsEffectivePartitionKeyRouting = queryRequestOptions.IsEffectivePartitionKeyRouting, CosmosElementContinuationToken = queryRequestOptions.CosmosElementContinuationToken, + EnableOptimisticDirectExecution = queryRequestOptions.EnableOptimisticDirectExecution, TestSettings = queryRequestOptions.TestSettings, }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index 6737a3d338..b6a78c111d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -148,11 +148,12 @@ public void NegativeOptimisticDirectExecutionOutput() // This test confirms that TestInjection.EnableOptimisticDirectExection is set to false from default. // Check test "TestPipelineForDistributedQueryAsync" to understand why this is done [TestMethod] - public async Task TestDefaultTestInjectionSettingsAsync() + public async Task TestDefaultQueryRequestOptionsSettings() { - TestInjections testInjection = new TestInjections(simulate429s: false, simulateEmptyPages: false); - Assert.AreEqual(testInjection.EnableOptimisticDirectExecution, false); + QueryRequestOptions requestOptions = new QueryRequestOptions(); + + Assert.AreEqual(requestOptions.EnableOptimisticDirectExecution, false); } // test checks that the pipeline can take a query to the backend and returns its associated document(s). @@ -563,6 +564,7 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect executionEnvironment: null, returnResultsInDeterministicOrder: null, forcePassthrough: false, + enableOptimisticDirectExecution: queryRequestOptions.EnableOptimisticDirectExecution, testInjections: queryRequestOptions.TestSettings); string databaseId = "db1234"; @@ -587,7 +589,8 @@ private static QueryRequestOptions GetQueryRequestOptions(bool enableOptimisticD { MaxConcurrency = 0, MaxItemCount = 10, - TestSettings = new TestInjections(simulate429s: true, simulateEmptyPages: false, enableOptimisticDirectExecution: enableOptimisticDirectExecution, new TestInjections.ResponseStats()), + EnableOptimisticDirectExecution = enableOptimisticDirectExecution, + TestSettings = new TestInjections(simulate429s: true, simulateEmptyPages: false, new TestInjections.ResponseStats()), Properties = new Dictionary() { { HttpConstants.HttpHeaders.EnumerationDirection, ""}, From d6a439f3ef766a911b569fdaf901f422cd50720a Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 1 Feb 2023 16:09:03 -0800 Subject: [PATCH 049/164] [Internal] Tests: Removes Direct/HTTPS emulator tests (#3679) * Removing direct/https tests * mppreference --- .../ClientTests.cs | 6 -- .../GatewayTests.cs | 35 ----------- .../HeadersValidationTests.cs | 63 ------------------- .../NameRoutingTests.cs | 60 ------------------ .../QueryTests.cs | 6 -- .../SmokeTests.cs | 35 ----------- .../Utils/Util.cs | 6 +- templates/emulator-setup.yml | 1 + 8 files changed, 3 insertions(+), 209 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs index 2c9bf3325c..a2fcc1f598 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs @@ -384,12 +384,6 @@ public async Task TestHeadersPassedinByClient() Assert.AreEqual((ulong)SDKSupportedCapabilities.PartitionMerge, capability & (ulong)SDKSupportedCapabilities.PartitionMerge,$" received header value as {sdkSupportedCapability}"); } - [TestMethod] - public async Task TestEtagOnUpsertOperationForHttpsClient() - { - await this.TestEtagOnUpsertOperation(false, Protocol.Https); - } - [TestMethod] public async Task TestEtagOnUpsertOperationForGatewayClient() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs index d0366cf9b8..0d7eaa7ea5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs @@ -285,13 +285,6 @@ await this.ValidateStoredProcedureCrudAsync(ConsistencyLevel.Session, new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Tcp }); } - [TestMethod] - public async Task ValidateStoredProcedureCrud_SessionDirectHttps() - { - await this.ValidateStoredProcedureCrudAsync(ConsistencyLevel.Session, - new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Https }); - } - internal async Task ValidateStoredProcedureCrudAsync(ConsistencyLevel consistencyLevel, ConnectionPolicy connectionPolicy) { DocumentClient client = TestCommon.CreateClient(connectionPolicy.ConnectionMode == ConnectionMode.Gateway, @@ -432,13 +425,6 @@ public void ValidateTriggerCrud_SessionDirectTcp() new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Tcp }); } - [TestMethod] - public void ValidateTriggerCrud_SessionDirectHttps() - { - this.ValidateTriggerCrud(ConsistencyLevel.Session, - new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Https }); - } - internal void ValidateTriggerCrud(ConsistencyLevel consistencyLevel, ConnectionPolicy connectionPolicy) { DocumentClient client = TestCommon.CreateClient(connectionPolicy.ConnectionMode == ConnectionMode.Gateway, @@ -566,14 +552,6 @@ public void ValidateUserDefinedFunctionCrud_SessionDirectTcp() new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Tcp }); } - [TestMethod] - - public void ValidateUserDefinedFunctionCrud_SessionDirectHttps() - { - this.ValidateUserDefinedFunctionCrud(ConsistencyLevel.Session, - new ConnectionPolicy { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Protocol.Https }); - } - [TestMethod] public void ValidateUserDefinedFunctionTimeout() { @@ -1501,7 +1479,6 @@ public async Task ValidateSystemSproc() await this.ValidateSystemSprocInternal(true); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - ValidateSystemSprocInternal(false, Protocol.Https); ValidateSystemSprocInternal(false, Protocol.Tcp); #endif } @@ -2183,7 +2160,6 @@ public async Task ValidateReadOnlyStoredProcedureExecution() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await ValidateReadOnlyStoredProcedureExecutionInternal(false, Protocol.Tcp); - await ValidateReadOnlyStoredProcedureExecutionInternal(false, Protocol.Https); #endif } @@ -2559,7 +2535,6 @@ public async Task ValidateChangeFeedIfNoneMatch() await this.ValidateChangeFeedIfNoneMatchHelper(true); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - await ValidateChangeFeedIfNoneMatchHelper(false, Protocol.Https); await ValidateChangeFeedIfNoneMatchHelper(false, Protocol.Tcp); #endif } @@ -2709,7 +2684,6 @@ public async Task ValidateChangeFeedIfModifiedSince() await this.ValidateChangeFeedIfModifiedSinceHelper(true); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - await ValidateChangeFeedIfModifiedSinceHelper(false, Protocol.Https); await ValidateChangeFeedIfModifiedSinceHelper(false, Protocol.Tcp); #endif } @@ -2822,7 +2796,6 @@ private async Task ValidateChangeFeedIfModifiedSinceHelper(bool useGateway, Prot public async Task ValidateChangeFeedWithPartitionKey() { await this.ValidateChangeFeedWithPartitionKeyHelper(true); - await this.ValidateChangeFeedWithPartitionKeyHelper(false, Protocol.Https); await this.ValidateChangeFeedWithPartitionKeyHelper(false, Protocol.Tcp); } @@ -2999,7 +2972,6 @@ public async Task ValidateReadPartitionKeyRange() await this.ValidateReadPartitionKeyRangeHelper(true); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - await ValidateReadPartitionKeyRangeHelper(false, Protocol.Https); await ValidateReadPartitionKeyRangeHelper(false, Protocol.Tcp); #endif } @@ -3109,13 +3081,6 @@ public void ValidateGenericReadDocumentDirectTcp() this.ValidateGenericReadDocumentFromResource(false, Protocol.Tcp).Wait(); } - [TestMethod] - public void ValidateGenericReadDocumentDirectHttps() - { - this.ValidateGenericReadDocument(false, Protocol.Https).Wait(); - this.ValidateGenericReadDocumentFromResource(false, Protocol.Tcp).Wait(); - } - private async Task ValidateGenericReadDocument(bool useGateway, Protocol protocol) { CosmosClient client = TestCommon.CreateCosmosClient(useGateway); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs index d8cf36f5de..be83b0e1fd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs @@ -57,14 +57,6 @@ public void TestCleanup() HttpConstants.Versions.CurrentVersionUTF8 = this.currentVersionUTF8; } - [TestMethod] - public void ValidatePageSizeHttps() - { - var client = TestCommon.CreateClient(false, Protocol.Https); - ValidatePageSize(client); - ValidatePageSize(client); - } - [TestMethod] public void ValidatePageSizeRntbd() { @@ -182,13 +174,6 @@ public async Task ValidateConsistencyLevelRntbd() await ValidateCosistencyLevel(client); } - [TestMethod] - public async Task ValidateConsistencyLevelHttps() - { - DocumentClient client = TestCommon.CreateClient(false, Protocol.Https); - await ValidateCosistencyLevel(client); - } - private async Task ValidateCosistencyLevel(DocumentClient client) { DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client); @@ -232,13 +217,6 @@ public void ValidateJsonSerializationFormatRntbd() ValidateJsonSerializationFormat(client); } - [TestMethod] - public void ValidateJsonSerializationFormatHttps() - { - var client = TestCommon.CreateClient(false, Protocol.Https); - ValidateJsonSerializationFormat(client); - } - private void ValidateJsonSerializationFormat(DocumentClient client) { DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client); @@ -342,14 +320,6 @@ public void ValidateIndexingDirectiveRntbd() ValidateIndexingDirective(client); } - [TestMethod] - public void ValidateIndexingDirectiveHttps() - { - //var client = TestCommon.CreateClient(false, Protocol.Https); - var client = TestCommon.CreateClient(true, Protocol.Https); - ValidateIndexingDirective(client); - } - private void ValidateIndexingDirective(DocumentClient client) { // Number out of range. @@ -407,13 +377,6 @@ public void ValidateEnableScanInQueryRntbd() ValidateEnableScanInQuery(client); } - [TestMethod] - public void ValidateEnableScanInQueryHttps() - { - var client = TestCommon.CreateClient(false, Protocol.Https); - ValidateEnableScanInQuery(client); - } - private void ValidateEnableScanInQuery(DocumentClient client, bool isHttps = false) { // Value not boolean @@ -460,14 +423,6 @@ public void ValidateEnableLowPrecisionOrderByRntbd() ValidateEnableLowPrecisionOrderBy(client); } - [TestMethod] - - public void ValidateEnableLowPrecisionOrderByHttps() - { - var client = TestCommon.CreateClient(false, Protocol.Https); - ValidateEnableLowPrecisionOrderBy(client, true); - } - private void ValidateEnableLowPrecisionOrderBy(DocumentClient client, bool isHttps = false) { // Value not boolean @@ -516,13 +471,6 @@ public void ValidateEmitVerboseTracesInQueryRntbd() ValidateEmitVerboseTracesInQuery(client); } - [TestMethod] - public void ValidateEmitVerboseTracesInQueryHttps() - { - var client = TestCommon.CreateClient(false, Protocol.Https); - ValidateEmitVerboseTracesInQuery(client, true); - } - private void ValidateEmitVerboseTracesInQuery(DocumentClient client, bool isHttps = false) { // Value not boolean @@ -562,12 +510,6 @@ public void ValidateIfNonMatchGateway() ValidateIfNonMatch(client); } - [TestMethod] - public void ValidateIfNonMatchHttps() - { - var client = TestCommon.CreateClient(false, Protocol.Https); - ValidateIfNonMatch(client); - } [TestMethod] public void ValidateIfNonMatchRntbd() @@ -719,11 +661,6 @@ public async Task ValidateCollectionIndexProgressHeaders() await ValidateCollectionIndexProgressHeadersAsync(client, isElasticCollection: true); } - using (var client = TestCommon.CreateClient(false, Protocol.Https)) - { - await ValidateCollectionIndexProgressHeadersAsync(client, isElasticCollection: true); - } - using (var client = TestCommon.CreateClient(false, Protocol.Tcp)) { await ValidateCollectionIndexProgressHeadersAsync(client, isElasticCollection: true); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs index c17c310fdb..6c29791783 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs @@ -40,15 +40,6 @@ public async Task NameRoutingSmokeGatewayTest() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - [TestMethod] - public void NameRoutingSmokeDirectHttpsTest() - { - DocumentClient client; - client = TestCommon.CreateClient(false, Protocol.Https, 10, ConsistencyLevel.Session); - - this.NameRoutingSmokeTestPrivateAsync(client).Wait(); - } - [TestMethod] public void NameRoutingSmokeDirectTcpTest() { @@ -436,8 +427,6 @@ public void ReplaceDocumentWithUri() this.ReplaceDocumentWithUriPrivateAsync(client).Wait(); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - this.ReplaceDocumentWithUriPrivateAsync(client).Wait(); client = TestCommon.CreateClient(false, Protocol.Tcp); this.ReplaceDocumentWithUriPrivateAsync(client).Wait(); @@ -501,10 +490,6 @@ public async Task CollectionDeleteAndCreateWithSameNameTest() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - await this.CollectionDeleteAndCreateWithSameNameTestPrivateAsync(client); - - client = TestCommon.CreateClient(false, Protocol.Tcp); await this.CollectionDeleteAndCreateWithSameNameTestPrivateAsync(client); #endif @@ -606,14 +591,6 @@ private async Task CollectionDeleteAndCreateWithSameNameTestPrivateAsync(Documen // 11. Now it succeed. #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - - [TestMethod] - public void VerifyGatewayNameIdCacheRefreshDirectHttp() - { - DocumentClient client = TestCommon.CreateClient(false, Protocol.Https); - this.VerifyGatewayNameIdCacheRefreshPrivateAsync(client).Wait(); - } - [TestMethod] public void VerifyGatewayNameIdCacheRefreshDirectTcp() { @@ -760,9 +737,6 @@ public void VerifyInvalidPartitionException() this.VerifyInvalidPartitionExceptionPrivateAsync(client).Wait(); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - this.VerifyInvalidPartitionExceptionPrivateAsync(client).Wait(); - client = TestCommon.CreateClient(false, Protocol.Tcp); this.VerifyInvalidPartitionExceptionPrivateAsync(client).Wait(); #endif @@ -797,9 +771,6 @@ public async Task VerifyInvalidPartitionExceptionWithPopulateQuotaInfo() await this.VerifyInvalidPartitionExceptionWithPopulateQuotaInfo(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - await this.VerifyInvalidPartitionExceptionWithPopulateQuotaInfo(client); - client = TestCommon.CreateClient(false, Protocol.Tcp); await this.VerifyInvalidPartitionExceptionWithPopulateQuotaInfo(client); #endif @@ -850,9 +821,6 @@ public void VerifyNameIdCacheTaskReuse() this.VerifyNameIdCacheTaskReusePrivateAsync(client).Wait(); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - this.VerifyNameIdCacheTaskReusePrivateAsync(client).Wait(); - client = TestCommon.CreateClient(false, Protocol.Tcp); this.VerifyNameIdCacheTaskReusePrivateAsync(client).Wait(); #endif @@ -903,10 +871,6 @@ public void CrazyNameTest() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - - client = TestCommon.CreateClient(false, Protocol.Https); - this.CrazyNameTestPrivateAsync(client, false).Wait(); - client = TestCommon.CreateClient(false, Protocol.Tcp); this.CrazyNameTestPrivateAsync(client, false, true).Wait(); #endif @@ -1019,9 +983,6 @@ public void NameRoutingBadUrlTest() this.NameRoutingBadUrlTestPrivateAsync(client, false).Wait(); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - this.NameRoutingBadUrlTestPrivateAsync(client, false).Wait(); - client = TestCommon.CreateClient(false, Protocol.Tcp); this.NameRoutingBadUrlTestPrivateAsync(client, false, true).Wait(); #endif @@ -1106,8 +1067,6 @@ public void VerifyInvalidNameTest() this.VerifyInvalidNameTestPrivateAsync(client).Wait(); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - this.VerifyInvalidNameTestPrivateAsync(client).Wait(); client = TestCommon.CreateClient(false, Protocol.Tcp); this.VerifyInvalidNameTestPrivateAsync(client).Wait(); @@ -1249,14 +1208,6 @@ public void NameParsingTest() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - [TestMethod] - [TestCategory("Ignore")] - public void VerifyMasterNodeThrottlingDirectHttp() - { - DocumentClient client = TestCommon.CreateClient(false, Protocol.Https); - this.VerifyMasterNodeThrottlingPrivateAsync(client).Wait(); - } - [TestMethod] public void VerifyMasterNodeThrottlingDirectTcp() { @@ -1271,9 +1222,6 @@ public async Task VerifyNameBasedCollectionCRUDOperations() await this.VerifyNameBasedCollectionCRUDOperationsAsync(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - client = TestCommon.CreateClient(false, Protocol.Https); - await this.VerifyNameBasedCollectionCRUDOperationsAsync(client); - client = TestCommon.CreateClient(false, Protocol.Tcp); await this.VerifyNameBasedCollectionCRUDOperationsAsync(client); #endif @@ -1291,7 +1239,6 @@ public async Task TestPartitionKeyDefinitionOnCollectionRecreate() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestPartitionKeyDefinitionOnCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } @@ -1328,7 +1275,6 @@ public async Task TestPartitionKeyDefinitionOnContainerRecreateFromDifferentPart #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnContainerRecreateFromDifferentPartitionKeyPath(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestPartitionKeyDefinitionOnContainerRecreateFromDifferentPartitionKeyPath(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } @@ -1426,7 +1372,6 @@ public async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartition #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } @@ -1484,7 +1429,6 @@ public async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartition #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForParallelQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForParallelQuery(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } @@ -1537,7 +1481,6 @@ public async Task TestCollectionRecreateFromMultipartitionToSinglePartitionedFor { await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(TestCommon.CreateClient(true)); await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Https)); } internal async Task TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(DocumentClient client) @@ -1584,7 +1527,6 @@ public async Task TestRouteToNonExistentRangeAfterCollectionRecreate() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestRouteToNonExistentRangeAfterCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestRouteToNonExistentRangeAfterCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } @@ -1657,7 +1599,6 @@ public async Task TestRouteToExistentRangeAfterCollectionRecreate() #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestRouteToExistentRangeAfterCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestRouteToExistentRangeAfterCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } @@ -1736,7 +1677,6 @@ public async Task TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedT #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedToNonPartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); - await this.TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedToNonPartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Https)); #endif } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs index ebf90f2fd1..6d6484e5a9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs @@ -777,12 +777,6 @@ public void TestQueryUnicodeDocumentHttpsGateway() this.TestQueryUnicodeDocument(useGateway: true, protocol: Protocol.Https); } - [TestMethod] - public void TestQueryUnicodeDocumentHttpsDirect() - { - this.TestQueryUnicodeDocument(useGateway: false, protocol: Protocol.Https); - } - private void TestQueryUnicodeDocument(bool useGateway, Protocol protocol) { try diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs index a222e232f9..6aa1b2ca16 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs @@ -67,13 +67,6 @@ public async Task DocumentInsertsTest_GatewayHttps() await this.DocumentInsertsTest(); } - [TestMethod] - public async Task DocumentInsertsTest_DirectHttps() - { - this.client = this.GetDocumentClient(ConnectionMode.Direct, Documents.Client.Protocol.Https); - await this.DocumentInsertsTest(); - } - [TestMethod] public async Task DocumentInsertsTest_DirectTcp() { @@ -107,13 +100,6 @@ public async Task QueryWithPaginationTest_GatewayHttps() await this.QueryWithPagination(); } - [TestMethod] - public async Task QueryWithPaginationTest_DirectHttps() - { - this.client = this.GetDocumentClient(ConnectionMode.Direct, Documents.Client.Protocol.Https); - await this.QueryWithPagination(); - } - [TestMethod] public async Task QueryWithPaginationTest_DirectTcp() { @@ -173,13 +159,6 @@ public async Task CrossPartitionQueries_GatewayHttps() await this.CrossPartitionQueries(); } - [TestMethod] - public async Task CrossPartitionQueries_DirectHttps() - { - this.client = this.GetDocumentClient(ConnectionMode.Direct, Documents.Client.Protocol.Https); - await this.CrossPartitionQueries(); - } - [TestMethod] public async Task CrossPartitionQueries_DirectTcp() { @@ -220,13 +199,6 @@ public async Task CreateDatabaseIfNotExists_GatewayHttps() await this.CreateDatabaseIfNotExists(this.client); } - [TestMethod] - public async Task CreateDatabaseIfNotExists_DirectHttps() - { - this.client = this.GetDocumentClient(ConnectionMode.Direct, Documents.Client.Protocol.Https); - await this.CreateDatabaseIfNotExists(this.client); - } - [TestMethod] public async Task CreateDatabaseIfNotExists_DirectTcp() { @@ -266,13 +238,6 @@ public async Task CreateDocumentCollectionIfNotExists_GatewayHttps() await this.CreateDocumentCollectionIfNotExists(); } - [TestMethod] - public async Task CreateDocumentCollectionIfNotExists_DirectHttps() - { - this.client = this.GetDocumentClient(ConnectionMode.Direct, Documents.Client.Protocol.Https); - await this.CreateDocumentCollectionIfNotExists(); - } - [TestMethod] public async Task CreateDocumentCollectionIfNotExists_DirectTcp() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index bdb688673d..8c71a6b168 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -112,8 +112,7 @@ internal static void TestForEachClient( new Dictionary { {DocumentClientType.Gateway, TestCommon.CreateClient(true, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)}, - {DocumentClientType.DirectTcp, TestCommon.CreateClient(false, Protocol.Tcp, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)}, - {DocumentClientType.DirectHttps, TestCommon.CreateClient(false, Protocol.Https, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)} + {DocumentClientType.DirectTcp, TestCommon.CreateClient(false, Protocol.Tcp, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)} }; foreach (KeyValuePair clientEntry in clients) @@ -149,8 +148,7 @@ internal static void TestForAnyClient( new Dictionary { {DocumentClientType.Gateway, TestCommon.CreateClient(true, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)}, - {DocumentClientType.DirectTcp, TestCommon.CreateClient(false, Protocol.Tcp, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)}, - {DocumentClientType.DirectHttps, TestCommon.CreateClient(false, Protocol.Https, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)} + {DocumentClientType.DirectTcp, TestCommon.CreateClient(false, Protocol.Tcp, tokenType: authTokenType, defaultConsistencyLevel: consistencyLevel)} }; int seed = (int)DateTime.Now.Ticks; diff --git a/templates/emulator-setup.yml b/templates/emulator-setup.yml index 10b5664d82..56ba69b98b 100644 --- a/templates/emulator-setup.yml +++ b/templates/emulator-setup.yml @@ -11,6 +11,7 @@ steps: mkdir "$env:temp\Azure Cosmos DB Emulator" lessmsi x "$env:temp\azure-cosmosdb-emulator.msi" "$env:temp\Azure Cosmos DB Emulator\" Write-Host "Starting Comsos DB Emulator" -ForegroundColor green + Add-MpPreference -ExclusionPath "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator" Start-Process "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI /DisableRateLimiting /PartitionCount=100 /Consistency=Strong /enableRio /EnablePreview /EnableAadAuthentication /EnableSqlComputeEndpoint" -Verb RunAs Import-Module "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" Get-Item env:* | Sort-Object -Property Name From 393ae2396c2ef7f34dae6ebf221339780c800c8c Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 2 Feb 2023 06:16:37 +0530 Subject: [PATCH 050/164] [Internal] Benchmark : Fixes issue with dependency on Cosmos Project (#3673) * users/sourabhjain/benchmarkfix * update pipeline * Revert "users/sourabhjain/benchmarkfix" This reverts commit 81b48f0e47aed7a75540c2c83f62cea98d86824f. * fix compilation error * add parama for preview pkg also --------- Co-authored-by: Matias Quaranta --- .../Tools/Benchmark/BenchmarkConfig.cs | 2 +- templates/build-benchmark.yml | 2 +- templates/build-preview.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs index b9235d2232..6f89776370 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkConfig.cs @@ -224,7 +224,7 @@ internal Microsoft.Azure.Cosmos.CosmosClient CreateCosmosClient(string accountKe clientOptions.ConsistencyLevel = (Microsoft.Azure.Cosmos.ConsistencyLevel)Enum.Parse(typeof(Microsoft.Azure.Cosmos.ConsistencyLevel), this.ConsistencyLevel, ignoreCase: true); } - clientOptions.EnableDistributedTracing = this.EnableDistributedTracing; + clientOptions.IsDistributedTracingEnabled = this.EnableDistributedTracing; return new Microsoft.Azure.Cosmos.CosmosClient( this.EndPoint, diff --git a/templates/build-benchmark.yml b/templates/build-benchmark.yml index a072c5cb81..7e73842ee1 100644 --- a/templates/build-benchmark.yml +++ b/templates/build-benchmark.yml @@ -30,5 +30,5 @@ jobs: configuration: $(parameters.BuildConfiguration) nugetConfigPath: NuGet.config projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln' - arguments: -p:Optimize=true + arguments: -p:Optimize=true -p:OSSProjectRef=true versioningScheme: OFF \ No newline at end of file diff --git a/templates/build-preview.yml b/templates/build-preview.yml index 05387989c6..e9919878ff 100644 --- a/templates/build-preview.yml +++ b/templates/build-preview.yml @@ -167,5 +167,5 @@ jobs: configuration: $(parameters.BuildConfiguration) nugetConfigPath: NuGet.config projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln' - arguments: -p:Optimize=true -p:IsPreview=true + arguments: -p:Optimize=true -p:IsPreview=true -p:OSSProjectRef=true versioningScheme: OFF \ No newline at end of file From 122bc561e606c52168614694b824520cd6530013 Mon Sep 17 00:00:00 2001 From: pravengithub <124255233+pravengithub@users.noreply.github.com> Date: Fri, 3 Feb 2023 06:41:28 -0800 Subject: [PATCH 051/164] LocalQuorum: Adds Quorum reads on Consistent Prefix Accounts (#3680) Co-authored-by: DESKTOP-ED57J7H\Prashanth Venkataram --- .../src/CosmosClientOptions.cs | 2 +- .../src/Fluent/CosmosClientBuilder.cs | 2 +- .../src/ValidationHelpers.cs | 15 ++-- .../ValidationHelpersTests.cs | 72 +++++++++++++++++++ 4 files changed, 82 insertions(+), 9 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs diff --git a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs index fec7f4ac2f..c826bb90d1 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs @@ -600,7 +600,7 @@ public Func HttpClientFactory internal bool EnablePartitionLevelFailover { get; set; } = false; /// - /// Quorum Read allowed with eventual consistency account + /// Quorum Read allowed with eventual consistency account or consistent prefix account. /// internal bool EnableUpgradeConsistencyToLocalQuorum { get; set; } = false; diff --git a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs index 44c38ec51b..692d5b498a 100644 --- a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs +++ b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs @@ -698,7 +698,7 @@ internal CosmosClientBuilder WithPartitionLevelFailoverEnabled() } /// - /// To enable LocalQuorum Consistency, i.e. Allow Quorum read with Eventual Consistency Account + /// To enable LocalQuorum Consistency, i.e. Allows Quorum read with Eventual Consistency Account or with Consistent Prefix Account. /// Use By Compute Only /// internal CosmosClientBuilder AllowUpgradeConsistencyToLocalQuorum() diff --git a/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs b/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs index 14256919c6..58a7a55ddb 100644 --- a/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs +++ b/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs @@ -10,12 +10,12 @@ namespace Microsoft.Azure.Cosmos internal static class ValidationHelpers { /// - /// If isLocalQuorumConsistency flag is true, it allows only "Quorum Read with Eventual Consistency Account". + /// If isLocalQuorumConsistency flag is true, it allows only "Quorum Read with either an Eventual Consistency Account or a Consistent Prefix Account". /// It goes through a validation where it doesn't allow strong consistency over weaker consistency. /// /// Account Level Consistency /// Request/Client Level Consistency - /// Allows Quorum Read with Eventual Account + /// Allows Quorum Read with Eventual or Consistent Prefix Account /// /// /// true/false @@ -36,12 +36,12 @@ public static bool IsValidConsistencyLevelOverwrite( } /// - /// If isLocalQuorumConsistency flag is true, it allows only "Quorum Read with Eventual Consistency Account". + /// If isLocalQuorumConsistency flag is true, it allows only "Quorum Read with either an Eventual Consistency Account or a Consistent Prefix Account". /// It goes through a validation where it doesn't allow strong consistency over weaker consistency. /// /// Account Level Consistency /// Request/Client Level Consistency - /// Allows Quorum Read with Eventual Account + /// Allows Quorum Read with Eventual or Consistent Prefix Account /// /// /// true/false @@ -107,7 +107,7 @@ private static bool IsValidConsistencyLevelOverwrite( } /// - /// Condition to check Quorum(i.e. Strong) read with eventual account + /// Condition to check Quorum(i.e. Strong) read with either an eventual consistency account or a consistent prefix account. /// /// /// @@ -119,7 +119,7 @@ private static bool IsLocalQuorumConsistency(Documents.ConsistencyLevel backendC OperationType? operationType, ResourceType? resourceType) { - if (backendConsistency != Documents.ConsistencyLevel.Eventual) + if (backendConsistency != Documents.ConsistencyLevel.Eventual && backendConsistency != Documents.ConsistencyLevel.ConsistentPrefix) { return false; } @@ -136,7 +136,8 @@ private static bool IsLocalQuorumConsistency(Documents.ConsistencyLevel backendC } if (!operationType.HasValue || - (operationType.HasValue && !(operationType == OperationType.Read || operationType == OperationType.ReadFeed))) + (operationType.HasValue && + !(operationType == OperationType.Read || operationType == OperationType.ReadFeed || operationType == OperationType.SqlQuery || operationType == OperationType.Query))) { return false; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs new file mode 100644 index 0000000000..2c9db33cec --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tests +{ + using System.Data; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class ValidationHelpersTest + { + [TestMethod] + [DataRow(true, ConsistencyLevel.Eventual, ConsistencyLevel.Strong)] + [DataRow(true, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong)] + [DataRow(false, ConsistencyLevel.Eventual, ConsistencyLevel.BoundedStaleness)] + [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.BoundedStaleness)] + [DataRow(false, ConsistencyLevel.Session, ConsistencyLevel.Strong)] + [DataRow(false, ConsistencyLevel.BoundedStaleness, ConsistencyLevel.Strong)] + public void TestIsValidConsistencyLevelOverwrite(bool isValidConsistencyLevelOverwrite, + ConsistencyLevel backendConsistencyLevel, + ConsistencyLevel desiredConsistencyLevel) + { + bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, + desiredConsistencyLevel, + true, + Documents.OperationType.Read, + Documents.ResourceType.Document); + + Assert.AreEqual(isValidConsistencyLevelOverwrite, result); + } + + [TestMethod] + [DataRow(false, ConsistencyLevel.Eventual, ConsistencyLevel.Strong)] + [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong)] + public void TestIsValidConsistencyLevelOverwrite_OnlyWhenSpecifyingExplicitOverwrite(bool isValidConsistencyLevelOverwrite, + ConsistencyLevel backendConsistencyLevel, + ConsistencyLevel desiredConsistencyLevel) + { + bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, + desiredConsistencyLevel, + false, + Documents.OperationType.Read, + Documents.ResourceType.Document); + + Assert.AreEqual(isValidConsistencyLevelOverwrite, result); + } + + [TestMethod] + [DataRow(true, ConsistencyLevel.Eventual, ConsistencyLevel.Strong, Documents.OperationType.Read)] + [DataRow(true, ConsistencyLevel.Eventual, ConsistencyLevel.Strong, Documents.OperationType.ReadFeed)] + [DataRow(true, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.Query)] + [DataRow(true, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.SqlQuery)] + [DataRow(false, ConsistencyLevel.Eventual, ConsistencyLevel.Strong, Documents.OperationType.QueryPlan)] + [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.Create)] + [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.Batch)] + public void TestIsValidConsistencyLevelOverwrite_OnlyAllowedForCertainOperationTypes( + bool isValidConsistencyLevelOverwrite, + ConsistencyLevel backendConsistencyLevel, + ConsistencyLevel desiredConsistencyLevel, + dynamic operationType) + { + bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, + desiredConsistencyLevel, + true, + (Documents.OperationType) operationType, + Documents.ResourceType.Document); + + Assert.AreEqual(isValidConsistencyLevelOverwrite, result); + } + } +} \ No newline at end of file From 8a537ce93a8ee3074e3eb35a5339675a6b93a90c Mon Sep 17 00:00:00 2001 From: aavasthy <113193425+aavasthy@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:39:11 -0800 Subject: [PATCH 052/164] 3.32.0: Adds new SDK version and contract files (#3687) * 3.32.0: Adds new SDK version and contract files * 3.32.0: Adds new SDK version and contract files * Updating changelog version * Updating changelog version * Added more commits to changelog and updated release contract * Added documentation tags PR in changelog * Updated changelog based on reviews * Updated PR decsription in changelog * Update changelog.md Updated full fidelity change description Co-authored-by: Matias Quaranta --------- Co-authored-by: Matias Quaranta --- Directory.Build.props | 4 +- .../contracts/API_3.32.0-preview.txt | 1531 +++++++++++++++++ .../contracts/API_3.32.0.txt | 1478 ++++++++++++++++ changelog.md | 34 + 4 files changed, 3045 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.0-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.0.txt diff --git a/Directory.Build.props b/Directory.Build.props index 2891c05569..887ca2d334 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.31.2 - 3.31.2 + 3.32.0 + 3.32.0 preview 3.30.1 2.0.1 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.0-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.0-preview.txt new file mode 100644 index 0000000000..69b7a4b83e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.0-preview.txt @@ -0,0 +1,1531 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.0.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.0.txt new file mode 100644 index 0000000000..5218206b0e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.0.txt @@ -0,0 +1,1478 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index add5a1de66..aa2aaad67d 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,40 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.32.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.0) - 2023-02-03 +#### Fixed +- [#3466](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3466) ClientRetryPolicy: Fixes behavior to Meta-data write operations in multimaster accounts +- [#3498](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3498) PartitionKey: Fixes NullRef in toString handling for None for PartitionKey.ToString() +- [#3385](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3385) Query: Fixes LINQ ToString got absorbed during translation +- [#3406](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3406) Query: Fixes LINQ to use custom serializer to serialize constant values in Query +- [#3496](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3496) Documentation: Adds XML comment to Database.ReadThroughputAsync definition +- [#3508](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3508), [#3640](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3640) CosmosClient Initialization: Refactors implementation for opening Rntbd connections to backend replica nodes in Direct mode +- [#3519](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3519) Diagnostics: Removes unused properties and reduces size +- [#3495](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3495) Query: Fixes partition range evaluation for spatial queries +- [#3399](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3399) Query: Fixes default to BadRequestException in case of internal errors in ServiceInterop +- [#3574](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3574) Query: Fixes incorrect FeedResponse.Count when result contains undefined elements +- [#3577](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3577) Trace: Fixes Tracing/diagnostics hour-times to 24Hours +- [#3632](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3632) Query: Fixes handling of CosmosUndefined, CosmosGuid and CosmosBinary in unordered DISTINCT +- [#3640](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3640) Token expiration: Fixes token expired errors happening on some environments +- [#3645](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3645) Change Feed Processor: Fixes behavior with StartTime on Local +- [#3643](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3643) Documentation: Fixed CosmosClientBuilder.WithConnectionModeGateway documentation +- [#3579](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3579) Documentation: Fixes EUAP in Comments + +#### Added +- [#3566](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3566) Change Feed Processor: Adds support for Resource Tokens +- [#3555](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3555) Availability: Adds HTTP timeouts with request-level cross-region retry +- [#3509](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3509) Query: Adds ALL Scalar Expression +- [#3656](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3656) Region Availability: Adds Poland Central Region For Public Usage. +- [#3636](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3636) CosmosClientOptions: Adds ServerCertificateCustomValidationCallback for Http and TCP + +### [3.32.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.0-preview) - 2023-02-03 + +#### Added +- [#3596](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3596) Full Fidelity Change Feed: Adds new LatestVersion to ChangeFeedMode. `FullFidelity` is now renamed to `AllVersionsAndDeletes`. +- [#3598](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3598) AI integration: Adds Distributed Tracing support. Enabled by default, which can be disabled through + `CosmosClientOptions.IsDistributedTracingEnabled` + + ### [3.31.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.2) - 2022-11-03 ### [3.31.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.31.2-preview) - 2022-11-03 From bf9a6d499579fc9f9e46804ae99f13eb00fc3eba Mon Sep 17 00:00:00 2001 From: Justine Cocchi Date: Thu, 9 Feb 2023 08:40:18 -0800 Subject: [PATCH 053/164] [Internal] Samples: Adds change feed pull model samples (#3646) * add change feed pull samples * refactor appsettings validation * addressing pr comments * move task delay * update sample to use latest change feed mode names --------- Co-authored-by: Matias Quaranta --- ...FPullModelAllVersionsAndDeletesMode.csproj | 21 ++ .../Program.cs | 225 ++++++++++++++++++ .../CFPullModelLatestVersionMode.csproj | 21 ++ .../CFPullModelLatestVersionMode/Program.cs | 155 ++++++++++++ .../Usage/Cosmos.Samples.Usage.sln | 16 +- 5 files changed, 436 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/CFPullModelAllVersionsAndDeletesMode.csproj create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/Program.cs create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/CFPullModelLatestVersionMode.csproj create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/Program.cs diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/CFPullModelAllVersionsAndDeletesMode.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/CFPullModelAllVersionsAndDeletesMode.csproj new file mode 100644 index 0000000000..4cea61605d --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/CFPullModelAllVersionsAndDeletesMode.csproj @@ -0,0 +1,21 @@ + + + + Exe + net6.0 + Cosmos.Samples.CFPullModelAllVersionsAndDeletesMode + Cosmos.Samples.CFPullModelAllVersionsAndDeletesMode + latest + + + + + + + + + + PreserveNewest + + + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/Program.cs new file mode 100644 index 0000000000..69d28cbfae --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelAllVersionsAndDeletesMode/Program.cs @@ -0,0 +1,225 @@ +namespace CFPullModelAllVersionsAndDeletesMode +{ + using System; + using System.Net; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos; + using Microsoft.Extensions.Configuration; + using Newtonsoft.Json; + + class Program + { + private static readonly string databaseName = "db"; + private static readonly string containerName = "container"; + + static async Task Main() + { + try + { + IConfigurationRoot configuration = new ConfigurationBuilder() + .AddJsonFile("appSettings.json") + .Build(); + + string endpoint = configuration["EndPointUrl"]; + if (string.IsNullOrEmpty(endpoint)) + { + throw new ArgumentNullException("Please specify a valid EndPointUrl in the appSettings.json"); + } + + string authKey = configuration["AuthorizationKey"]; + if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) + { + throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); + } + + using (CosmosClient client = new CosmosClient(endpoint, authKey)) + { + Console.WriteLine($"Getting container reference for {containerName}."); + + ContainerProperties properties = new ContainerProperties(containerName, partitionKeyPath: "/id"); + + await client.CreateDatabaseIfNotExistsAsync(databaseName); + Container container = await client.GetDatabase(databaseName).CreateContainerIfNotExistsAsync(properties); + + string allVersionsContinuationToken = await CreateAllVersionsAndDeletesChangeFeedIterator(container); + + await IngestData(container); + await DeleteData(container); + + await ReadAllVersionsAndDeletesChangeFeed(container, allVersionsContinuationToken); + } + } + finally + { + Console.WriteLine("End of demo."); + } + } + + static async Task CreateAllVersionsAndDeletesChangeFeedIterator(Container container) + { + Console.WriteLine("Creating ChangeFeedIterator to read the change feed in All Versions and Deletes mode."); + + // + using (FeedIterator allVersionsIterator = container + .GetChangeFeedIterator(ChangeFeedStartFrom.Now(), ChangeFeedMode.AllVersionsAndDeletes)) + { + while (allVersionsIterator.HasMoreResults) + { + FeedResponse response = await allVersionsIterator.ReadNextAsync(); + + if (response.StatusCode == HttpStatusCode.NotModified) + { + return response.ContinuationToken; + } + } + } + // + + return null; + } + + static async Task IngestData(Container container) + { + Console.Clear(); + + Console.WriteLine("Press any key to begin ingesting data."); + Console.ReadKey(true); + + Console.WriteLine("Press any key to stop."); + + while (!Console.KeyAvailable) + { + Item item = GenerateItem(); + await container.UpsertItemAsync(item, new PartitionKey(item.Id)); + Console.Write("*"); + } + } + + static async Task DeleteData(Container container) + { + Console.ReadKey(true); + Console.Clear(); + + Console.WriteLine("Press any key to begin deleting data."); + Console.ReadKey(true); + + Console.WriteLine("Press any key to stop"); + + int deleteItemCounter = 0; + while (!Console.KeyAvailable) + { + deleteItemCounter++; + try + { + await container.DeleteItemAsync( + partitionKey: new PartitionKey(deleteItemCounter.ToString()), + id: deleteItemCounter.ToString()); + Console.Write("-"); + } + catch (CosmosException cosmosException) when (cosmosException.StatusCode == HttpStatusCode.NotFound) + { + // Deleting by a random id that might not exist in the container will likely throw errors that are safe to ignore for this purpose + } + } + } + + static async Task ReadAllVersionsAndDeletesChangeFeed(Container container, string allVersionsContinuationToken) + { + Console.ReadKey(true); + Console.Clear(); + + Console.WriteLine("Press any key to start reading the change feed in All Versions and Deletes mode."); + Console.ReadKey(true); + + Console.WriteLine("Press any key to stop."); + + // + using (FeedIterator allVersionsIterator = container.GetChangeFeedIterator(ChangeFeedStartFrom.ContinuationToken(allVersionsContinuationToken), ChangeFeedMode.AllVersionsAndDeletes, new ChangeFeedRequestOptions { PageSizeHint = 10 })) + { + while (allVersionsIterator.HasMoreResults) + { + FeedResponse response = await allVersionsIterator.ReadNextAsync(); + + if (response.StatusCode == HttpStatusCode.NotModified) + { + Console.WriteLine($"No new changes"); + await Task.Delay(1000); + } + else + { + foreach (AllVersionsAndDeletesCFResponse r in response) + { + // if operaiton is delete + if (r.Metadata.OperationType == "delete") + { + Item item = r.Previous; + + if (r.Metadata.TimeToLiveExpired == true) + { + Console.WriteLine($"Operation: {r.Metadata.OperationType} (due to TTL). Item id: {item.Id}. Previous value: {item.Value}"); + } + else + { + Console.WriteLine($"Operation: {r.Metadata.OperationType} (not due to TTL). Item id: {item.Id}. Previous value: {item.Value}"); + } + } + // if operation is create or replace + else + { + Item item = r.Current; + + Console.WriteLine($"Operation: {r.Metadata.OperationType}. Item id: {item.Id}. Current value: {item.Value}"); + } + } + } + + if (Console.KeyAvailable) + { + break; + } + } + } + // + } + + private static Item GenerateItem() + { + Random random = new Random(); + + return new Item + { + Id = random.Next(1, 999).ToString(), + Value = random.Next(1, 100000), + }; + } + } + + internal class AllVersionsAndDeletesCFResponse + { + [JsonProperty("current")] + public Item Current { get; set; } + + [JsonProperty("previous")] + public Item Previous { get; set; } + + [JsonProperty("metadata")] + public Metadata Metadata { get; set; } + } + + internal class Item + { + [JsonProperty("id")] + public string Id { get; set; } + + public double Value { get; set; } + } + + internal class Metadata + { + [JsonProperty("operationType")] + public string OperationType { get; set; } + + [JsonProperty("timeToLiveExpired")] + public Boolean TimeToLiveExpired { get; set; } + } +} diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/CFPullModelLatestVersionMode.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/CFPullModelLatestVersionMode.csproj new file mode 100644 index 0000000000..66a155278d --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/CFPullModelLatestVersionMode.csproj @@ -0,0 +1,21 @@ + + + + Exe + net6.0 + Cosmos.Samples.CFPullModelLatestVersionMode + Cosmos.Samples.CFPullModelLatestVersionMode + latest + + + + + + + + + + PreserveNewest + + + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/Program.cs new file mode 100644 index 0000000000..f87a0e1eff --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/CFPullModelLatestVersionMode/Program.cs @@ -0,0 +1,155 @@ +namespace CFPullModelLatestVersionMode +{ + using System; + using System.Collections.Generic; + using System.Net; + using System.Threading; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos; + using Microsoft.Extensions.Configuration; + using Newtonsoft.Json; + + class Program + { + private static readonly string databaseName = "db"; + private static readonly string containerName = "container"; + + static async Task Main() + { + try + { + IConfigurationRoot configuration = new ConfigurationBuilder() + .AddJsonFile("appSettings.json") + .Build(); + + string endpoint = configuration["EndPointUrl"]; + if (string.IsNullOrEmpty(endpoint)) + { + throw new ArgumentNullException("Please specify a valid EndPointUrl in the appSettings.json"); + } + + string authKey = configuration["AuthorizationKey"]; + if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) + { + throw new ArgumentException("Please specify a valid AuthorizationKey in the appSettings.json"); + } + + using (CosmosClient client = new CosmosClient(endpoint, authKey)) + { + Console.WriteLine($"Getting container reference for {containerName}."); + + ContainerProperties properties = new ContainerProperties(containerName, partitionKeyPath: "/id"); + + await client.CreateDatabaseIfNotExistsAsync(databaseName); + Container container = await client.GetDatabase(databaseName).CreateContainerIfNotExistsAsync(properties); + + string latestVersionContinuationToken = await CreateLatestVersionChangeFeedIterator(container); + + await IngestData(container); + await ReadLatestVersionChangeFeed(container, latestVersionContinuationToken); + } + } + finally + { + Console.WriteLine("End of demo."); + } + } + + static async Task CreateLatestVersionChangeFeedIterator(Container container) + { + Console.WriteLine("Creating ChangeFeedIterator to read the change feed in Latest Version mode."); + + // + using (FeedIterator latestVersionIterator = container.GetChangeFeedIterator(ChangeFeedStartFrom.Now(), ChangeFeedMode.LatestVersion)) + { + while (latestVersionIterator.HasMoreResults) + { + FeedResponse response = await latestVersionIterator.ReadNextAsync(); + + if (response.StatusCode == HttpStatusCode.NotModified) + { + return response.ContinuationToken; + } + } + } + // + + return null; + } + + static async Task ReadLatestVersionChangeFeed(Container container, string latestVersionContinuationToken) + { + Console.ReadKey(true); + Console.Clear(); + + Console.WriteLine("Press any key to begin reading the change feed in Latest Version mode."); + Console.ReadKey(true); + + Console.WriteLine("Press any key to stop."); + + // + using (FeedIterator latestVersionIterator = container.GetChangeFeedIterator(ChangeFeedStartFrom.ContinuationToken(latestVersionContinuationToken), ChangeFeedMode.LatestVersion, new ChangeFeedRequestOptions { PageSizeHint = 10 })) + { + while (latestVersionIterator.HasMoreResults) + { + FeedResponse response = await latestVersionIterator.ReadNextAsync(); + + if (response.StatusCode == HttpStatusCode.NotModified) + { + Console.WriteLine($"No new changes"); + await Task.Delay(1000); + } + else + { + foreach (Item item in response) + { + Console.WriteLine($"Change in item: {item.Id}. New value: {item.Value}."); + } + } + + if (Console.KeyAvailable) + { + break; + } + } + } + // + } + + static async Task IngestData(Container container) + { + Console.Clear(); + + Console.WriteLine("Press any key to begin ingesting data."); + Console.ReadKey(true); + + Console.WriteLine("Press any key to stop."); + + while (!Console.KeyAvailable) + { + Item item = GenerateItem(); + await container.UpsertItemAsync(item, new PartitionKey(item.Id)); + Console.Write("*"); + } + } + + private static Item GenerateItem() + { + Random random = new Random(); + + return new Item + { + Id = random.Next(1, 999).ToString(), + Value = random.Next(1, 100000), + }; + } + } + + internal class Item + { + [JsonProperty("id")] + public string Id { get; set; } + + public double Value { get; set; } + } +} diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln b/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln index 954c0c606a..de1e1f4731 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln +++ b/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29411.108 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33205.214 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DatabaseManagement", "DatabaseManagement\DatabaseManagement.csproj", "{F972386A-B03D-4453-88C7-948CB107C029}" EndProject @@ -47,6 +47,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson", "SystemTex EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReEncryption", "ReEncryption\ReEncryption.csproj", "{AD6DEC94-EF8E-4C42-8A99-B98E101F933D}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CFPullModelAllVersionsAndDeletesMode", "CFPullModelAllVersionsAndDeletesMode\CFPullModelAllVersionsAndDeletesMode.csproj", "{7D808579-73BD-4D60-A7A5-D88FFF568C37}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CFPullModelLatestVersionMode", "CFPullModelLatestVersionMode\CFPullModelLatestVersionMode.csproj", "{985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -141,6 +145,14 @@ Global {AD6DEC94-EF8E-4C42-8A99-B98E101F933D}.Debug|Any CPU.Build.0 = Debug|Any CPU {AD6DEC94-EF8E-4C42-8A99-B98E101F933D}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD6DEC94-EF8E-4C42-8A99-B98E101F933D}.Release|Any CPU.Build.0 = Release|Any CPU + {7D808579-73BD-4D60-A7A5-D88FFF568C37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7D808579-73BD-4D60-A7A5-D88FFF568C37}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7D808579-73BD-4D60-A7A5-D88FFF568C37}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7D808579-73BD-4D60-A7A5-D88FFF568C37}.Release|Any CPU.Build.0 = Release|Any CPU + {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE From 16caa1b9d40ab639085d932ec887474a8498aeb2 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Mon, 13 Feb 2023 09:44:12 -0800 Subject: [PATCH 054/164] [Internal] Tests: Refactors emulator CI (#3688) --- .../Batch/BatchSinglePartitionKeyTests.cs | 8 +- .../Batch/BatchTestBase.cs | 52 ++-- .../Batch/CosmosItemBulkTests.cs | 6 +- .../ChangeFeed/BaseChangeFeedClientHelper.cs | 2 +- .../ChangeFeed/DynamicStreamTests.cs | 2 +- .../ChangeFeed/DynamicTests.cs | 2 +- .../ChangeFeed/EstimatorTests.cs | 2 +- .../ChangeFeed/SmokeTests.cs | 2 +- .../ClientCreateAndInitializeTest.cs | 23 +- .../ClientTelemetryTests.cs | 6 +- .../ClientTests.cs | 91 +++--- .../CosmosAadTests.cs | 150 ++++----- .../CosmosBasicQueryTests.cs | 37 ++- .../CosmosContainerTests.cs | 90 +++--- .../CosmosContentResponseTests.cs | 24 +- .../CosmosDatabaseTests.cs | 64 ++-- .../CosmosItemIdEncodingTestsBase.cs | 6 +- .../CosmosItemSessionTokenTests.cs | 2 +- .../CosmosItemTests.cs | 23 +- .../CosmosMultiHashTest.cs | 8 +- .../CosmosNotFoundTests.cs | 3 +- .../CosmosPermissionTests.cs | 52 ++-- .../CosmosReadFeedTests.cs | 2 +- .../CosmosReadManyItemsTests.cs | 10 +- .../CosmosUserTests.cs | 44 +-- .../DocumentClientUnitTests.cs | 19 +- .../FeedToken/ChangeFeedIteratorCoreTests.cs | 12 +- .../FeedToken/QueryFeedTokenTests.cs | 2 +- .../Fluent/ContainerSettingsTests.cs | 4 +- .../GatewayClientSideRequestStatsTests.cs | 1 - .../GatewayTests.cs | 218 ++++++------- .../HeadersValidationTests.cs | 49 ++- .../IndexMetricsParserBaselineTest.cs | 2 + .../InternalFriendsTest.cs | 8 +- .../LinqAggregateFunctionsBaselineTests.cs | 2 + .../LinqAttributeContractBaselineTests.cs | 6 +- .../LinqGeneralBaselineTests.cs | 2 + .../LinqSQLTranslationBaselineTests.cs | 2 + .../LinqTranslationBaselineTests.cs | 2 + ...TranslationWithCustomSerializerBaseline.cs | 2 + .../MultiRegionStrongTests.cs | 286 ------------------ .../NameRoutingTests.cs | 47 +-- .../OfferTests.cs | 8 +- .../PartitionKeyRangeCacheTests.cs | 18 +- .../Query/QueryTestsBase.cs | 20 +- .../QueryTests.cs | 10 + .../SmokeTests.cs | 7 + .../SpatialTest.cs | 12 +- .../StoredProcedureTests.cs | 9 +- .../SummaryDiagnosticsTests.cs | 1 + .../EndToEndTraceWriterBaselineTests.cs | 4 + .../TransportWrapperTests.cs | 9 +- .../TriggersTests.cs | 4 +- .../UniqueIndexTests.cs | 2 + .../UserDefinedFunctionsTests.cs | 4 +- .../Utils/BaseCosmosClientHelper.cs | 48 ++- templates/emulator-setup.yml | 66 ++-- 57 files changed, 689 insertions(+), 908 deletions(-) delete mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/MultiRegionStrongTests.cs diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs index d8cc17966d..675ed6b20e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs @@ -19,15 +19,15 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests public class BatchSinglePartitionKeyTests : BatchTestBase { [ClassInitialize] - public static void ClassInitialize(TestContext context) + public static async Task ClassInitialize(TestContext context) { - BatchTestBase.ClassInit(context); + await BatchTestBase.ClassInitAsync(context); } [ClassCleanup] - public static void ClassCleanup() + public static async Task ClassCleanup() { - BatchTestBase.ClassClean(); + await BatchTestBase.ClassCleanAsync(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs index 89b00f8c57..929ed2cfa9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchTestBase.cs @@ -63,41 +63,40 @@ public class BatchTestBase protected TestDoc TestDocPk1ExistingD { get; set; } protected TestDoc TestDocPk1ExistingE { get; set; } - public static void ClassInit(TestContext context) + public static async Task ClassInitAsync(TestContext context) { - InitializeDirectContainers(); + await InitializeDirectContainers(); InitializeGatewayContainers(); - InitializeSharedThroughputContainer(); + await InitializeSharedThroughputContainer(); } - private static void InitializeDirectContainers() + private static async Task InitializeDirectContainers() { - + BatchTestBase.Client = TestCommon.CreateCosmosClient(builder => builder.WithConsistencyLevel(Cosmos.ConsistencyLevel.Session)); - BatchTestBase.Database = BatchTestBase.Client.CreateDatabaseAsync(Guid.NewGuid().ToString()) - .GetAwaiter().GetResult().Database; + BatchTestBase.Database = await BatchTestBase.Client.CreateDatabaseAsync(Guid.NewGuid().ToString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition(); partitionKeyDefinition.Paths.Add("/Status"); - BatchTestBase.LowThroughputJsonContainer = BatchTestBase.Database.CreateContainerAsync( + BatchTestBase.LowThroughputJsonContainer = (await BatchTestBase.Database.CreateContainerAsync( new ContainerProperties() { Id = Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }, - throughput: 400).GetAwaiter().GetResult().Container; + throughput: 400)).Container; - BatchTestBase.PartitionKeyDefinition = ((ContainerInternal)(ContainerInlineCore)BatchTestBase.LowThroughputJsonContainer).GetPartitionKeyDefinitionAsync(CancellationToken.None).GetAwaiter().GetResult(); + BatchTestBase.PartitionKeyDefinition = await ((ContainerInternal)(ContainerInlineCore)BatchTestBase.LowThroughputJsonContainer).GetPartitionKeyDefinitionAsync(CancellationToken.None); // Create a container with at least 2 physical partitions for effective cross-partition testing - BatchTestBase.JsonContainer = BatchTestBase.Database.CreateContainerAsync( + BatchTestBase.JsonContainer = (await BatchTestBase.Database.CreateContainerAsync( new ContainerProperties() { Id = Guid.NewGuid().ToString(), PartitionKey = BatchTestBase.PartitionKeyDefinition }, - throughput: 12000).GetAwaiter().GetResult().Container; + throughput: 12000)).Container; Serialization.HybridRow.Schemas.Schema testSchema = TestDoc.GetSchema(); Namespace testNamespace = new Namespace() @@ -127,9 +126,9 @@ private static void InitializeDirectContainers() schematizedContainerProperties.SchemaPolicy = schemaPolicy; - BatchTestBase.SchematizedContainer = BatchTestBase.Database.CreateContainerAsync( + BatchTestBase.SchematizedContainer = (await BatchTestBase.Database.CreateContainerAsync( schematizedContainerProperties, - throughput: 12000).GetAwaiter().GetResult().Container; + throughput: 12000)).Container; } private static void InitializeGatewayContainers() @@ -142,20 +141,18 @@ private static void InitializeGatewayContainers() BatchTestBase.GatewaySchematizedContainer = BatchTestBase.GatewayDatabase.GetContainer(BatchTestBase.SchematizedContainer.Id); } - private static void InitializeSharedThroughputContainer() + private static async Task InitializeSharedThroughputContainer() { - CosmosClient client = TestCommon.CreateCosmosClient(); - Cosmos.Database db = client.CreateDatabaseAsync(string.Format("Shared_{0}", Guid.NewGuid().ToString("N")), throughput: 20000).GetAwaiter().GetResult().Database; + Cosmos.Database db = (await BatchTestBase.Client.CreateDatabaseAsync(string.Format("Shared_{0}", Guid.NewGuid().ToString("N")), throughput: 20000)).Database; for (int index = 0; index < 5; index++) { - ContainerResponse containerResponse = db.CreateContainerAsync( + ContainerResponse containerResponse = await db.CreateContainerAsync( new ContainerProperties { Id = Guid.NewGuid().ToString(), PartitionKey = BatchTestBase.PartitionKeyDefinition - }) - .GetAwaiter().GetResult(); + }); Assert.AreEqual(true, bool.Parse(containerResponse.Headers.Get(WFConstants.BackendHeaders.ShareThroughput))); @@ -168,24 +165,25 @@ private static void InitializeSharedThroughputContainer() BatchTestBase.SharedThroughputDatabase = db; } - public static void ClassClean() + public static async Task ClassCleanAsync() { - if (BatchTestBase.Client == null) + if (BatchTestBase.Database != null) { - return; + await BatchTestBase.Database.DeleteStreamAsync(); } - if (BatchTestBase.Database != null) + if (BatchTestBase.GatewayDatabase != null) { - BatchTestBase.Database.DeleteStreamAsync().GetAwaiter().GetResult(); + await BatchTestBase.GatewayDatabase.DeleteStreamAsync(); } if (BatchTestBase.SharedThroughputDatabase != null) { - BatchTestBase.SharedThroughputDatabase.DeleteStreamAsync().GetAwaiter().GetResult(); + await BatchTestBase.SharedThroughputDatabase.DeleteStreamAsync(); } - BatchTestBase.Client.Dispose(); + BatchTestBase.Client?.Dispose(); + BatchTestBase.GatewayClient?.Dispose(); } protected virtual async Task CreateJsonTestDocsAsync(Container container) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/CosmosItemBulkTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/CosmosItemBulkTests.cs index 0e818611a8..2658b00dfc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/CosmosItemBulkTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/CosmosItemBulkTests.cs @@ -18,6 +18,7 @@ public class CosmosItemBulkTests { private Container container; private Database database; + private CosmosClient client; [TestInitialize] public async Task TestInitialize() @@ -26,9 +27,9 @@ public async Task TestInitialize() { AllowBulkExecution = true }; - CosmosClient client = TestCommon.CreateCosmosClient(clientOptions); + this.client = TestCommon.CreateCosmosClient(clientOptions); - DatabaseResponse response = await client.CreateDatabaseIfNotExistsAsync(Guid.NewGuid().ToString()); + DatabaseResponse response = await this.client.CreateDatabaseIfNotExistsAsync(Guid.NewGuid().ToString()); this.database = response.Database; ContainerResponse containerResponse = await this.database.CreateContainerAsync(Guid.NewGuid().ToString(), "/pk", 10000); @@ -39,6 +40,7 @@ public async Task TestInitialize() public async Task Cleanup() { await this.database.DeleteAsync(); + this.client?.Dispose(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/BaseChangeFeedClientHelper.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/BaseChangeFeedClientHelper.cs index 14c362ee90..12cd3768ee 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/BaseChangeFeedClientHelper.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/BaseChangeFeedClientHelper.cs @@ -16,7 +16,7 @@ public class BaseChangeFeedClientHelper : BaseCosmosClientHelper public async Task ChangeFeedTestInit(string leaseContainerPk = "/id") { - await base.TestInit(customizeClientBuilder: (builder) => builder.WithContentResponseOnWrite(false)); + await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false, customizeClientBuilder: (builder) => builder.WithContentResponseOnWrite(false)); ContainerResponse response = await this.database.CreateContainerAsync( new ContainerProperties(id: "leases", partitionKeyPath: leaseContainerPk), diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicStreamTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicStreamTests.cs index dba803d10b..f63ef4dbda 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicStreamTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicStreamTests.cs @@ -147,7 +147,7 @@ await NonPartitionedContainerHelper.CreateNonPartitionedContainer( this.database, "fixedLeases"); - Container fixedLeasesContainer = this.cosmosClient.GetContainer(this.database.Id, "fixedLeases"); + Container fixedLeasesContainer = this.GetClient().GetContainer(this.database.Id, "fixedLeases"); try { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicTests.cs index d7bf0d12f5..cefb823caa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/DynamicTests.cs @@ -168,7 +168,7 @@ await NonPartitionedContainerHelper.CreateNonPartitionedContainer( this.database, "fixedLeases"); - Container fixedLeasesContainer = this.cosmosClient.GetContainer(this.database.Id, "fixedLeases"); + Container fixedLeasesContainer = this.GetClient().GetContainer(this.database.Id, "fixedLeases"); try { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/EstimatorTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/EstimatorTests.cs index ce139a47a4..7c92ef80c2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/EstimatorTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/EstimatorTests.cs @@ -58,7 +58,7 @@ public async Task WhenNoLeasesExist() [TestMethod] public async Task StartAsync_ShouldThrowIfContainerDoesNotExist() { - ChangeFeedProcessor estimator = this.cosmosClient.GetContainer(this.database.Id, "DoesNotExist") + ChangeFeedProcessor estimator = this.GetClient().GetContainer(this.database.Id, "DoesNotExist") .GetChangeFeedEstimatorBuilder("test", (long estimation, CancellationToken token) => { return Task.CompletedTask; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs index b4460b6ad6..1291cc0b57 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ChangeFeed/SmokeTests.cs @@ -322,7 +322,7 @@ public async Task Schema_OnV2MigrationMaintainPartitionId() [TestMethod] public async Task NotExistentLeaseContainer() { - Container notFoundContainer = this.cosmosClient.GetContainer(this.database.Id, "NonExistent"); + Container notFoundContainer = this.GetClient().GetContainer(this.database.Id, "NonExistent"); ChangeFeedProcessor processor = this.Container .GetChangeFeedProcessorBuilder("test", (IReadOnlyCollection docs, CancellationToken token) => Task.CompletedTask) .WithInstanceName("random") diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs index 0ea1e4d6fd..e977a8b459 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs @@ -23,9 +23,8 @@ public class ClientCreateAndInitializeTest : BaseCosmosClientHelper [TestInitialize] public async Task TestInitialize() { - this.cosmosClient = TestCommon.CreateCosmosClient(useGateway: false); - this.database = await this.cosmosClient.CreateDatabaseAsync( - id: "ClientCreateAndInitializeDatabase"); + await this.TestInit(); + ContainerResponse response = await this.database.CreateContainerAsync( new ContainerProperties(id: "ClientCreateAndInitializeContainer", partitionKeyPath: PartitionKey), throughput: 20000, @@ -67,7 +66,7 @@ public async Task CreateAndInitializeTest() (string endpoint, string authKey) = TestCommon.GetAccountInfo(); List<(string, string)> containers = new List<(string, string)> - { ("ClientCreateAndInitializeDatabase", "ClientCreateAndInitializeContainer")}; + { (this.database.Id, "ClientCreateAndInitializeContainer")}; CosmosClientOptions cosmosClientOptions = new CosmosClientOptions { @@ -78,7 +77,7 @@ public async Task CreateAndInitializeTest() Assert.IsNotNull(cosmosClient); int httpCallsMadeAfterCreation = httpCallsMade; - ContainerInternal container = (ContainerInternal)cosmosClient.GetContainer("ClientCreateAndInitializeDatabase", "ClientCreateAndInitializeContainer"); + ContainerInternal container = (ContainerInternal)cosmosClient.GetContainer(this.database.Id, "ClientCreateAndInitializeContainer"); ItemResponse readResponse = await container.ReadItemAsync("1", new Cosmos.PartitionKey("Status1")); string diagnostics = readResponse.Diagnostics.ToString(); Assert.IsTrue(diagnostics.Contains("\"ConnectionMode\":\"Direct\"")); @@ -101,14 +100,14 @@ public async Task CreateAndInitializeWithCosmosClientBuilderTest() (string endpoint, string authKey) = TestCommon.GetAccountInfo(); List<(string, string)> containers = new List<(string, string)> - { ("ClientCreateAndInitializeDatabase", "ClientCreateAndInitializeContainer")}; + { (this.database.Id, "ClientCreateAndInitializeContainer")}; CosmosClientBuilder builder = new CosmosClientBuilder(endpoint, authKey).WithHttpClientFactory(() => new HttpClient(httpClientHandlerHelper)); CosmosClient cosmosClient = await builder.BuildAndInitializeAsync(containers); Assert.IsNotNull(cosmosClient); int httpCallsMadeAfterCreation = httpCallsMade; - ContainerInternal container = (ContainerInternal)cosmosClient.GetContainer("ClientCreateAndInitializeDatabase", "ClientCreateAndInitializeContainer"); + ContainerInternal container = (ContainerInternal)cosmosClient.GetContainer(this.database.Id, "ClientCreateAndInitializeContainer"); ItemResponse readResponse = await container.ReadItemAsync("1", new Cosmos.PartitionKey("Status1")); Assert.AreEqual(httpCallsMade, httpCallsMadeAfterCreation); cosmosClient.Dispose(); @@ -119,7 +118,7 @@ public async Task CreateAndInitializeWithCosmosClientBuilderTest() public async Task AuthIncorrectTest() { List<(string databaseId, string containerId)> containers = new List<(string databaseId, string containerId)> - { ("ClientCreateAndInitializeDatabase", "ClientCreateAndInitializeContainer")}; + { (this.database.Id, "ClientCreateAndInitializeContainer")}; string authKey = TestCommon.GetAccountInfo().authKey; CosmosClient cosmosClient = await CosmosClient.CreateAndInitializeAsync("https://127.0.0.1:0000/", authKey, containers); cosmosClient.Dispose(); @@ -148,7 +147,7 @@ public async Task DatabaseIncorrectTest() public async Task ContainerIncorrectTest() { List<(string databaseId, string containerId)> containers = new List<(string databaseId, string containerId)> - { ("ClientCreateAndInitializeDatabase", "IncorrectContainer")}; + { (this.database.Id, "IncorrectContainer")}; (string endpoint, string authKey) = TestCommon.GetAccountInfo(); try { @@ -218,7 +217,7 @@ public async Task CreateAndInitializeAsync_WithValidDatabaseAndContainer_ShouldO List<(string, string)> containers = new () { ( - "ClientCreateAndInitializeDatabase", + this.database.Id, "ClientCreateAndInitializeContainer" ) }; @@ -306,7 +305,7 @@ public async Task CreateAndInitializeAsync_WithGatewayModeEnabled_ShouldNotOpenC List<(string, string)> containers = new() { ( - "ClientCreateAndInitializeDatabase", + this.database.Id, "ClientCreateAndInitializeContainer" ) }; @@ -343,7 +342,7 @@ public async Task CreateAndInitializeAsync_WithValidDatabaseAndInvalidContainer_ List<(string, string)> containers = new() { ( - "ClientCreateAndInitializeDatabase", + this.database.Id, "ClientCreateAndInitializeInvalidContainer" ) }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs index 737be92e05..d9bd416530 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs @@ -1094,11 +1094,11 @@ private async Task CreateClientAndContainer(ConnectionMode mode, .WithHttpClientFactory(() => new HttpClient(handlerHelper)) .WithApplicationName("userAgentSuffix"); - this.cosmosClient = mode == ConnectionMode.Gateway + this.SetClient(mode == ConnectionMode.Gateway ? this.cosmosClientBuilder.WithConnectionModeGateway().Build() - : this.cosmosClientBuilder.Build(); + : this.cosmosClientBuilder.Build()); - this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()); + this.database = await this.GetClient().CreateDatabaseAsync(Guid.NewGuid().ToString()); return await this.database.CreateContainerAsync( id: Guid.NewGuid().ToString(), diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs index a2fcc1f598..1f419c4eb8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs @@ -401,42 +401,49 @@ internal async Task TestEtagOnUpsertOperation(bool useGateway, Protocol protocol using (DocumentClient client = TestCommon.CreateClient(false, Protocol.Tcp)) { Database db = (await client.CreateDatabaseAsync(new Database() { Id = Guid.NewGuid().ToString() })).Resource; - DocumentCollection coll = await TestCommon.CreateCollectionAsync(client, db, new DocumentCollection() + try { - Id = Guid.NewGuid().ToString(), - PartitionKey = new PartitionKeyDefinition() + DocumentCollection coll = await TestCommon.CreateCollectionAsync(client, db, new DocumentCollection() { - Paths = new System.Collections.ObjectModel.Collection() { "/id" } - } - }); + Id = Guid.NewGuid().ToString(), + PartitionKey = new PartitionKeyDefinition() + { + Paths = new System.Collections.ObjectModel.Collection() { "/id" } + } + }); - LinqGeneralBaselineTests.Book myBook = new LinqGeneralBaselineTests.Book(); - myBook.Id = Guid.NewGuid().ToString(); - myBook.Title = "Azure DocumentDB 101"; + LinqGeneralBaselineTests.Book myBook = new LinqGeneralBaselineTests.Book(); + myBook.Id = Guid.NewGuid().ToString(); + myBook.Title = "Azure DocumentDB 101"; - Document doc = (await client.CreateDocumentAsync(coll.SelfLink, myBook)).Resource; + Document doc = (await client.CreateDocumentAsync(coll.SelfLink, myBook)).Resource; - myBook.Title = "Azure DocumentDB 201"; - await client.ReplaceDocumentAsync(doc.SelfLink, myBook); + myBook.Title = "Azure DocumentDB 201"; + await client.ReplaceDocumentAsync(doc.SelfLink, myBook); - AccessCondition condition = new AccessCondition(); - condition.Type = AccessConditionType.IfMatch; - condition.Condition = doc.ETag; + AccessCondition condition = new AccessCondition(); + condition.Type = AccessConditionType.IfMatch; + condition.Condition = doc.ETag; - RequestOptions requestOptions = new RequestOptions(); - requestOptions.AccessCondition = condition; + RequestOptions requestOptions = new RequestOptions(); + requestOptions.AccessCondition = condition; - myBook.Title = "Azure DocumentDB 301"; + myBook.Title = "Azure DocumentDB 301"; - try - { - await client.UpsertDocumentAsync(coll.SelfLink, myBook, requestOptions); - Assert.Fail("Upsert Document should fail since the Etag is not matching."); + try + { + await client.UpsertDocumentAsync(coll.SelfLink, myBook, requestOptions); + Assert.Fail("Upsert Document should fail since the Etag is not matching."); + } + catch (Exception ex) + { + DocumentClientException innerException = ex as DocumentClientException; + Assert.AreEqual(HttpStatusCode.PreconditionFailed, innerException.StatusCode, "Invalid status code"); + } } - catch (Exception ex) + finally { - DocumentClientException innerException = ex as DocumentClientException; - Assert.AreEqual(HttpStatusCode.PreconditionFailed, innerException.StatusCode, "Invalid status code"); + await client.DeleteDatabaseAsync(db); } } } @@ -448,7 +455,7 @@ public async Task Verify_CertificateCallBackGetsCalled_ForTCP_HTTP() string endpoint = ConfigurationManager.AppSettings["GatewayEndpoint"]; int counter = 0; AzureKeyCredential masterKeyCredential = new AzureKeyCredential(authKey); - CosmosClient cosmosClient = new CosmosClient( + using CosmosClient cosmosClient = new CosmosClient( endpoint, masterKeyCredential, new CosmosClientOptions() @@ -458,19 +465,27 @@ public async Task Verify_CertificateCallBackGetsCalled_ForTCP_HTTP() ServerCertificateCustomValidationCallback = (X509Certificate2 cerf, X509Chain chain, SslPolicyErrors error) => { counter ++; return true; } }); - string databaseName = Guid.NewGuid().ToString(); - string databaseId = Guid.NewGuid().ToString(); Cosmos.Database database = null; - //HTTP callback - database = await cosmosClient.CreateDatabaseAsync(databaseId); - - Cosmos.Container container = await database.CreateContainerAsync(Guid.NewGuid().ToString(), "/id"); + try + { + string databaseName = Guid.NewGuid().ToString(); + string databaseId = Guid.NewGuid().ToString(); + + //HTTP callback + database = await cosmosClient.CreateDatabaseAsync(databaseId); + + Cosmos.Container container = await database.CreateContainerAsync(Guid.NewGuid().ToString(), "/id"); - //TCP callback - ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(); - ResponseMessage responseMessage = await container.CreateItemStreamAsync(TestCommon.SerializerCore.ToStream(item), new Cosmos.PartitionKey(item.id)); + //TCP callback + ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(); + ResponseMessage responseMessage = await container.CreateItemStreamAsync(TestCommon.SerializerCore.ToStream(item), new Cosmos.PartitionKey(item.id)); - Assert.IsTrue(counter >= 2); + Assert.IsTrue(counter >= 2); + } + finally + { + await database?.DeleteStreamAsync(); + } } @@ -786,6 +801,7 @@ await Assert.ThrowsExceptionAsync(async () => proxy = new TestWebProxy { Credentials = new NetworkCredential("test", "test") }; + cosmosClient.Dispose(); cosmosClient = new CosmosClient( endpoint, ConfigurationManager.AppSettings["MasterKey"], @@ -801,6 +817,7 @@ await Assert.ThrowsExceptionAsync(async () => { DatabaseResponse databaseResponse = await cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()); }); + cosmosClient.Dispose(); } [TestMethod] @@ -809,7 +826,7 @@ public async Task HttpClientFactorySmokeTest() HttpClient client = new HttpClient(); Mock> factory = new Mock>(); factory.Setup(f => f()).Returns(client); - CosmosClient cosmosClient = new CosmosClient( + using CosmosClient cosmosClient = new CosmosClient( ConfigurationManager.AppSettings["GatewayEndpoint"], ConfigurationManager.AppSettings["MasterKey"], new CosmosClientOptions diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosAadTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosAadTests.cs index c8ffd8cf29..01ffcdc674 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosAadTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosAadTests.cs @@ -29,98 +29,102 @@ public async Task AadMockTest(ConnectionMode connectionMode) int requestCount = 0; string databaseId = Guid.NewGuid().ToString(); string containerId = Guid.NewGuid().ToString(); - using (CosmosClient cosmosClient = TestCommon.CreateCosmosClient()) - { - Database database = await cosmosClient.CreateDatabaseAsync(databaseId); - Container container = await database.CreateContainerAsync( - containerId, - "/id"); - } + using CosmosClient cosmosClient = TestCommon.CreateCosmosClient(); + Database database = await cosmosClient.CreateDatabaseAsync(databaseId); + Container container = await database.CreateContainerAsync( + containerId, + "/id"); - - (string endpoint, string authKey) = TestCommon.GetAccountInfo(); - LocalEmulatorTokenCredential simpleEmulatorTokenCredential = new LocalEmulatorTokenCredential(authKey); - CosmosClientOptions clientOptions = new CosmosClientOptions() + try { - ConnectionMode = connectionMode, - ConnectionProtocol = connectionMode == ConnectionMode.Direct ? Protocol.Tcp : Protocol.Https, - }; + (string endpoint, string authKey) = TestCommon.GetAccountInfo(); + LocalEmulatorTokenCredential simpleEmulatorTokenCredential = new LocalEmulatorTokenCredential(authKey); + CosmosClientOptions clientOptions = new CosmosClientOptions() + { + ConnectionMode = connectionMode, + ConnectionProtocol = connectionMode == ConnectionMode.Direct ? Protocol.Tcp : Protocol.Https, + }; - if (connectionMode == ConnectionMode.Direct) - { - long lsn = 2; - clientOptions.TransportClientHandlerFactory = (transport) => new TransportClientWrapper(transport, - interceptorAfterResult: (request, storeResponse) => - { - // Force a barrier request on create item. - // There needs to be 2 regions and the GlobalCommittedLSN must be behind the LSN. - if (storeResponse.StatusCode == HttpStatusCode.Created) + if (connectionMode == ConnectionMode.Direct) + { + long lsn = 2; + clientOptions.TransportClientHandlerFactory = (transport) => new TransportClientWrapper(transport, + interceptorAfterResult: (request, storeResponse) => { - if (requestCount == 0) + // Force a barrier request on create item. + // There needs to be 2 regions and the GlobalCommittedLSN must be behind the LSN. + if (storeResponse.StatusCode == HttpStatusCode.Created) { - requestCount++; - lsn = storeResponse.LSN; - storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.NumberOfReadRegions, "2"); - storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.GlobalCommittedLSN, "0"); + if (requestCount == 0) + { + requestCount++; + lsn = storeResponse.LSN; + storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.NumberOfReadRegions, "2"); + storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.GlobalCommittedLSN, "0"); + } } - } - // Head request is the barrier request - // The GlobalCommittedLSN is set to -1 because the local emulator doesn't have geo-dr so it has to be - // overridden for the validation to succeed. - if (request.OperationType == Documents.OperationType.Head) - { - if (requestCount == 1) + // Head request is the barrier request + // The GlobalCommittedLSN is set to -1 because the local emulator doesn't have geo-dr so it has to be + // overridden for the validation to succeed. + if (request.OperationType == Documents.OperationType.Head) { - requestCount++; - storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.NumberOfReadRegions, "2"); - storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.GlobalCommittedLSN, lsn.ToString(CultureInfo.InvariantCulture)); + if (requestCount == 1) + { + requestCount++; + storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.NumberOfReadRegions, "2"); + storeResponse.Headers.Set(Documents.WFConstants.BackendHeaders.GlobalCommittedLSN, lsn.ToString(CultureInfo.InvariantCulture)); + } } - } - return storeResponse; - }); - } + return storeResponse; + }); + } - using CosmosClient aadClient = new CosmosClient( - endpoint, - simpleEmulatorTokenCredential, - clientOptions); + using CosmosClient aadClient = new CosmosClient( + endpoint, + simpleEmulatorTokenCredential, + clientOptions); - TokenCredentialCache tokenCredentialCache = ((AuthorizationTokenProviderTokenCredential)aadClient.AuthorizationTokenProvider).tokenCredentialCache; + TokenCredentialCache tokenCredentialCache = ((AuthorizationTokenProviderTokenCredential)aadClient.AuthorizationTokenProvider).tokenCredentialCache; - // The refresh interval changes slightly based on how fast machine calculate the interval based on the expire time. - Assert.IsTrue(15 <= tokenCredentialCache.BackgroundTokenCredentialRefreshInterval.Value.TotalMinutes, "Default background refresh should be 25% of the token life which is defaulted to 1hr"); - Assert.IsTrue(tokenCredentialCache.BackgroundTokenCredentialRefreshInterval.Value.TotalMinutes > 14.7 , "Default background refresh should be 25% of the token life which is defaulted to 1hr"); + // The refresh interval changes slightly based on how fast machine calculate the interval based on the expire time. + Assert.IsTrue(15 <= tokenCredentialCache.BackgroundTokenCredentialRefreshInterval.Value.TotalMinutes, "Default background refresh should be 25% of the token life which is defaulted to 1hr"); + Assert.IsTrue(tokenCredentialCache.BackgroundTokenCredentialRefreshInterval.Value.TotalMinutes > 14.7, "Default background refresh should be 25% of the token life which is defaulted to 1hr"); - Database aadDatabase = await aadClient.GetDatabase(databaseId).ReadAsync(); - Container aadContainer = await aadDatabase.GetContainer(containerId).ReadContainerAsync(); - ToDoActivity toDoActivity = ToDoActivity.CreateRandomToDoActivity(); - ItemResponse itemResponse = await aadContainer.CreateItemAsync( - toDoActivity, - new PartitionKey(toDoActivity.id)); + Database aadDatabase = await aadClient.GetDatabase(databaseId).ReadAsync(); + Container aadContainer = await aadDatabase.GetContainer(containerId).ReadContainerAsync(); + ToDoActivity toDoActivity = ToDoActivity.CreateRandomToDoActivity(); + ItemResponse itemResponse = await aadContainer.CreateItemAsync( + toDoActivity, + new PartitionKey(toDoActivity.id)); - // Gateway does the barrier requests so only direct mode needs to be validated. - if (connectionMode == ConnectionMode.Direct) - { - Assert.AreEqual(2, requestCount, "The barrier request was never called."); - } + // Gateway does the barrier requests so only direct mode needs to be validated. + if (connectionMode == ConnectionMode.Direct) + { + Assert.AreEqual(2, requestCount, "The barrier request was never called."); + } - toDoActivity.cost = 42.42; - await aadContainer.ReplaceItemAsync( - toDoActivity, - toDoActivity.id, - new PartitionKey(toDoActivity.id)); + toDoActivity.cost = 42.42; + await aadContainer.ReplaceItemAsync( + toDoActivity, + toDoActivity.id, + new PartitionKey(toDoActivity.id)); - await aadContainer.ReadItemAsync( - toDoActivity.id, - new PartitionKey(toDoActivity.id)); + await aadContainer.ReadItemAsync( + toDoActivity.id, + new PartitionKey(toDoActivity.id)); - await aadContainer.UpsertItemAsync(toDoActivity); + await aadContainer.UpsertItemAsync(toDoActivity); - await aadContainer.DeleteItemAsync( - toDoActivity.id, - new PartitionKey(toDoActivity.id)); + await aadContainer.DeleteItemAsync( + toDoActivity.id, + new PartitionKey(toDoActivity.id)); + } + finally + { + await database?.DeleteStreamAsync(); + } } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index 0f55c04ba8..7ae2b28cc6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -930,25 +930,32 @@ public async Task InvalidRangesOnQuery() DatabaseResponse databaseResponse = await cosmosClient.CreateDatabaseIfNotExistsAsync(DatabaseName, Throughput); Database database = databaseResponse.Database; - Container container = await database.DefineContainer(TestCollection, $"/{DefaultKey}") - .WithUniqueKey().Path($"/{DefaultKey}").Attach().CreateIfNotExistsAsync(); + try + { + Container container = await database.DefineContainer(TestCollection, $"/{DefaultKey}") + .WithUniqueKey().Path($"/{DefaultKey}").Attach().CreateIfNotExistsAsync(); - List queryKeys = new List(); + List queryKeys = new List(); - List testCollectionObjects = JsonConvert.DeserializeObject>( - "[{\"id\":\"70627503-7cb2-4a79-bcec-5e55765aa080\",\"objectKey\":\"message~phone~u058da564bfaa66cb031606db664dbfda~phone~ud75ce020af5f8bfb75a9097a66d452f2~Chat~20190927000042Z\",\"text\":null,\"text2\":null},{\"id\":\"507079b7-a5be-4da4-9158-16fc961cd474\",\"objectKey\":\"message~phone~u058da564bfaa66cb031606db664dbfda~phone~ud75ce020af5f8bfb75a9097a66d452f2~Chat~20190927125742Z\",\"text\":null,\"text2\":null}]"); - foreach (TestCollectionObject testCollectionObject in testCollectionObjects) - { - await WriteDocument(container, testCollectionObject); - queryKeys.Add(testCollectionObject.ObjectKey); - } + List testCollectionObjects = JsonConvert.DeserializeObject>( + "[{\"id\":\"70627503-7cb2-4a79-bcec-5e55765aa080\",\"objectKey\":\"message~phone~u058da564bfaa66cb031606db664dbfda~phone~ud75ce020af5f8bfb75a9097a66d452f2~Chat~20190927000042Z\",\"text\":null,\"text2\":null},{\"id\":\"507079b7-a5be-4da4-9158-16fc961cd474\",\"objectKey\":\"message~phone~u058da564bfaa66cb031606db664dbfda~phone~ud75ce020af5f8bfb75a9097a66d452f2~Chat~20190927125742Z\",\"text\":null,\"text2\":null}]"); + foreach (TestCollectionObject testCollectionObject in testCollectionObjects) + { + await WriteDocument(container, testCollectionObject); + queryKeys.Add(testCollectionObject.ObjectKey); + } - List results = container - .GetItemLinqQueryable(true, requestOptions: RunInParallelOptions()) - .Where(r => queryKeys.Contains(r.ObjectKey)) - .ToList(); // ERROR OCCURS WHEN QUERY IS EXECUTED + List results = container + .GetItemLinqQueryable(true, requestOptions: RunInParallelOptions()) + .Where(r => queryKeys.Contains(r.ObjectKey)) + .ToList(); // ERROR OCCURS WHEN QUERY IS EXECUTED - Console.WriteLine($"[\"{string.Join("\", \n\"", results.Select(r => r.ObjectKey))}\"]"); + Console.WriteLine($"[\"{string.Join("\", \n\"", results.Select(r => r.ObjectKey))}\"]"); + } + finally + { + await database.DeleteAsync(); + } } private static async Task WriteDocument(Container container, TestCollectionObject testData) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs index 208b08ec11..07cb6a4dca 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs @@ -1167,62 +1167,68 @@ public async Task ReadReplaceThroughputResponseTests() (x) => toStreamCount++); //Create a new cosmos client with the mocked cosmos json serializer - CosmosClient client = TestCommon.CreateCosmosClient( + using CosmosClient client = TestCommon.CreateCosmosClient( (cosmosClientBuilder) => cosmosClientBuilder.WithCustomSerializer(mockJsonSerializer)); int databaseThroughput = 10000; Cosmos.Database databaseNoThroughput = await client.CreateDatabaseAsync(Guid.NewGuid().ToString(), throughput: null); Cosmos.Database databaseWithThroughput = await client.CreateDatabaseAsync(Guid.NewGuid().ToString(), databaseThroughput, null); - - string containerId = Guid.NewGuid().ToString(); - string partitionPath = "/users"; - Container containerNoThroughput = await databaseWithThroughput.CreateContainerAsync(containerId, partitionPath, throughput: null); try { - await containerNoThroughput.ReadThroughputAsync(new RequestOptions()); - Assert.Fail("Should through not found exception as throughput is not configured"); - } - catch (CosmosException exception) - { - Assert.AreEqual(HttpStatusCode.NotFound, exception.StatusCode); - } + string containerId = Guid.NewGuid().ToString(); + string partitionPath = "/users"; + Container containerNoThroughput = await databaseWithThroughput.CreateContainerAsync(containerId, partitionPath, throughput: null); + try + { + await containerNoThroughput.ReadThroughputAsync(new RequestOptions()); + Assert.Fail("Should through not found exception as throughput is not configured"); + } + catch (CosmosException exception) + { + Assert.AreEqual(HttpStatusCode.NotFound, exception.StatusCode); + } - try - { - await containerNoThroughput.ReplaceThroughputAsync(2000, new RequestOptions()); - Assert.Fail("Should through not found exception as throughput is not configured"); - } - catch (CosmosException exception) - { - Assert.AreEqual(HttpStatusCode.NotFound, exception.StatusCode); - } + try + { + await containerNoThroughput.ReplaceThroughputAsync(2000, new RequestOptions()); + Assert.Fail("Should through not found exception as throughput is not configured"); + } + catch (CosmosException exception) + { + Assert.AreEqual(HttpStatusCode.NotFound, exception.StatusCode); + } - int containerThroughput = 1000; - Container container = await databaseNoThroughput.CreateContainerAsync(Guid.NewGuid().ToString(), "/id", throughput: containerThroughput); + int containerThroughput = 1000; + Container container = await databaseNoThroughput.CreateContainerAsync(Guid.NewGuid().ToString(), "/id", throughput: containerThroughput); - int? containerResponseThroughput = await container.ReadThroughputAsync(); - Assert.AreEqual(containerThroughput, containerResponseThroughput); + int? containerResponseThroughput = await container.ReadThroughputAsync(); + Assert.AreEqual(containerThroughput, containerResponseThroughput); - ThroughputResponse containerThroughputResponse = await container.ReadThroughputAsync(new RequestOptions()); - Assert.IsNotNull(containerThroughputResponse); - Assert.IsNotNull(containerThroughputResponse.Resource); - Assert.IsNotNull(containerThroughputResponse.MinThroughput); - Assert.IsNotNull(containerThroughputResponse.Resource.Throughput); - Assert.AreEqual(containerThroughput, containerThroughputResponse.Resource.Throughput.Value); - SelflinkValidator.ValidateTroughputSelfLink(containerThroughputResponse.Resource.SelfLink); + ThroughputResponse containerThroughputResponse = await container.ReadThroughputAsync(new RequestOptions()); + Assert.IsNotNull(containerThroughputResponse); + Assert.IsNotNull(containerThroughputResponse.Resource); + Assert.IsNotNull(containerThroughputResponse.MinThroughput); + Assert.IsNotNull(containerThroughputResponse.Resource.Throughput); + Assert.AreEqual(containerThroughput, containerThroughputResponse.Resource.Throughput.Value); + SelflinkValidator.ValidateTroughputSelfLink(containerThroughputResponse.Resource.SelfLink); - containerThroughput += 500; - containerThroughputResponse = await container.ReplaceThroughputAsync(containerThroughput, new RequestOptions()); - Assert.IsNotNull(containerThroughputResponse); - Assert.IsNotNull(containerThroughputResponse.Resource); - Assert.IsNotNull(containerThroughputResponse.Resource.Throughput); - Assert.AreEqual(containerThroughput, containerThroughputResponse.Resource.Throughput.Value); - SelflinkValidator.ValidateTroughputSelfLink(containerThroughputResponse.Resource.SelfLink); + containerThroughput += 500; + containerThroughputResponse = await container.ReplaceThroughputAsync(containerThroughput, new RequestOptions()); + Assert.IsNotNull(containerThroughputResponse); + Assert.IsNotNull(containerThroughputResponse.Resource); + Assert.IsNotNull(containerThroughputResponse.Resource.Throughput); + Assert.AreEqual(containerThroughput, containerThroughputResponse.Resource.Throughput.Value); + SelflinkValidator.ValidateTroughputSelfLink(containerThroughputResponse.Resource.SelfLink); - Assert.AreEqual(0, toStreamCount, "Custom serializer to stream should not be used for offer operations"); - Assert.AreEqual(0, fromStreamCount, "Custom serializer from stream should not be used for offer operations"); - await databaseNoThroughput.DeleteAsync(); + Assert.AreEqual(0, toStreamCount, "Custom serializer to stream should not be used for offer operations"); + Assert.AreEqual(0, fromStreamCount, "Custom serializer from stream should not be used for offer operations"); + } + finally + { + await databaseNoThroughput.DeleteAsync(); + await databaseWithThroughput.DeleteAsync(); + } } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs index fd3f8bf175..ecc7faffd6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContentResponseTests.cs @@ -6,28 +6,20 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { using System; using System.Collections.Generic; - using System.Linq; using System.Net; - using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Cosmos.Core.Trace; - using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] - public class CosmosContentResponseTests + public class CosmosContentResponseTests : BaseCosmosClientHelper { - private CosmosClient cosmosClient; - private Database database; private Container container; private ContainerInternal containerInternal; [TestInitialize] - public async Task TestInit() + public async Task TestInitialize() { - this.cosmosClient = TestCommon.CreateCosmosClient(); - this.database = await this.cosmosClient.CreateDatabaseAsync( - id: Guid.NewGuid().ToString()); + await base.TestInit(); this.container = await this.database.CreateContainerAsync( id: "ItemNoResponseTest", @@ -36,15 +28,9 @@ public async Task TestInit() } [TestCleanup] - public async Task TestCleanup() + public async Task TestCleanUp() { - if (this.cosmosClient == null) - { - return; - } - - using (await this.database.DeleteStreamAsync()) { } - this.cosmosClient.Dispose(); + await base.TestCleanup(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDatabaseTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDatabaseTests.cs index 9370345d81..ba6d33d55e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDatabaseTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosDatabaseTests.cs @@ -10,42 +10,26 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System.Linq; using System.Net; using System.Security.Cryptography; - using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Core.Trace; - using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.Resource.CosmosExceptions; - using Microsoft.Azure.Cosmos.Tracing; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; using Newtonsoft.Json.Linq; [TestClass] - public class CosmosDatabaseTests + public class CosmosDatabaseTests : BaseCosmosClientHelper { - protected CosmosClient cosmosClient = null; - protected CancellationTokenSource cancellationTokenSource = null; - protected CancellationToken cancellationToken; - [TestInitialize] - public void TestInit() + public async Task TestInitialize() { - this.cancellationTokenSource = new CancellationTokenSource(); - this.cancellationToken = this.cancellationTokenSource.Token; - - this.cosmosClient = TestCommon.CreateCosmosClient(); + await base.TestInit(); } [TestCleanup] - public void TestCleanup() + public async Task TestCleanUp() { - if (this.cosmosClient == null) - { - return; - } - - this.cancellationTokenSource?.Cancel(); - this.cosmosClient.Dispose(); + await base.TestCleanup(); } [TestMethod] @@ -121,7 +105,7 @@ public async Task StreamCreateConflictTestAsync() Id = Guid.NewGuid().ToString() }; - using (ResponseMessage response = await this.cosmosClient.CreateDatabaseStreamAsync(databaseSettings)) + using (ResponseMessage response = await this.GetClient().CreateDatabaseStreamAsync(databaseSettings)) { Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); Assert.IsNotNull(response.Headers); @@ -129,14 +113,14 @@ public async Task StreamCreateConflictTestAsync() } // Stream operations do not throw exceptions. - using (ResponseMessage response = await this.cosmosClient.CreateDatabaseStreamAsync(databaseSettings)) + using (ResponseMessage response = await this.GetClient().CreateDatabaseStreamAsync(databaseSettings)) { Assert.AreEqual(HttpStatusCode.Conflict, response.StatusCode); Assert.IsNotNull(response.Headers); Assert.IsTrue(response.Headers.RequestCharge > 0); } - using (ResponseMessage response = await this.cosmosClient.GetDatabase(databaseSettings.Id).DeleteStreamAsync()) + using (ResponseMessage response = await this.GetClient().GetDatabase(databaseSettings.Id).DeleteStreamAsync()) { Assert.AreEqual(HttpStatusCode.NoContent, response.StatusCode); Assert.IsNotNull(response.Headers); @@ -185,7 +169,7 @@ public async Task DropNonExistingDatabase() { try { - DatabaseResponse response = await this.cosmosClient.GetDatabase(Guid.NewGuid().ToString()).DeleteAsync(cancellationToken: this.cancellationToken); + DatabaseResponse response = await this.GetClient().GetDatabase(Guid.NewGuid().ToString()).DeleteAsync(cancellationToken: this.cancellationToken); Assert.Fail(); } catch (CosmosException ex) @@ -218,7 +202,7 @@ public async Task CreateIfNotExists() RequestChargeHandlerHelper requestChargeHandler = new RequestChargeHandlerHelper(); RequestHandlerHelper requestHandlerHelper = new RequestHandlerHelper(); - CosmosClient client = TestCommon.CreateCosmosClient(x => x.AddCustomHandlers(requestChargeHandler, requestHandlerHelper)); + using CosmosClient client = TestCommon.CreateCosmosClient(x => x.AddCustomHandlers(requestChargeHandler, requestHandlerHelper)); // Create a new database requestChargeHandler.TotalRequestCharges = 0; @@ -292,7 +276,7 @@ public async Task ReadReplaceThroughputResponseTests() (x) => toStreamCount++); //Create a new cosmos client with the mocked cosmos json serializer - CosmosClient client = TestCommon.CreateCosmosClient( + using CosmosClient client = TestCommon.CreateCosmosClient( (cosmosClientBuilder) => cosmosClientBuilder.WithCustomSerializer(mockJsonSerializer)); string databaseId = Guid.NewGuid().ToString(); @@ -372,7 +356,7 @@ public async Task DatabaseIterator() databaseIds.Add(createResponse.Resource.Id); } - FeedIterator feedIterator = this.cosmosClient.GetDatabaseQueryIterator( + FeedIterator feedIterator = this.GetClient().GetDatabaseQueryIterator( queryDefinition: null, continuationToken: null, requestOptions: new QueryRequestOptions() { MaxItemCount = 2 }); @@ -420,7 +404,7 @@ public async Task EncryptionCreateReplaceCek() cekProperties.EncryptionKeyWrapMetadata); // Use a different client instance to avoid (unintentional) cache impact - ClientEncryptionKeyProperties readProperties = await ((DatabaseInlineCore)this.cosmosClient.GetDatabase(response.Database.Id)).GetClientEncryptionKey(cekId).ReadAsync(); + ClientEncryptionKeyProperties readProperties = await ((DatabaseInlineCore)this.GetClient().GetDatabase(response.Database.Id)).GetClientEncryptionKey(cekId).ReadAsync(); Assert.AreEqual(cekProperties, readProperties); // Replace @@ -438,7 +422,7 @@ public async Task EncryptionCreateReplaceCek() // Use a different client instance to avoid (unintentional) cache impact readProperties = - await ((DatabaseCore)(DatabaseInlineCore)this.cosmosClient.GetDatabase(response.Database.Id)).GetClientEncryptionKey(cekId).ReadAsync(); + await ((DatabaseCore)(DatabaseInlineCore)this.GetClient().GetDatabase(response.Database.Id)).GetClientEncryptionKey(cekId).ReadAsync(); Assert.AreEqual(cekProperties, readProperties); response = await response.Database.DeleteAsync(cancellationToken: this.cancellationToken); @@ -558,15 +542,15 @@ public async Task DatabaseQueryIterator() string secondDb = "Bcdefgh"; string thirdDb = "Zoo"; - DatabaseResponse createResponse2 = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(secondDb); + DatabaseResponse createResponse2 = await this.GetClient().CreateDatabaseIfNotExistsAsync(secondDb); deleteList.Add(createResponse2.Database); - DatabaseResponse createResponse = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(firstDb); + DatabaseResponse createResponse = await this.GetClient().CreateDatabaseIfNotExistsAsync(firstDb); deleteList.Add(createResponse.Database); - DatabaseResponse createResponse3 = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(thirdDb); + DatabaseResponse createResponse3 = await this.GetClient().CreateDatabaseIfNotExistsAsync(thirdDb); deleteList.Add(createResponse3.Database); using (FeedIterator feedIterator = - this.cosmosClient.GetDatabaseQueryIterator( + this.GetClient().GetDatabaseQueryIterator( new QueryDefinition("select c.id From c where c.id = @id ") .WithParameter("@id", createResponse.Database.Id), requestOptions: new QueryRequestOptions() { MaxItemCount = 1 })) @@ -579,7 +563,7 @@ public async Task DatabaseQueryIterator() } using (FeedIterator feedIterator = - this.cosmosClient.GetDatabaseQueryStreamIterator( + this.GetClient().GetDatabaseQueryStreamIterator( "select value c.id From c ")) { while (feedIterator.HasMoreResults) @@ -603,7 +587,7 @@ public async Task DatabaseQueryIterator() List ids = new List(); using (FeedIterator feedIterator = - this.cosmosClient.GetDatabaseQueryIterator( + this.GetClient().GetDatabaseQueryIterator( "select value c.id From c ")) { while (feedIterator.HasMoreResults) @@ -637,14 +621,14 @@ private async Task CreateDatabaseHelper( DatabaseResponse response = null; if (databaseExists) { - response = await this.cosmosClient.CreateDatabaseIfNotExistsAsync( + response = await this.GetClient().CreateDatabaseIfNotExistsAsync( databaseId, throughput, cancellationToken: this.cancellationToken); } else { - response = await this.cosmosClient.CreateDatabaseAsync( + response = await this.GetClient().CreateDatabaseAsync( databaseId, throughput, cancellationToken: this.cancellationToken); @@ -673,7 +657,7 @@ private async Task CreateDatabaseHelper( } DatabaseProperties databaseSettings = new DatabaseProperties() { Id = databaseId }; - ResponseMessage response = await this.cosmosClient.CreateDatabaseStreamAsync( + ResponseMessage response = await this.GetClient().CreateDatabaseStreamAsync( databaseSettings, throughput: 400); @@ -683,7 +667,7 @@ private async Task CreateDatabaseHelper( Assert.IsTrue(response.StatusCode == HttpStatusCode.OK || (response.StatusCode == HttpStatusCode.Created && !databaseExists)); - return this.cosmosClient.GetDatabase(databaseId); + return this.GetClient().GetDatabase(databaseId); } private void ValidateHeaders(DatabaseResponse cosmosDatabaseResponse) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs index aef4323045..257c1ba0d3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemIdEncodingTestsBase.cs @@ -588,9 +588,9 @@ public async Task IdWithLineFeed() private async Task ExecuteTestCase(TestScenario scenario) { TestScenarioExpectations expected = - this.cosmosClient.ClientOptions.ConnectionMode == ConnectionMode.Direct ? + this.GetClient().ClientOptions.ConnectionMode == ConnectionMode.Direct ? scenario.Direct : - this.cosmosClient.Endpoint.Port == computeGatewayPort ? + this.GetClient().Endpoint.Port == computeGatewayPort ? scenario.ComputeGateway ?? scenario.Gateway : scenario.Gateway; Console.WriteLine($"Scenario: {scenario.Name}, Id: \"{scenario.Id}\""); @@ -638,7 +638,7 @@ await CreateItemPayload(scenario.Id), Assert.AreEqual(expected.ExpectedDeleteStatusCode, response.StatusCode); if (response.IsSuccessStatusCode) { - if (this.cosmosClient.ClientOptions.ConnectionMode == ConnectionMode.Gateway) + if (this.GetClient().ClientOptions.ConnectionMode == ConnectionMode.Gateway) { await ValidateEmptyPayload(response.Content); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs index 652cb01441..f815eba08e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs @@ -237,7 +237,7 @@ public async Task NoSessionTokenCaptureForThrottledUpsertRequestsTest() return throttledResponse; }, - this.cosmosClient.DocumentClient.sessionContainer); + this.GetClient().DocumentClient.sessionContainer); try { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs index 50bc71f276..c5d6347dd1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs @@ -69,7 +69,7 @@ public async Task Cleanup() public void ParentResourceTest() { Assert.AreEqual(this.database, this.Container.Database); - Assert.AreEqual(this.cosmosClient, this.Container.Database.Client); + Assert.AreEqual(this.GetClient(), this.Container.Database.Client); } [TestMethod] @@ -96,7 +96,7 @@ public async Task CreateDropItemWithInvalidIdCharactersTest() string[] selfLinkSegments = containerProperties.SelfLink.Split('/'); string databaseRid = selfLinkSegments[1]; string containerRid = selfLinkSegments[3]; - Container containerByRid = this.cosmosClient.GetContainer(databaseRid, containerRid); + Container containerByRid = this.GetClient().GetContainer(databaseRid, containerRid); // List of invalid characters are listed here. //https://docs.microsoft.com/dotnet/api/microsoft.azure.documents.resource.id?view=azure-dotnet#remarks @@ -416,7 +416,7 @@ public async Task ReadCollectionNotExists() // Item -> Container -> Database contract string dbName = Guid.NewGuid().ToString(); - testContainer = this.cosmosClient.GetDatabase(dbName).GetContainer(collectionName); + testContainer = this.GetClient().GetDatabase(dbName).GetContainer(collectionName); await CosmosItemTests.TestNonePKForNonExistingContainer(testContainer); } @@ -424,7 +424,7 @@ public async Task ReadCollectionNotExists() public async Task NonPartitionKeyLookupCacheTest() { int count = 0; - CosmosClient client = TestCommon.CreateCosmosClient(builder => + using CosmosClient client = TestCommon.CreateCosmosClient(builder => { builder.WithConnectionModeDirect(); builder.WithSendingRequestEventArgs((sender, e) => @@ -509,6 +509,8 @@ public async Task NonPartitionKeyLookupCacheTest() // OkRagnes should be fetched only once. // Possible to make multiple calls for ranges Assert.AreEqual(expected, count); + + await db.DeleteStreamAsync(); } [TestMethod] @@ -767,11 +769,10 @@ public async Task PartitionKeyDeleteTestForSubpartitionedContainer() { string currentVersion = HttpConstants.Versions.CurrentVersion; HttpConstants.Versions.CurrentVersion = "2020-07-15"; + using CosmosClient client = TestCommon.CreateCosmosClient(true); Cosmos.Database database = null; try { - CosmosClient client = TestCommon.CreateCosmosClient(true); - database = await client.CreateDatabaseIfNotExistsAsync("mydb"); ContainerProperties containerProperties = new ContainerProperties("subpartitionedcontainer", new List { "/Country", "/City" }); @@ -1575,7 +1576,7 @@ public async Task ItemEpkQuerySingleKeyRangeValidation() container = (ContainerInlineCore)containerResponse; // Get all the partition key ranges to verify there is more than one partition - IRoutingMapProvider routingMapProvider = await this.cosmosClient.DocumentClient.GetPartitionKeyRangeCacheAsync(NoOpTrace.Singleton); + IRoutingMapProvider routingMapProvider = await this.GetClient().DocumentClient.GetPartitionKeyRangeCacheAsync(NoOpTrace.Singleton); IReadOnlyList ranges = await routingMapProvider.TryGetOverlappingRangesAsync( containerResponse.Resource.ResourceId, new Documents.Routing.Range("00", "FF", isMaxInclusive: true, isMinInclusive: true), @@ -2692,7 +2693,7 @@ public async Task MigrateDataInNonPartitionContainer() [TestCategory("Quarantine") /* Gated runs emulator as rate limiting disabled */] public async Task VerifyToManyRequestTest(bool isQuery) { - CosmosClient client = TestCommon.CreateCosmosClient(); + using CosmosClient client = TestCommon.CreateCosmosClient(); Cosmos.Database db = await client.CreateDatabaseIfNotExistsAsync("LoadTest"); Container container = await db.CreateContainerIfNotExistsAsync("LoadContainer", "/pk"); @@ -2755,7 +2756,7 @@ public async Task VerifySessionTokenPassThrough() [TestMethod] public async Task VerifySessionNotFoundStatistics() { - CosmosClient cosmosClient = TestCommon.CreateCosmosClient(new CosmosClientOptions() { ConsistencyLevel = Cosmos.ConsistencyLevel.Session }); + using CosmosClient cosmosClient = TestCommon.CreateCosmosClient(new CosmosClientOptions() { ConsistencyLevel = Cosmos.ConsistencyLevel.Session }); DatabaseResponse database = await cosmosClient.CreateDatabaseIfNotExistsAsync("NoSession"); Container container = await database.Database.CreateContainerIfNotExistsAsync("NoSession", "/pk"); @@ -2815,8 +2816,8 @@ public async Task ContainterReCreateStatelessTest(bool operationBetweenRecreate, operation = ExecuteReadFeedAsync; } - CosmosClient cc1 = TestCommon.CreateCosmosClient(); - CosmosClient cc2 = TestCommon.CreateCosmosClient(); + using CosmosClient cc1 = TestCommon.CreateCosmosClient(); + using CosmosClient cc2 = TestCommon.CreateCosmosClient(); Cosmos.Database db1 = null; try { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs index d069e87935..c77352d07f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -14,7 +14,8 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests public class CosmosMultiHashTest { private Cosmos.Database database = null; - + + private CosmosClient client = null; private Container container = null; private ContainerProperties containerProperties = null; @@ -25,8 +26,8 @@ public class CosmosMultiHashTest public async Task TestInitialize() { HttpConstants.Versions.CurrentVersion = "2020-07-15"; - CosmosClient client = TestCommon.CreateCosmosClient(true); - this.database = await client.CreateDatabaseIfNotExistsAsync("mydb"); + this.client = TestCommon.CreateCosmosClient(true); + this.database = await this.client.CreateDatabaseIfNotExistsAsync("mydb"); this.containerProperties = new ContainerProperties("mycoll", new List { "/ZipCode", "/Address" }); this.container = await this.database.CreateContainerAsync(this.containerProperties); @@ -37,6 +38,7 @@ public async Task Cleanup() { await this.database.DeleteAsync(); HttpConstants.Versions.CurrentVersion = this.currentVersion; + this.client.Dispose(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosNotFoundTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosNotFoundTests.cs index a136cfe4b3..1903a04861 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosNotFoundTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosNotFoundTests.cs @@ -39,6 +39,7 @@ public async Task ValidateContainerNotFoundResponse() Database dbExists = await client.CreateDatabaseAsync("NotFoundTest" + Guid.NewGuid().ToString()); await this.ContainerOperations(database: dbExists, dbNotExist: false); + await dbExists.DeleteStreamAsync(); } [TestMethod] @@ -76,7 +77,7 @@ public async Task ValidateQueryNotFoundResponse() { // Recreate the collection with the same name on a different client. - CosmosClient newClient = TestCommon.CreateCosmosClient(); + using CosmosClient newClient = TestCommon.CreateCosmosClient(); Database db2 = newClient.GetDatabase(db.Id); Container container2 = await db2.CreateContainerAsync( id: container.Id, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs index 003ca8690b..753fe93899 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosPermissionTests.cs @@ -13,45 +13,29 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] - public class CosmosPermissionTests + public class CosmosPermissionTests : BaseCosmosClientHelper { - private CosmosClient cosmosClient = null; - private Database cosmosDatabase = null; - [TestInitialize] - public async Task TestInit() + public async Task TestInitialize() { - this.cosmosClient = TestCommon.CreateCosmosClient(); - - string databaseName = Guid.NewGuid().ToString(); - DatabaseResponse cosmosDatabaseResponse = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(databaseName); - this.cosmosDatabase = cosmosDatabaseResponse; + await base.TestInit(); } [TestCleanup] - public async Task TestCleanup() + public async Task Cleanup() { - if (this.cosmosClient == null) - { - return; - } - - if (this.cosmosDatabase != null) - { - await this.cosmosDatabase.DeleteStreamAsync(); - } - this.cosmosClient.Dispose(); + await base.TestCleanup(); } [TestMethod] public async Task CRUDTest() { string containerId = Guid.NewGuid().ToString(); - ContainerResponse containerResponse = await this.cosmosDatabase.CreateContainerAsync(containerId, "/id"); + ContainerResponse containerResponse = await this.database.CreateContainerAsync(containerId, "/id"); Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode); string userId = Guid.NewGuid().ToString(); - UserResponse userResponse = await this.cosmosDatabase.CreateUserAsync(userId); + UserResponse userResponse = await this.database.CreateUserAsync(userId); User user = userResponse.User; Assert.AreEqual(HttpStatusCode.Created, userResponse.StatusCode); Assert.AreEqual(userId, user.Id); @@ -118,14 +102,14 @@ public async Task ContainerResourcePermissionTest(ConnectionMode mode) //create user string userId = Guid.NewGuid().ToString(); - UserResponse userResponse = await this.cosmosDatabase.CreateUserAsync(userId); + UserResponse userResponse = await this.database.CreateUserAsync(userId); Assert.AreEqual(HttpStatusCode.Created, userResponse.StatusCode); Assert.AreEqual(userId, userResponse.Resource.Id); User user = userResponse.User; //create resource string containerId = Guid.NewGuid().ToString(); - ContainerResponse containerResponse = await this.cosmosDatabase.CreateContainerAsync(containerId, "/id"); + ContainerResponse containerResponse = await this.database.CreateContainerAsync(containerId, "/id"); Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode); Container container = containerResponse.Container; @@ -140,7 +124,7 @@ public async Task ContainerResourcePermissionTest(ConnectionMode mode) using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(cosmosClientOptions, resourceToken: permission.Token)) { - Container readContainerRef = tokenCosmosClient.GetContainer(this.cosmosDatabase.Id, containerId); + Container readContainerRef = tokenCosmosClient.GetContainer(this.database.Id, containerId); //read resource with PermissionMode.Read using FeedIterator feedIterator = readContainerRef.GetItemQueryIterator("SELECT * FROM c"); @@ -153,7 +137,7 @@ public async Task ContainerResourcePermissionTest(ConnectionMode mode) try { ContainerResponse response = await tokenCosmosClient - .GetDatabase(this.cosmosDatabase.Id) + .GetDatabase(this.database.Id) .GetContainer(containerId) .DeleteContainerAsync(); Assert.Fail(); @@ -173,7 +157,7 @@ public async Task ContainerResourcePermissionTest(ConnectionMode mode) using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(cosmosClientOptions, resourceToken: permission.Token)) { ContainerResponse response = await tokenCosmosClient - .GetDatabase(this.cosmosDatabase.Id) + .GetDatabase(this.database.Id) .GetContainer(containerId) .DeleteContainerAsync(); Assert.AreEqual(HttpStatusCode.NoContent, response.StatusCode); @@ -190,7 +174,7 @@ public async Task ContainerPartitionResourcePermissionTest(ConnectionMode connec ConnectionMode = connectionMode }; - CosmosClient cosmosClient = TestCommon.CreateCosmosClient(cosmosClientOptions); + using CosmosClient cosmosClient = TestCommon.CreateCosmosClient(cosmosClientOptions); Database database = await cosmosClient.CreateDatabaseIfNotExistsAsync("PermissionTest"); @@ -297,6 +281,8 @@ await container.CreateItemAsync( Assert.AreEqual(1, resultGateway.Count); } + + await database.DeleteStreamAsync(); } [TestMethod] @@ -311,14 +297,14 @@ public async Task ItemResourcePermissionTest(ConnectionMode connectionMode) //create user string userId = Guid.NewGuid().ToString(); - UserResponse userResponse = await this.cosmosDatabase.CreateUserAsync(userId); + UserResponse userResponse = await this.database.CreateUserAsync(userId); Assert.AreEqual(HttpStatusCode.Created, userResponse.StatusCode); Assert.AreEqual(userId, userResponse.Resource.Id); User user = userResponse.User; //create resource string containerId = Guid.NewGuid().ToString(); - ContainerResponse containerResponse = await this.cosmosDatabase.CreateContainerAsync(containerId, "/id"); + ContainerResponse containerResponse = await this.database.CreateContainerAsync(containerId, "/id"); Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode); Container container = containerResponse.Container; string itemId = Guid.NewGuid().ToString(); @@ -338,7 +324,7 @@ public async Task ItemResourcePermissionTest(ConnectionMode connectionMode) using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: cosmosClientOptions, resourceToken: permission.Token)) { - Container tokenContainer = tokenCosmosClient.GetContainer(this.cosmosDatabase.Id, containerId); + Container tokenContainer = tokenCosmosClient.GetContainer(this.database.Id, containerId); //read resource with PermissionMode.Read ItemResponse readPermissionItem = await tokenContainer.ReadItemAsync(itemId, partitionKey); @@ -368,7 +354,7 @@ public async Task ItemResourcePermissionTest(ConnectionMode connectionMode) using (CosmosClient tokenCosmosClient = TestCommon.CreateCosmosClient(clientOptions: cosmosClientOptions, resourceToken: permission.Token)) { using (FeedIterator feed = tokenCosmosClient - .GetDatabase(this.cosmosDatabase.Id) + .GetDatabase(this.database.Id) .GetContainer(containerId) .GetItemQueryIterator(new QueryDefinition("select * from t"))) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadFeedTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadFeedTests.cs index 08c65ea00d..6bd4bcbdb8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadFeedTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadFeedTests.cs @@ -33,7 +33,7 @@ public async Task TestInitialize() Assert.IsNotNull(response.Resource); this.Container = (ContainerInlineCore)response; - DocumentFeedResponse pkRangesFeed = await this.cosmosClient.DocumentClient.ReadPartitionKeyRangeFeedAsync(this.Container.LinkUri); + DocumentFeedResponse pkRangesFeed = await this.GetClient().DocumentClient.ReadPartitionKeyRangeFeedAsync(this.Container.LinkUri); Assert.IsTrue(pkRangesFeed.Count > 1, "Refresh container throughput to have at-least > 1 pk-range"); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs index 4a406c29d1..ede534cb9d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs @@ -95,7 +95,7 @@ public async Task ReadManyStreamTest() Assert.IsTrue(responseMessage.Headers.RequestCharge > 0); Assert.IsNotNull(responseMessage.Diagnostics); - ToDoActivity[] items = this.cosmosClient.ClientContext.SerializerCore.FromFeedStream( + ToDoActivity[] items = this.GetClient().ClientContext.SerializerCore.FromFeedStream( CosmosFeedResponseSerializer.GetStreamWithoutServiceEnvelope(responseMessage.Content)); Assert.AreEqual(items.Length, 5); } @@ -147,7 +147,7 @@ public async Task ReadManyWithIdasPk() Assert.IsTrue(responseMessage.Headers.RequestCharge > 0); Assert.IsNotNull(responseMessage.Diagnostics); - ToDoActivity[] items = this.cosmosClient.ClientContext.SerializerCore.FromFeedStream( + ToDoActivity[] items = this.GetClient().ClientContext.SerializerCore.FromFeedStream( CosmosFeedResponseSerializer.GetStreamWithoutServiceEnvelope(responseMessage.Content)); Assert.AreEqual(items.Length, 5); } @@ -323,7 +323,7 @@ public async Task ReadManyTestWithIncorrectIntendedContainerRid() Assert.IsTrue(responseMessage.Headers.RequestCharge > 0); Assert.IsNotNull(responseMessage.Diagnostics); - ToDoActivity[] items = this.cosmosClient.ClientContext.SerializerCore.FromFeedStream( + ToDoActivity[] items = this.GetClient().ClientContext.SerializerCore.FromFeedStream( CosmosFeedResponseSerializer.GetStreamWithoutServiceEnvelope(responseMessage.Content)); Assert.AreEqual(items.Length, 2); } @@ -332,7 +332,7 @@ public async Task ReadManyTestWithIncorrectIntendedContainerRid() [TestMethod] public async Task ReadMany404ExceptionTest() { - Database database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()); + Database database = await this.GetClient().CreateDatabaseAsync(Guid.NewGuid().ToString()); Container container = await database.CreateContainerAsync(Guid.NewGuid().ToString(), "/pk"); for (int i = 0; i < 5; i++) { @@ -483,7 +483,7 @@ public async Task ReadManyExceptionsTest(HttpStatusCode statusCode) CosmosClientBuilder builder = TestCommon.GetDefaultConfiguration(); builder.AddCustomHandlers(requestHandlers); - CosmosClient client = builder.Build(); + using CosmosClient client = builder.Build(); Database database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString()); Container container = await database.CreateContainerAsync(Guid.NewGuid().ToString(), "/pk"); for (int i = 0; i < 5; i++) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosUserTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosUserTests.cs index a0b849c775..f5943a4d66 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosUserTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosUserTests.cs @@ -5,45 +5,23 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Linq; using System.Net; using System.Threading.Tasks; - using Microsoft.Azure.Documents; using Microsoft.VisualStudio.TestTools.UnitTesting; - using Newtonsoft.Json.Linq; [TestClass] - public class CosmosUserTests + public class CosmosUserTests : BaseCosmosClientHelper { - - private CosmosClient cosmosClient = null; - private Cosmos.Database cosmosDatabase = null; - [TestInitialize] - public async Task TestInit() + public async Task TestInitialize() { - this.cosmosClient = TestCommon.CreateCosmosClient(); - - string databaseName = Guid.NewGuid().ToString(); - DatabaseResponse cosmosDatabaseResponse = await this.cosmosClient.CreateDatabaseIfNotExistsAsync(databaseName); - this.cosmosDatabase = cosmosDatabaseResponse; + await base.TestInit(); } [TestCleanup] - public async Task TestCleanup() + public async Task Cleanup() { - if (this.cosmosClient == null) - { - return; - } - - if (this.cosmosDatabase != null) - { - await this.cosmosDatabase.DeleteStreamAsync(); - } - this.cosmosClient.Dispose(); + await base.TestCleanup(); } [TestMethod] @@ -51,7 +29,7 @@ public async Task CRUDTest() { string userId = Guid.NewGuid().ToString(); - UserResponse userResponse = await this.cosmosDatabase.CreateUserAsync(userId); + UserResponse userResponse = await this.database.CreateUserAsync(userId); Assert.AreEqual(HttpStatusCode.Created, userResponse.StatusCode); Assert.AreEqual(userId, userResponse.Resource.Id); Assert.IsNotNull(userResponse.Resource.ResourceId); @@ -60,21 +38,21 @@ public async Task CRUDTest() string newUserId = Guid.NewGuid().ToString(); userResponse.Resource.Id = newUserId; - userResponse = await this.cosmosDatabase.GetUser(userId).ReplaceAsync(userResponse.Resource); + userResponse = await this.database.GetUser(userId).ReplaceAsync(userResponse.Resource); Assert.AreEqual(HttpStatusCode.OK, userResponse.StatusCode); Assert.AreEqual(newUserId, userResponse.Resource.Id); SelflinkValidator.ValidateUserSelfLink(userResponse.Resource.SelfLink); - userResponse = await this.cosmosDatabase.GetUser(userResponse.Resource.Id).ReadAsync(); + userResponse = await this.database.GetUser(userResponse.Resource.Id).ReadAsync(); Assert.AreEqual(HttpStatusCode.OK, userResponse.StatusCode); Assert.AreEqual(newUserId, userResponse.Resource.Id); SelflinkValidator.ValidateUserSelfLink(userResponse.Resource.SelfLink); - userResponse = await this.cosmosDatabase.GetUser(newUserId).DeleteAsync(); + userResponse = await this.database.GetUser(newUserId).DeleteAsync(); Assert.AreEqual(HttpStatusCode.NoContent, userResponse.StatusCode); userId = Guid.NewGuid().ToString(); - userResponse = await this.cosmosDatabase.UpsertUserAsync(userId); + userResponse = await this.database.UpsertUserAsync(userId); Assert.AreEqual(HttpStatusCode.Created, userResponse.StatusCode); Assert.AreEqual(userId, userResponse.Resource.Id); Assert.IsNotNull(userResponse.Resource.ResourceId); @@ -82,7 +60,7 @@ public async Task CRUDTest() newUserId = Guid.NewGuid().ToString(); userResponse.Resource.Id = newUserId; - userResponse = await this.cosmosDatabase.UpsertUserAsync(userResponse.Resource.Id); + userResponse = await this.database.UpsertUserAsync(userResponse.Resource.Id); Assert.AreEqual(newUserId, userResponse.Resource.Id); SelflinkValidator.ValidateUserSelfLink(userResponse.Resource.SelfLink); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DocumentClientUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DocumentClientUnitTests.cs index 74eb1dbced..227f308baf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DocumentClientUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DocumentClientUnitTests.cs @@ -40,7 +40,7 @@ public void NoRetryOnThrottledOverride() } [TestMethod] - public void RetryExceedingMaxTimeLimit() + public async Task RetryExceedingMaxTimeLimit() { Mock mockStoreModel = new Mock(); mockStoreModel.Setup(model => model.ProcessMessageAsync(It.IsAny(), default(CancellationToken))) @@ -52,13 +52,13 @@ public void RetryExceedingMaxTimeLimit() RetryOptions = new RetryOptions { MaxRetryAttemptsOnThrottledRequests = 100, MaxRetryWaitTimeInSeconds = 1 } }; - DocumentClient client = new DocumentClient( + using DocumentClient client = new DocumentClient( new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), ConfigurationManager.AppSettings["MasterKey"], (HttpMessageHandler)null, connectionPolicy); - client.GetDatabaseAccountAsync().Wait(); + await client.GetDatabaseAccountAsync(); int expectedExecutionTimes = 11; @@ -68,11 +68,10 @@ public void RetryExceedingMaxTimeLimit() try { Database db = new Database { Id = "test db 1" }; - client.CreateDatabaseAsync(db).Wait(); + await client.CreateDatabaseAsync(db); } - catch (Exception exp) + catch (DocumentClientException docExp) { - DocumentClientException docExp = exp.InnerException as DocumentClientException; Assert.AreEqual((HttpStatusCode)429, docExp.StatusCode); throttled = true; } @@ -97,7 +96,7 @@ public async Task OpenConnectionsToAllReplicasAsync_WithEmptyDatabaseName_Should RetryOptions = new RetryOptions { MaxRetryAttemptsOnThrottledRequests = 100, MaxRetryWaitTimeInSeconds = 1 } }; - DocumentClient client = new ( + using DocumentClient client = new ( new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), ConfigurationManager.AppSettings["MasterKey"], (HttpMessageHandler)null, @@ -139,13 +138,13 @@ public async Task OpenConnectionsToAllReplicasAsync_WhenStoreModelThrowsInternal RetryOptions = new RetryOptions { MaxRetryAttemptsOnThrottledRequests = 100, MaxRetryWaitTimeInSeconds = 1 } }; - DocumentClient client = new ( + using DocumentClient client = new ( new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), ConfigurationManager.AppSettings["MasterKey"], (HttpMessageHandler)null, connectionPolicy); - client.GetDatabaseAccountAsync().Wait(); + await client.GetDatabaseAccountAsync(); client.StoreModel = mockStoreModel.Object; client.GatewayStoreModel = mockStoreModel.Object; @@ -167,7 +166,7 @@ public async Task OpenConnectionsToAllReplicasAsync_WhenStoreModelThrowsInternal [TestMethod] public async Task QueryPartitionProviderSingletonTestAsync() { - DocumentClient client = new DocumentClient( + using DocumentClient client = new DocumentClient( new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), ConfigurationManager.AppSettings["MasterKey"], (HttpMessageHandler)null, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs index b9d179c0c1..4a1d92c59c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/ChangeFeedIteratorCoreTests.cs @@ -707,8 +707,8 @@ public async Task TestCancellationTokenAsync() await this.CreateRandomItems(itemsCore, 100, randomPartitionKey: true); // Inject validating handler - RequestHandler currentInnerHandler = this.cosmosClient.RequestHandler.InnerHandler; - this.cosmosClient.RequestHandler.InnerHandler = cancellationTokenHandler; + RequestHandler currentInnerHandler = this.GetClient().RequestHandler.InnerHandler; + this.GetClient().RequestHandler.InnerHandler = cancellationTokenHandler; cancellationTokenHandler.InnerHandler = currentInnerHandler; { @@ -808,17 +808,13 @@ public async Task ChangeFeedIteratorCore_WithQuery() private async Task ValidateChangeFeedIteratorCore_WithQuery( bool useGateway) { - await this.Cleanup(); - this.cancellationTokenSource = new CancellationTokenSource(); this.cancellationToken = this.cancellationTokenSource.Token; - this.cosmosClient = TestCommon.CreateCosmosClient(useGateway: useGateway); - this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), - cancellationToken: this.cancellationToken); + CosmosClient cosmosClient = useGateway ? TestCommon.CreateCosmosClient(useGateway: useGateway) : this.GetClient(); ContainerProperties properties = new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: "/pkey"); properties.ChangeFeedPolicy.FullFidelityRetention = TimeSpan.FromMinutes(5); - ContainerResponse response = await this.database.CreateContainerAsync( + ContainerResponse response = await cosmosClient.GetDatabase(this.database.Id).CreateContainerAsync( properties, cancellationToken: this.cancellationToken); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs index 1e26ef0738..df61615fe6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs @@ -50,7 +50,7 @@ public async Task GetTargetPartitionKeyRangesAsyncWithFeedRange() container = (ContainerInlineCore)containerResponse; // Get all the partition key ranges to verify there is more than one partition - IRoutingMapProvider routingMapProvider = await this.cosmosClient.DocumentClient.GetPartitionKeyRangeCacheAsync(NoOpTrace.Singleton); + IRoutingMapProvider routingMapProvider = await this.GetClient().DocumentClient.GetPartitionKeyRangeCacheAsync(NoOpTrace.Singleton); ContainerQueryProperties containerQueryProperties = new ContainerQueryProperties( containerResponse.Resource.ResourceId, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs index 9c1724fc26..9de85f9f7e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs @@ -315,7 +315,7 @@ await this.database.DefineContainer(containerName, partitionKeyPath) [TestMethod] public async Task TestConflictResolutionPolicy() { - Database databaseForConflicts = await this.cosmosClient.CreateDatabaseAsync("conflictResolutionContainerTest", + Database databaseForConflicts = await this.GetClient().CreateDatabaseAsync("conflictResolutionContainerTest", cancellationToken: this.cancellationToken); try @@ -368,7 +368,7 @@ await databaseForConflicts.DefineContainer(containerName, partitionKeyPath) [TestMethod] public async Task TestChangeFeedPolicy() { - Database databaseForChangeFeed = await this.cosmosClient.CreateDatabaseAsync("changeFeedRetentionContainerTest", + Database databaseForChangeFeed = await this.GetClient().CreateDatabaseAsync("changeFeedRetentionContainerTest", cancellationToken: this.cancellationToken); try diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayClientSideRequestStatsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayClientSideRequestStatsTests.cs index 8d65a5e7f0..3a5e08a2fc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayClientSideRequestStatsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayClientSideRequestStatsTests.cs @@ -8,7 +8,6 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System.Net.Http; using System.Threading; using System.Threading.Tasks; - using Antlr4.Runtime.Tree; using Microsoft.Azure.Cosmos.Diagnostics; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Cosmos.Tracing.TraceData; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs index 0d7eaa7ea5..41ccbc2da4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/GatewayTests.cs @@ -739,25 +739,25 @@ private async Task CreateTriggerAndValidateAsync(DocumentClient client, } [TestMethod] - public void ValidateTriggers() + public async Task ValidateTriggers() { - this.ValidateTriggersInternal(Protocol.Https, ConsistencyLevel.Session); - this.ValidateTriggersInternal(Protocol.Tcp, ConsistencyLevel.Session); + await this.ValidateTriggersInternal(Protocol.Https, ConsistencyLevel.Session); + await this.ValidateTriggersInternal(Protocol.Tcp, ConsistencyLevel.Session); } - internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, ConsistencyLevel? consistencyLevel = null) + internal async Task ValidateTriggersInternal(Protocol protocol = Protocol.Https, ConsistencyLevel? consistencyLevel = null) { #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - DocumentClient client = TestCommon.CreateClient(false, protocol: protocol, defaultConsistencyLevel: consistencyLevel); + using DocumentClient client = TestCommon.CreateClient(false, protocol: protocol, defaultConsistencyLevel: consistencyLevel); #endif #if !DIRECT_MODE - DocumentClient client = TestCommon.CreateClient(true, defaultConsistencyLevel: consistencyLevel); + using DocumentClient client = TestCommon.CreateClient(true, defaultConsistencyLevel: consistencyLevel); #endif TestCommon.DeleteAllDatabasesAsync().Wait(); Documents.Database database = TestCommon.CreateOrGetDatabase(client); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/pk" }), Kind = PartitionKind.Hash }; - DocumentCollection collection1 = TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }).Result; + DocumentCollection collection1 = await TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }); // 1. Basic tests @@ -773,7 +773,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - Trigger retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection1, t1).Result; + Trigger retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection1, t1); dynamic doct1 = GatewayTests.CreateDocument(client, this.baseUri, collection1, "Doc1", "empty", 0, pretrigger: "t1"); Assert.AreEqual("DOC1t1", doct1.Id); @@ -791,7 +791,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection1, response1).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection1, response1); dynamic docresponse1 = GatewayTests.CreateDocument(client, this.baseUri, collection1, "testing post trigger", "empty", 0, pretrigger: "t1", posttrigger: "response1"); Assert.AreEqual("TESTING POST TRIGGERt1", docresponse1.Id); @@ -809,7 +809,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection1, response2).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection1, response2); dynamic docresponse2 = GatewayTests.CreateDocument(client, this.baseUri, collection1, "post trigger output", "empty", 0, pretrigger: "t1", posttrigger: "response2"); Assert.AreEqual("POST TRIGGER OUTPUTt1POST TRIGGER OUTPUTt1response2", docresponse2.Id); @@ -842,7 +842,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection1, response3).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection1, response3); dynamic docresponse3 = GatewayTests.CreateDocument(client, this.baseUri, collection1, "testing post trigger2", "empty", 0, pretrigger: "t1", posttrigger: "response3"); Assert.AreEqual("TESTING POST TRIGGER2t1", docresponse3.Id); @@ -857,7 +857,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection2, t2).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection2, t2); dynamic doct2 = GatewayTests.CreateDocument(client, this.baseUri, collection2, "Doc2", "Prop1Value", 101, pretrigger: "t2"); Assert.AreEqual("Doc2", doct2.Id); @@ -874,7 +874,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection2, t3).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection2, t3); dynamic doct3 = GatewayTests.CreateDocument(client, this.baseUri, collection2, "Doc3", "empty", 0, pretrigger: "t3"); Assert.AreEqual("doc3t3", doct3.Id); @@ -887,7 +887,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection2, triggerTypeMismatch).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection2, triggerTypeMismatch); bool exceptionThrown = false; try @@ -909,7 +909,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection2, preTriggerThatThrows).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection2, preTriggerThatThrows); try { @@ -931,7 +931,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection2, postTriggerThatThrows).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection2, postTriggerThatThrows); try { @@ -954,13 +954,12 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi }; try { - Trigger retrievedTriggerNoBody = client.CreateTriggerAsync(collection2, triggerNoBody).Result; + Trigger retrievedTriggerNoBody = await client.CreateTriggerAsync(collection2, triggerNoBody); } catch (Exception ex) { Assert.IsNotNull(ex); - Assert.IsNotNull(ex.InnerException); - Assert.IsTrue(ex.InnerException.Message.Contains("The input content is invalid because the required properties - 'body; ' - are missing")); + Assert.IsTrue(ex.Message.Contains("The input content is invalid because the required properties - 'body; ' - are missing")); } // failure test - trigger without trigger type @@ -972,13 +971,12 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi }; try { - Trigger retrievedTriggerNoType = client.CreateTriggerAsync(collection2, triggerNoType).Result; + Trigger retrievedTriggerNoType = await client.CreateTriggerAsync(collection2, triggerNoType); } catch (Exception ex) { Assert.IsNotNull(ex); - Assert.IsNotNull(ex.InnerException); - Assert.IsTrue(ex.InnerException.Message.Contains("The input content is invalid because the required properties - 'triggerType; ' - are missing")); + Assert.IsTrue(ex.Message.Contains("The input content is invalid because the required properties - 'triggerType; ' - are missing")); } // failure test - trigger without trigger operation @@ -990,13 +988,12 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi }; try { - Trigger retrievedTriggerNoType = client.CreateTriggerAsync(collection2, triggerNoOperation).Result; + Trigger retrievedTriggerNoType = await client.CreateTriggerAsync(collection2, triggerNoOperation); } catch (Exception ex) { Assert.IsNotNull(ex); - Assert.IsNotNull(ex.InnerException); - Assert.IsTrue(ex.InnerException.Message.Contains("The input content is invalid because the required properties - 'triggerOperation; ' - are missing")); + Assert.IsTrue(ex.Message.Contains("The input content is invalid because the required properties - 'triggerOperation; ' - are missing")); } // TODO: uncomment when preserializedScripts is enabled. @@ -1028,14 +1025,11 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi }; try { - dbToCreate = client.CreateDatabaseAsync(dbToCreate, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "t1" } }).Result; + dbToCreate = await client.CreateDatabaseAsync(dbToCreate, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "t1" } }); } - catch (Exception e) + catch (DocumentClientException de) { - Assert.IsNotNull(e); - Assert.IsNotNull(e.InnerException); - - DocumentClientException de = e.InnerException as DocumentClientException; + Assert.IsNotNull(de); Assert.AreEqual(HttpStatusCode.BadRequest.ToString(), de.Error.Code); } @@ -1098,12 +1092,12 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection2, request1).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection2, request1); dynamic docrequest1 = GatewayTests.CreateDocument(client, this.baseUri, collection2, "abc", "empty", 0, pretrigger: "request1"); Assert.AreEqual("def", docrequest1.Id); - DocumentCollection collection3 = TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }).Result; + DocumentCollection collection3 = await TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }); // set request body multiple times Trigger request2 = new Trigger @@ -1120,7 +1114,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection3, request2).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection3, request2); dynamic docrequest2 = GatewayTests.CreateDocument(client, this.baseUri, collection3, "doc", "empty", 0, pretrigger: "request2"); Assert.AreEqual(203, docrequest2.Id.Length); @@ -1142,7 +1136,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection3, request3).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection3, request3); dynamic docrequest3 = GatewayTests.CreateDocument(client, this.baseUri, collection3, "noname", "empty", 0, pretrigger: "request3"); Assert.AreEqual("noresponse", docrequest3.Id); @@ -1164,9 +1158,9 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Pre, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection3, request4).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection3, request4); - ResourceResponse docrequest4 = client.CreateDocumentAsync(collection3, new Document { Id = "noname" }, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "request4" } }).Result; + ResourceResponse docrequest4 = await client.CreateDocumentAsync(collection3, new Document { Id = "noname" }, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "request4" } }); Assert.IsTrue(docrequest4.Resource.Id == "noheaders"); Assert.IsTrue(docrequest4.ResponseHeaders["Test"] == null); @@ -1186,9 +1180,9 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection3, responseQuotaHeader).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection3, responseQuotaHeader); - Book docresponseQuotaHeader = (dynamic)client.CreateDocumentAsync(collection3, new Book { Id = "quotaDocument" }, new Documents.Client.RequestOptions { PostTriggerInclude = new List { "responseQuotaHeader" } }).Result.Resource; + Book docresponseQuotaHeader = (await (dynamic)client.CreateDocumentAsync(collection3, new Book { Id = "quotaDocument" }, new Documents.Client.RequestOptions { PostTriggerInclude = new List { "responseQuotaHeader" } })).Resource; Assert.IsTrue(docresponseQuotaHeader.Author.Contains("collectionSize")); Assert.IsTrue(docresponseQuotaHeader.Title.Contains("collectionSize")); @@ -1202,7 +1196,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.Delete }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection3, triggerOpType).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection3, triggerOpType); exceptionThrown = false; try @@ -1224,7 +1218,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection3, triggerAbortTransaction).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection3, triggerAbortTransaction); exceptionThrown = false; try @@ -1244,7 +1238,7 @@ internal void ValidateTriggersInternal(Protocol protocol = Protocol.Https, Consi Assert.AreNotEqual(doc.Id, "Docabort"); // make sure the doc isnt present } - DocumentCollection collection4 = TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }).Result; + DocumentCollection collection4 = await TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }); // delete post trigger Trigger deletePostTrigger = new Trigger @@ -1280,7 +1274,7 @@ function callback(err, docFeed, responseOptions) TriggerType = Documents.TriggerType.Post, TriggerOperation = Documents.TriggerOperation.All }; - retrievedTrigger = this.CreateTriggerAndValidateAsync(client, collection4, deletePostTrigger).Result; + retrievedTrigger = await this.CreateTriggerAndValidateAsync(client, collection4, deletePostTrigger); dynamic docDeletePostTrigger = null; try @@ -1307,12 +1301,10 @@ function callback(err, docFeed, responseOptions) exceptionThrown = false; try { - Document doc5 = client.CreateDocumentAsync(collection4, new Document { Id = "Doc5" }, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "t1", "t3" } }).Result.Resource; + Document doc5 = (await client.CreateDocumentAsync(collection4, new Document { Id = "Doc5" }, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "t1", "t3" } })).Resource; } - catch (Exception e) + catch (DocumentClientException de) { - Assert.IsNotNull(e); - DocumentClientException de = e.InnerException as DocumentClientException; Assert.IsNotNull(de); exceptionThrown = true; } @@ -1321,17 +1313,20 @@ function callback(err, docFeed, responseOptions) exceptionThrown = false; try { - ResourceResponse docMultiple1 = client.CreateDocumentAsync(collection4, new Document { Id = "multipleHeaders1" }, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "t1" }, PostTriggerInclude = new List { "response2", "multiple1" } }).Result; + ResourceResponse docMultiple1 = await client.CreateDocumentAsync(collection4, new Document { Id = "multipleHeaders1" }, new Documents.Client.RequestOptions { PreTriggerInclude = new List { "t1" }, PostTriggerInclude = new List { "response2", "multiple1" } }); } - catch (Exception e) + catch (DocumentClientException de) { - Assert.IsNotNull(e); - DocumentClientException de = e.InnerException as DocumentClientException; Assert.IsNotNull(de); exceptionThrown = true; } Assert.IsTrue(exceptionThrown, "multiple post-triggers didn't cause failure"); + if (dbToCreate != null) + { + await client.DeleteDatabaseAsync(database); + } + // re-enable these tests if we re-enable multiple triggers // // pre-trigger request body // Document doc5 = client.CreateDocumentAsync(collection1, new Document { Id = "Doc5" }, new RequestOptions { PreTriggerInclude = new List { "t1", "t3" } }).Result.Resource; @@ -1384,7 +1379,7 @@ function callback(err, docFeed, responseOptions) [TestMethod] public async Task ValidateLongProcessingStoredProcedures() { - CosmosClient client = TestCommon.CreateCosmosClient(true); + using CosmosClient client = TestCommon.CreateCosmosClient(true); Cosmos.Database database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/id" }), Kind = PartitionKind.Hash }; @@ -1422,7 +1417,7 @@ function callback(err, docFeed, responseOptions) { [TestMethod] public async Task ValidateSprocWithFailedUpdates() { - CosmosClient client = TestCommon.CreateCosmosClient(true); + using CosmosClient client = TestCommon.CreateCosmosClient(true); Cosmos.Database database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/id" }), Kind = PartitionKind.Hash }; @@ -1468,7 +1463,7 @@ public async Task ValidateSprocWithFailedUpdates() } catch (DocumentClientException exception) { - Assert.Fail("Exception should not have occurred. {0}", exception.InnerException.ToString()); + Assert.Fail("Exception should not have occurred. {0}", exception.ToString()); } await database.DeleteAsync(); } @@ -1485,7 +1480,7 @@ public async Task ValidateSystemSproc() internal async Task ValidateSystemSprocInternal(bool useGateway, Protocol protocol = Protocol.Tcp) { - CosmosClient client = TestCommon.CreateCosmosClient(useGateway); + using CosmosClient client = TestCommon.CreateCosmosClient(useGateway); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/pk" }), Kind = PartitionKind.Hash }; Cosmos.Database database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString()); ContainerProperties collectionSpec = new ContainerProperties @@ -2238,13 +2233,13 @@ await masterClient.CreateStoredProcedureAsync(UriFactory.CreateDocumentCollectio } [TestMethod] - public void ValidateStoredProceduresBlacklisting() + public async Task ValidateStoredProceduresBlacklisting() { try { TestCommon.SetDoubleConfigurationProperty("StoredProcedureMaximumChargeInSeconds", 0.0); TestCommon.WaitForConfigRefresh(); - this.ValidateStoredProceduresBlacklistingInternal(); + await this.ValidateStoredProceduresBlacklistingInternal(); } finally { @@ -2253,14 +2248,14 @@ public void ValidateStoredProceduresBlacklisting() } } - public void ValidateStoredProceduresBlacklistingInternal() + public async Task ValidateStoredProceduresBlacklistingInternal() { - DocumentClient client = TestCommon.CreateClient(true); + using DocumentClient client = TestCommon.CreateClient(true); Documents.Database database = TestCommon.CreateOrGetDatabase(client); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/pk" }), Kind = PartitionKind.Hash }; DocumentCollection inputCollection = new DocumentCollection { Id = "ValidateStoredProceduresBlacklisting" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }; - DocumentCollection collection = TestCommon.CreateCollectionAsync(client, database, inputCollection).Result; + DocumentCollection collection = await TestCommon.CreateCollectionAsync(client, database, inputCollection); string badScript = @"function() { var start = new Date(); @@ -2301,18 +2296,20 @@ public void ValidateStoredProceduresBlacklistingInternal() isBlacklisted = true; } + await client.DeleteDatabaseAsync(database); + Assert.IsTrue(isBlacklisted); } [TestMethod] - public void ValidateUserDefinedFunctions() + public async Task ValidateUserDefinedFunctions() { - DocumentClient client = TestCommon.CreateClient(true); + using DocumentClient client = TestCommon.CreateClient(true); - DocumentClient secondary1Client = TestCommon.CreateClient(false, Protocol.Tcp); + using DocumentClient secondary1Client = TestCommon.CreateClient(false, Protocol.Tcp); secondary1Client.LockClient(1); - DocumentClient secondary2Client = TestCommon.CreateClient(false, Protocol.Tcp); + using DocumentClient secondary2Client = TestCommon.CreateClient(false, Protocol.Tcp); secondary1Client.LockClient(2); Documents.Database database = TestCommon.CreateOrGetDatabase(client); @@ -2333,7 +2330,7 @@ public void ValidateUserDefinedFunctions() if(label.toLowerCase() == testLabel.toLowerCase()) return true; };", }; - UserDefinedFunction retrievedUdf = client.CreateUserDefinedFunctionAsync(collection.UserDefinedFunctionsLink, udf1).Result; + UserDefinedFunction retrievedUdf = await client.CreateUserDefinedFunctionAsync(collection.UserDefinedFunctionsLink, udf1); this.Retry(() => { @@ -2362,13 +2359,12 @@ public void ValidateUserDefinedFunctions() }; try { - UserDefinedFunction retrievedUdfNoBody = client.CreateUserDefinedFunctionAsync(collection.UserDefinedFunctionsLink, udfNoBody).Result; + UserDefinedFunction retrievedUdfNoBody = await client.CreateUserDefinedFunctionAsync(collection.UserDefinedFunctionsLink, udfNoBody); } catch (Exception ex) { Assert.IsNotNull(ex); - Assert.IsNotNull(ex.InnerException); - Assert.IsTrue(ex.InnerException.Message.Contains("The input content is invalid because the required properties - 'body; ' - are missing")); + Assert.IsTrue(ex.Message.Contains("The input content is invalid because the required properties - 'body; ' - are missing")); } // failure test - UDF that throws specific error number. @@ -2396,6 +2392,8 @@ public void ValidateUserDefinedFunctions() } } + await client.DeleteDatabaseAsync(database); + // // precompilation should catch errors on create // UserDefinedFunction udfSyntaxError = new UserDefinedFunction // { @@ -2421,13 +2419,13 @@ public void ValidateUserDefinedFunctions() } [TestMethod] - public void ValidateUserDefinedFunctionsBlacklisting() + public async Task ValidateUserDefinedFunctionsBlacklisting() { try { TestCommon.SetDoubleConfigurationProperty("UdfMaximumChargeInSeconds", 0.0); TestCommon.WaitForConfigRefresh(); - this.ValidateUserDefinedFunctionsBlacklistingInternal(); + await this.ValidateUserDefinedFunctionsBlacklistingInternal(); } finally { @@ -2436,9 +2434,9 @@ public void ValidateUserDefinedFunctionsBlacklisting() } } - public void ValidateUserDefinedFunctionsBlacklistingInternal() + public async Task ValidateUserDefinedFunctionsBlacklistingInternal() { - DocumentClient client = TestCommon.CreateClient(true); + using DocumentClient client = TestCommon.CreateClient(true); Documents.Database database = TestCommon.CreateOrGetDatabase(client); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/pk" }), Kind = PartitionKind.Hash }; @@ -2457,7 +2455,7 @@ public void ValidateUserDefinedFunctionsBlacklistingInternal() return name; }" }; - UserDefinedFunction udf = client.CreateUserDefinedFunctionAsync(collection, udfSpec).Result; + UserDefinedFunction udf = await client.CreateUserDefinedFunctionAsync(collection, udfSpec); DocumentClient secondaryClient = TestCommon.CreateClient(false); secondaryClient.LockClient(1); // lock so we can get reliable blacklistling @@ -2468,18 +2466,18 @@ public void ValidateUserDefinedFunctionsBlacklistingInternal() "select udf.badUdf(r.id) from root r", new FeedOptions { EnableCrossPartitionQuery = true }).AsDocumentQuery(); // with 0 docs, UDF shouldn't be blacklisted - DocumentFeedResponse docCollection = docQuery.ExecuteNextAsync().Result; + DocumentFeedResponse docCollection = await docQuery.ExecuteNextAsync(); Assert.AreEqual(0, docCollection.Count); } // create one doc and try again - client.CreateDocumentAsync(collection, new Document() { Id = "newdoc1" }).Wait(); + await client.CreateDocumentAsync(collection, new Document() { Id = "newdoc1" }); for (int i = 0; i < 3; i++) { IDocumentQuery docQuery2 = secondaryClient.CreateDocumentQuery(collection.DocumentsLink, "select udf.badUdf(r.id) from root r", new FeedOptions { EnableCrossPartitionQuery = true }).AsDocumentQuery(); - DocumentFeedResponse docCollection2 = docQuery2.ExecuteNextAsync().Result; + DocumentFeedResponse docCollection2 = await docQuery2.ExecuteNextAsync(); } IDocumentQuery docQuery2BlackListed = secondaryClient.CreateDocumentQuery(collection.DocumentsLink, @@ -2488,12 +2486,10 @@ public void ValidateUserDefinedFunctionsBlacklistingInternal() bool isBlacklisted = false; try { - DocumentFeedResponse docCollection2 = docQuery2BlackListed.ExecuteNextAsync().Result; + DocumentFeedResponse docCollection2 = await docQuery2BlackListed.ExecuteNextAsync(); } - catch (Exception e) + catch (DocumentClientException de) { - Assert.IsNotNull(e); - DocumentClientException de = e.InnerException as DocumentClientException; Assert.IsNotNull(de); Assert.AreEqual(HttpStatusCode.Forbidden.ToString(), de.Error.Code); Assert.IsTrue(de.Message.Contains("is blocked for execution because it has violated its allowed resources limit several times.")); @@ -2511,7 +2507,7 @@ public void ValidateUserDefinedFunctionsBlacklistingInternal() // create lots of documents for (int i = 0; i < 1000; i++) { - client.CreateDocumentAsync(collection2, new Document() { Id = "newdoc" + Guid.NewGuid().ToString() }).Wait(); + await client.CreateDocumentAsync(collection2, new Document() { Id = "newdoc" + Guid.NewGuid().ToString() }); } UserDefinedFunction udfSpec2 = new UserDefinedFunction @@ -2519,12 +2515,15 @@ public void ValidateUserDefinedFunctionsBlacklistingInternal() Id = "goodUdf", Body = "function(name) { return name; }" }; - UserDefinedFunction udf2 = client.CreateUserDefinedFunctionAsync(collection2, udfSpec2).Result; + UserDefinedFunction udf2 = await client.CreateUserDefinedFunctionAsync(collection2, udfSpec2); IDocumentQuery docQuery3 = secondaryClient.CreateDocumentQuery(collection2.DocumentsLink, "select udf.goodUdf(r.id) from root r", new FeedOptions { MaxItemCount = 1000, EnableCrossPartitionQuery = true }).AsDocumentQuery(); - DocumentFeedResponse docCollection3 = docQuery3.ExecuteNextAsync().Result; + DocumentFeedResponse docCollection3 = await docQuery3.ExecuteNextAsync(); + + await client.DeleteDatabaseAsync(database); + Assert.AreEqual(1000, docCollection3.Count); } @@ -2541,7 +2540,7 @@ public async Task ValidateChangeFeedIfNoneMatch() private async Task ValidateChangeFeedIfNoneMatchHelper(bool useGateway, Protocol protocol = Protocol.Tcp) { - DocumentClient client = TestCommon.CreateClient(useGateway, protocol); + using DocumentClient client = TestCommon.CreateClient(useGateway, protocol); ResourceResponse db = await client.CreateDatabaseAsync(new Documents.Database() { Id = Guid.NewGuid().ToString() }); try { @@ -2673,7 +2672,7 @@ private async Task ValidateChangeFeedIfNoneMatchHelper(bool useGateway, Protocol } finally { - client.DeleteDatabaseAsync(db).Wait(); + await client.DeleteDatabaseAsync(db); } } @@ -2690,7 +2689,7 @@ public async Task ValidateChangeFeedIfModifiedSince() private async Task ValidateChangeFeedIfModifiedSinceHelper(bool useGateway, Protocol protocol = Protocol.Tcp) { - DocumentClient client = TestCommon.CreateClient(useGateway, protocol); + using DocumentClient client = TestCommon.CreateClient(useGateway, protocol); ResourceResponse db = await client.CreateDatabaseAsync(new Documents.Database() { Id = Guid.NewGuid().ToString() }); try { @@ -2788,7 +2787,7 @@ private async Task ValidateChangeFeedIfModifiedSinceHelper(bool useGateway, Prot } finally { - client.DeleteDatabaseAsync(db).Wait(); + await client.DeleteDatabaseAsync(db); } } @@ -2840,7 +2839,7 @@ private async Task GetPKRangeIdForPartitionKey( private async Task ValidateChangeFeedWithPartitionKeyHelper(bool useGateway, Protocol protocol = Protocol.Tcp) { - DocumentClient client = TestCommon.CreateClient(useGateway, protocol); + using DocumentClient client = TestCommon.CreateClient(useGateway, protocol); Documents.Database db = await client.CreateDatabaseAsync(new Documents.Database() { Id = Guid.NewGuid().ToString() }); string pk1 = "4", pk2 = "6", pk3 = "22"; // The values are chosen in such a way that hash lands on the same range. @@ -2928,7 +2927,7 @@ private async Task ValidateChangeFeedWithPartitionKeyHelper(bool useGateway, Pro } finally { - client.DeleteDatabaseAsync(db).Wait(); + await client.DeleteDatabaseAsync(db); } } @@ -2978,7 +2977,7 @@ public async Task ValidateReadPartitionKeyRange() private async Task ValidateReadPartitionKeyRangeHelper(bool useGateway, Protocol protocol = Protocol.Tcp) { - DocumentClient client = TestCommon.CreateClient(useGateway, protocol); + using DocumentClient client = TestCommon.CreateClient(useGateway, protocol); Documents.Database db = await client.CreateDatabaseAsync(new Documents.Database() { Id = Guid.NewGuid().ToString() }); try { @@ -3020,14 +3019,14 @@ private async Task ValidateReadPartitionKeyRangeHelper(bool useGateway, Protocol } finally { - client.DeleteDatabaseAsync(db).Wait(); + await client.DeleteDatabaseAsync(db); } } [TestMethod] public async Task ValidateStoredProcedureExecutionWithPartitionKey() { - DocumentClient client = TestCommon.CreateClient(true); + using DocumentClient client = TestCommon.CreateClient(true); await TestCommon.DeleteAllDatabasesAsync(); Documents.Database database = await client.CreateDatabaseAsync(new Documents.Database { Id = "db" }); @@ -3064,26 +3063,27 @@ public async Task ValidateStoredProcedureExecutionWithPartitionKey() new Documents.Client.RequestOptions { PartitionKey = new Documents.PartitionKey("1") }, "DocumentDB").Result; Assert.IsTrue(string.CompareOrdinal(output, "Hello World, DocumentDB!") == 0); - client.DeleteStoredProcedureAsync(UriFactory.CreateStoredProcedureUri(database.Id, collection.Id, sproc.Id)).Wait(); + await client.DeleteStoredProcedureAsync(UriFactory.CreateStoredProcedureUri(database.Id, collection.Id, sproc.Id)); + await client.DeleteDatabaseAsync(database); } [TestMethod] - public void ValidateGenericReadDocumentGateway() + public async Task ValidateGenericReadDocumentGateway() { - this.ValidateGenericReadDocument(true, Protocol.Https).Wait(); - this.ValidateGenericReadDocumentFromResource(true, Protocol.Https).Wait(); + await this.ValidateGenericReadDocument(true, Protocol.Https); + await this.ValidateGenericReadDocumentFromResource(true, Protocol.Https); } [TestMethod] - public void ValidateGenericReadDocumentDirectTcp() + public async Task ValidateGenericReadDocumentDirectTcp() { - this.ValidateGenericReadDocument(false, Protocol.Tcp).Wait(); - this.ValidateGenericReadDocumentFromResource(false, Protocol.Tcp).Wait(); + await this.ValidateGenericReadDocument(false, Protocol.Tcp); + await this.ValidateGenericReadDocumentFromResource(false, Protocol.Tcp); } private async Task ValidateGenericReadDocument(bool useGateway, Protocol protocol) { - CosmosClient client = TestCommon.CreateCosmosClient(useGateway); + using CosmosClient client = TestCommon.CreateCosmosClient(useGateway); Cosmos.Database database = await client.CreateDatabaseIfNotExistsAsync(Guid.NewGuid().ToString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/id" }), Kind = PartitionKind.Hash }; @@ -3122,7 +3122,7 @@ private async Task ValidateGenericReadDocument(bool useGateway, Protocol protoco private async Task ValidateGenericReadDocumentFromResource(bool useGateway, Protocol protocol) { - CosmosClient client = TestCommon.CreateCosmosClient(useGateway); + using CosmosClient client = TestCommon.CreateCosmosClient(useGateway); Cosmos.Database database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/id" }), Kind = PartitionKind.Hash }; @@ -3156,16 +3156,18 @@ private async Task ValidateGenericReadDocumentFromResource(bool useGateway, Prot // This tests the implicit operator for ReadDocumentAsync CustomerObjectFromResource doc1 = await collection.ReadItemAsync(partitionKey: new Cosmos.PartitionKey(customerObjectFromResource.id), id: customerObjectFromResource.id); Assert.IsNotNull(doc1.id); + + await database.DeleteStreamAsync(); } [TestMethod] - public void ValidatePOCODocumentSerialization() + public async Task ValidatePOCODocumentSerialization() { // 1. Verify the customer can serialize their POCO object in their own ways - DocumentClient client = TestCommon.CreateClient(true); + using DocumentClient client = TestCommon.CreateClient(true); Documents.Database database = TestCommon.CreateOrGetDatabase(client); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/pk" }), Kind = PartitionKind.Hash }; - DocumentCollection collection1 = TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }).Result; + DocumentCollection collection1 = await TestCommon.CreateCollectionAsync(client, database, new DocumentCollection { Id = "TestTriggers" + Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }); CustomerPOCO poco = new CustomerPOCO() { @@ -3298,6 +3300,8 @@ public void ValidatePOCODocumentSerialization() CustomerObjectFromDocumentEx doc5 = (dynamic)client.CreateDocumentAsync(collection1, testobject5).Result.Resource; Assert.AreEqual(doc5.TestProperty, testobject5.TestProperty); Assert.IsFalse(doc5.ToString().Contains("TestProperty")); + + await client.DeleteDatabaseAsync(database); } [TestMethod] @@ -3305,10 +3309,10 @@ public async Task ValidateIndexingDirectives() { #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator - DocumentClient client = TestCommon.CreateClient(false); + using DocumentClient client = TestCommon.CreateClient(false); #endif #if !DIRECT_MODE - CosmosClient client = TestCommon.CreateCosmosClient(true); + using CosmosClient client = TestCommon.CreateCosmosClient(true); #endif Cosmos.Database database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString()); PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/id" }), Kind = PartitionKind.Hash }; @@ -3400,7 +3404,7 @@ public static string DumpFullExceptionMessage(Exception e) private async Task ValidateCollectionQuotaTestsWithFailure(bool useGateway) { - DocumentClient client = TestCommon.CreateClient(useGateway); + using DocumentClient client = TestCommon.CreateClient(useGateway); Documents.Database database = null; try { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs index be83b0e1fd..b24ce5f03b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs @@ -46,7 +46,7 @@ public async Task Startup() this.currentVersionUTF8 = HttpConstants.Versions.CurrentVersionUTF8; //var client = TestCommon.CreateClient(false, Protocol.Tcp); - var client = TestCommon.CreateClient(true); + using var client = TestCommon.CreateClient(true); await TestCommon.DeleteAllDatabasesAsync(); } @@ -60,14 +60,14 @@ public void TestCleanup() [TestMethod] public void ValidatePageSizeRntbd() { - var client = TestCommon.CreateClient(false, Protocol.Tcp); + using var client = TestCommon.CreateClient(false, Protocol.Tcp); ValidatePageSize(client); } [TestMethod] public void ValidatePageSizeGatway() { - var client = TestCommon.CreateClient(true); + using var client = TestCommon.CreateClient(true); ValidatePageSize(client); } @@ -506,7 +506,7 @@ private void ValidateEmitVerboseTracesInQuery(DocumentClient client, bool isHttp [TestMethod] public void ValidateIfNonMatchGateway() { - var client = TestCommon.CreateClient(true); + using var client = TestCommon.CreateClient(true); ValidateIfNonMatch(client); } @@ -514,7 +514,7 @@ public void ValidateIfNonMatchGateway() [TestMethod] public void ValidateIfNonMatchRntbd() { - var client = TestCommon.CreateClient(false, Protocol.Tcp); + using var client = TestCommon.CreateClient(false, Protocol.Tcp); ValidateIfNonMatch(client); } @@ -557,48 +557,45 @@ public void ValidateCustomUserAgentContainerHeader() } [TestMethod] - public void ValidateVersionHeader() + public async Task ValidateVersionHeader() { string correctVersion = HttpConstants.Versions.CurrentVersion; + Database db = null; try { DocumentClient client = TestCommon.CreateClient(true); - var db = client.CreateDatabaseAsync(new Database() { Id = Guid.NewGuid().ToString() }).Result.Resource; + db = (await client.CreateDatabaseAsync(new Database() { Id = Guid.NewGuid().ToString() })).Resource; PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/pk" }), Kind = PartitionKind.Hash }; - var coll = client.CreateDocumentCollectionAsync(db.SelfLink, new DocumentCollection() { Id = Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition }).Result.Resource; - var doc = client.CreateDocumentAsync(coll.SelfLink, new Document()).Result.Resource; + var coll = (await client.CreateDocumentCollectionAsync(db.SelfLink, new DocumentCollection() { Id = Guid.NewGuid().ToString(), PartitionKey = partitionKeyDefinition })).Resource; + var doc = (await client.CreateDocumentAsync(coll.SelfLink, new Document())).Resource; + client.Dispose(); client = TestCommon.CreateClient(true); - doc = client.CreateDocumentAsync(coll.SelfLink, new Document()).Result.Resource; + doc = (await client.CreateDocumentAsync(coll.SelfLink, new Document())).Resource; HttpConstants.Versions.CurrentVersion = "2015-01-01"; + client.Dispose(); client = TestCommon.CreateClient(true); try { - doc = client.CreateDocumentAsync(coll.SelfLink, new Document()).Result.Resource; + doc = (await client.CreateDocumentAsync(coll.SelfLink, new Document())).Resource; Assert.Fail("Should have faild because of version error"); } - catch (AggregateException exception) + catch (CosmosException dce) { - var dce = exception.InnerException as CosmosException; - if (dce != null) - { - Assert.AreEqual(dce.StatusCode, HttpStatusCode.BadRequest); - } - else - { - Assert.Fail("Should have faild because of version error with DocumentClientException BadRequest"); - } + Assert.AreEqual(dce.StatusCode, HttpStatusCode.BadRequest); } } finally { HttpConstants.Versions.CurrentVersion = correctVersion; + using DocumentClient client = TestCommon.CreateClient(true); + await client.DeleteDatabaseAsync(db); } } [TestMethod] public async Task ValidateCurrentWriteQuorumAndReplicaSetHeader() { - CosmosClient client = TestCommon.CreateCosmosClient(false); + using CosmosClient client = TestCommon.CreateCosmosClient(false); Cosmos.Database db = null; try { @@ -626,7 +623,7 @@ public async Task ValidateCurrentWriteQuorumAndReplicaSetHeader() [TestCategory("Ignore") /* Used to filter out ignored tests in lab runs */] public void ValidateGlobalCompltedLSNAndNumberOfReadRegionsHeader() { - DocumentClient client = TestCommon.CreateClient(false); + using DocumentClient client = TestCommon.CreateClient(false); Database db = null; try { @@ -670,7 +667,7 @@ public async Task ValidateCollectionIndexProgressHeaders() [TestMethod] public async Task ValidateExcludeSystemProperties() { - var client = TestCommon.CreateClient(true); + using var client = TestCommon.CreateClient(true); await ValidateExcludeSystemProperties(client); } @@ -785,6 +782,8 @@ private async Task ValidateExcludeSystemProperties(DocumentClient client) //read document with default settings (system properties should be included) Document readDoc3Default = await client.ReadDocumentAsync(coll.AltLink + "/docs/doc3", new RequestOptions() { PartitionKey = new PartitionKey("doc3") }); Assert.AreEqual(readDoc3WithProps.ToString(), readDoc3Default.ToString()); + + await client.DeleteDatabaseAsync(db); } private async Task ValidateCollectionIndexProgressHeadersAsync(DocumentClient client, bool isElasticCollection) @@ -879,7 +878,7 @@ private async Task ValidateCollectionIndexProgressHeadersAsync(DocumentClient cl } finally { - client.DeleteDatabaseAsync(db).Wait(); + await client.DeleteDatabaseAsync(db); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/IndexMetricsParserBaselineTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/IndexMetricsParserBaselineTest.cs index 92425bf39c..6ae91f1375 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/IndexMetricsParserBaselineTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/IndexMetricsParserBaselineTest.cs @@ -40,6 +40,8 @@ public async static Task CleanUp() { await testDb.DeleteStreamAsync(); } + + cosmosClient.Dispose(); } [TestInitialize] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/InternalFriendsTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/InternalFriendsTest.cs index b1572e6f3c..a256394681 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/InternalFriendsTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/InternalFriendsTest.cs @@ -18,10 +18,12 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests public class InternalFriendsTest { private CosmosClient cosmosClient; + private Database database; [TestCleanup] - public void Cleanup() + public async Task Cleanup() { + await this.database?.DeleteAsync(); this.cosmosClient?.Dispose(); } @@ -99,10 +101,10 @@ private async Task CreateContainer(bool isLocalQuorumConsistency) } }); - Database database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), + this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), cancellationToken: new CancellationTokenSource().Token); - return await database.CreateContainerAsync(id: Guid.NewGuid().ToString(), + return await this.database.CreateContainerAsync(id: Guid.NewGuid().ToString(), partitionKeyPath: "/pk"); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAggregateFunctionsBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAggregateFunctionsBaselineTests.cs index 1beab5131b..0734f4dfad 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAggregateFunctionsBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAggregateFunctionsBaselineTests.cs @@ -54,6 +54,8 @@ public async static Task CleanUp() { await testDb.DeleteStreamAsync(); } + + client?.Dispose(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAttributeContractBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAttributeContractBaselineTests.cs index d311794526..7ffc36bdbd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAttributeContractBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqAttributeContractBaselineTests.cs @@ -39,12 +39,14 @@ public async static Task Initialize(TestContext textContext) } [ClassCleanup] - public static void CleanUp() + public static async Task CleanUp() { if (testDb != null) { - testDb.DeleteStreamAsync().Wait(); + await testDb.DeleteStreamAsync(); } + + client?.Dispose(); } [TestInitialize] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs index aa5e68141c..a9782bb26b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs @@ -46,6 +46,8 @@ public async static Task CleanUp() { await testDb.DeleteStreamAsync(); } + + cosmosClient?.Dispose(); } public class Address diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs index d3fecc59e6..f3c27a2230 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs @@ -64,6 +64,8 @@ public async static Task CleanUp() { await testDb.DeleteStreamAsync(); } + + cosmosClient?.Dispose(); } struct simple diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs index 67a4aa9364..01b64cd4fd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs @@ -60,6 +60,8 @@ public async static Task CleanUp() { await testDb.DeleteStreamAsync(); } + + cosmosClient?.Dispose(); } [TestInitialize] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs index be3412e05f..c81beaaeb8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs @@ -47,6 +47,8 @@ public async static Task CleanUp() { await testDb.DeleteStreamAsync(); } + + cosmosClient?.Dispose(); } [TestInitialize] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/MultiRegionStrongTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/MultiRegionStrongTests.cs deleted file mode 100644 index 1b17f6cac2..0000000000 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/MultiRegionStrongTests.cs +++ /dev/null @@ -1,286 +0,0 @@ -//------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -//------------------------------------------------------------ - -namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Threading; - using System.Threading.Tasks; - using Microsoft.Azure.Cosmos.Utils; - using Microsoft.Azure.Cosmos.Services.Management.Tests; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using Microsoft.Azure.Documents.Client; - using Microsoft.Azure.Documents; - using System.Net.Http; - - [TestClass] - public sealed class MultiRegionStrongTests - { - private const string repairInProgressFileName = "ManualRepair.InProgress"; - - private string DatabaseName; - private string CollectionName; - - private DocumentClient read0; - private DocumentClient read1; - private DocumentClient read2; - - private DocumentClient write0; - private DocumentClient write1; - private DocumentClient write2; - - - [TestInitialize] - public void TestInitialize() - { - this.DatabaseName = Guid.NewGuid().ToString(); - this.CollectionName = Guid.NewGuid().ToString(); - - this.read0 = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: true); - read0.LockClient(0); - - this.read1 = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: true); - read1.LockClient(1); - - this.read2 = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: true); - read2.LockClient(2); - - this.write0 = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: false); - write0.LockClient(0); - - this.write1 = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: false); - write1.LockClient(1); - - this.write2 = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: false); - write2.LockClient(2); - } - - private async Task SetupSingleCollectionScenario() - { - DocumentClient client = TestCommon.CreateClient(true); - await TestCommon.DeleteAllDatabasesAsync(); - - Database database = (await client.CreateDatabaseAsync(new Database { Id = this.DatabaseName })).Resource; - DocumentCollection collection = (await client.CreateDocumentCollectionIfNotExistsAsync(database.SelfLink, new DocumentCollection { Id = this.CollectionName }, new RequestOptions { OfferThroughput = 10000 })).Resource; - - // await Task.Delay(30000); - - return collection; - } - - private DocumentClient GetDocumentClient(ConnectionMode connectionMode, Protocol protocol, List preferredRegions) - { - ConnectionPolicy connectionPolicy = new ConnectionPolicy { ConnectionMode = connectionMode, ConnectionProtocol = protocol }; - foreach (string preferredRegion in preferredRegions) - { - connectionPolicy.PreferredLocations.Add(preferredRegion); - } - - return new DocumentClient( - new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), - ConfigurationManager.AppSettings["MasterKey"], - (HttpMessageHandler)null, - connectionPolicy); - } - - private async Task CreateDocumentsAsync(string collectionSelfLink, DocumentClient client, CancellationToken cancellationToken) - { - int writeCount = 0; - - int i = 0; - while (i < 50000) - { - if (cancellationToken.IsCancellationRequested) - { - Logger.LogLine("WriteCount: {0}", writeCount); - return; - } - - Document doc = (await client.CreateDocumentAsync(collectionSelfLink, new Document { Id = Guid.NewGuid().ToString() })).Resource; - writeCount++; - await client.ReadDocumentAsync(doc.SelfLink); - - i++; - } - } - - private async Task ReadDocumentsAsync(string collectionSelfLink, DocumentClient client, CancellationToken cancellationToken) - { - int readFeedCount = 0; - int readCount = 0; - - int i = 0; - while (i < 50000) - { - if (cancellationToken.IsCancellationRequested) - { - Logger.LogLine("ReadFeedCount: {0}, ReadCount: {1}", readFeedCount, readCount); - return; - } - - DocumentFeedResponse response = await client.ReadDocumentFeedAsync(collectionSelfLink); - readFeedCount++; - - foreach (var doc in response) - { - await client.ReadDocumentAsync(doc.SelfLink); - readCount++; - } - - i++; - } - } - - private void ResumeReplicas(string documentId) - { - ResourceId documentRId = ResourceId.Parse(documentId); - string collectionId = documentRId.DocumentCollectionId.ToString(); - IEnumerable indexFiles = Directory.EnumerateFiles("c:\\wfroot\\", "*.bwdata", SearchOption.AllDirectories); - List collectionIndexFiles = new List(); - - foreach (string indexFile in indexFiles) - { - if (indexFile.Contains(collectionId)) - { - collectionIndexFiles.Add(indexFile); - } - } - - foreach (string fileName in collectionIndexFiles) - { - string directoryName = Path.GetDirectoryName(fileName); - string manualRecoveryFileFullName = Path.Combine(directoryName, MultiRegionStrongTests.repairInProgressFileName); - try - { - File.Delete(manualRecoveryFileFullName); - } - catch (FileNotFoundException) - { - } - } - } - /* - private async Task TestGlobalStrongAsync(ConnectionMode connectionMode, Protocol protocol) - { - await TestCommon.DeleteAllDatabasesAsync(TestCommon.CreateClient(true)); - using (await TestCommon.OverrideGlobalDatabaseAccountConfigurationsAsync(Tuple.Create("defaultConsistencyLevel", "Strong"))) - { - await Task.Delay(TimeSpan.FromSeconds(35)); - - ConnectionPolicy scusConnectionPolicy = new ConnectionPolicy { ConnectionMode = connectionMode, ConnectionProtocol = protocol }; - scusConnectionPolicy.PreferredLocations.Add("South Central US"); - - ConnectionPolicy wusConnectionPolicy = new ConnectionPolicy { ConnectionMode = connectionMode, ConnectionProtocol = protocol }; - wusConnectionPolicy.PreferredLocations.Add("West US"); - - DocumentClient scusClient = new DocumentClient( - new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), - ConfigurationManager.AppSettings["MasterKey"], - scusConnectionPolicy); - - DocumentClient wusClient = new DocumentClient( - new Uri(ConfigurationManager.AppSettings["GatewayEndpoint"]), - ConfigurationManager.AppSettings["MasterKey"], - wusConnectionPolicy); - - Database database = (await scusClient.CreateDatabaseIfNotExistsAsync(new Database { Id = "database" })).Resource; - DocumentCollection collection = (await scusClient.CreateDocumentCollectionIfNotExistsAsync(database.SelfLink, new DocumentCollection { Id = "collection" }, new RequestOptions { OfferThroughput = 10000 })).Resource; - Document doc = (await scusClient.CreateDocumentAsync(collection.SelfLink, new Document { Id = "lockDoc" })).Resource; - await Task.Delay(TimeSpan.FromSeconds(30)); - - CancellationTokenSource tokenSource = new CancellationTokenSource(); - Task writeTask = Task.Factory.StartNew(async () => await CreateDocumentsAsync(collection.SelfLink, scusClient, tokenSource.Token)); - Task readTask1 = Task.Factory.StartNew(async () => await ReadDocumentsAsync(collection.SelfLink, scusClient, tokenSource.Token)); - Task readTask2 = Task.Factory.StartNew(async () => await ReadDocumentsAsync(collection.SelfLink, wusClient, tokenSource.Token)); - - for (uint i = 0; i < 10; i++) - { - bool isReadRegion = i % 2 == 1; - uint replicaIndexToLock = i % 3; - DocumentClient crashClient = TestCommon.CreateClient(false, enableEndpointDiscovery: false, tokenType: AuthorizationTokenType.SystemAll, createForGeoRegion: isReadRegion); - crashClient.LockClient(replicaIndexToLock); - - try - { - await crashClient.CrashAsync(doc.ResourceId, typeof(Document)); - } - catch (DocumentClientException ex) - { - Logger.LogLine("Hit exception {0} while crashing replica index {1}, isReadRegion: {2}", ex.ToString(), replicaIndexToLock, isReadRegion); - } - } - - tokenSource.Cancel(); - await writeTask; - await readTask1; - await readTask2; - - Assert.IsTrue(!this.isWriteExceptionCaught); - Assert.IsTrue(!this.isReadExceptionCaught); - } - } - - private async Task CreateDocumentsAsync(string collectionSelfLink, DocumentClient client, CancellationToken cancellationToken) - { - this.isWriteExceptionCaught = false; - int writeCount = 0; - while (true) - { - if (cancellationToken.IsCancellationRequested) - { - Logger.LogLine("WriteCount: {0}", writeCount); - return; - } - - try - { - await client.CreateDocumentAsync(collectionSelfLink, new Document { Id = Guid.NewGuid().ToString() }); - writeCount++; - } - catch (DocumentClientException ex) - { - Logger.LogLine("Hit exception {0} while creating document.", ex.ToString()); - this.isWriteExceptionCaught = true; - } - } - } - - private async Task ReadDocumentsAsync(string collectionSelfLink, DocumentClient client, CancellationToken cancellationToken) - { - this.isReadExceptionCaught = false; - int readFeedCount = 0; - int readCount = 0; - while (true) - { - if (cancellationToken.IsCancellationRequested) - { - Logger.LogLine("ReadFeedCount: {0}, ReadCount: {1}", readFeedCount, readCount); - return; - } - - string continuationToken = null; - try - { - DoucmentFeedResponse response = await client.ReadDocumentFeedAsync(collectionSelfLink, new FeedOptions { RequestContinuation = continuationToken }); - readFeedCount++; - continuationToken = response.ResponseContinuation; - - foreach(var doc in response) - { - await client.ReadDocumentAsync(doc.SelfLink); - readCount++; - } - } - catch (DocumentClientException ex) - { - Logger.LogLine("Hit exception {0} while reading document.", ex.ToString()); - this.isReadExceptionCaught = true; - } - } - } - */ - } -} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs index 6c29791783..1dc1cd9af0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/NameRoutingTests.cs @@ -32,7 +32,7 @@ public class NameRoutingTests [TestMethod] public async Task NameRoutingSmokeGatewayTest() { - CosmosClient client = TestCommon.CreateCosmosClient(true); + using CosmosClient client = TestCommon.CreateCosmosClient(true); await SmokeTestForNameAPI(client); } @@ -419,12 +419,10 @@ private async Task SmokeTestForNameAPI(CosmosClient client) } [TestMethod] - public void ReplaceDocumentWithUri() + public async Task ReplaceDocumentWithUri() { - CosmosClient client; - - client = TestCommon.CreateCosmosClient(true); - this.ReplaceDocumentWithUriPrivateAsync(client).Wait(); + using CosmosClient client = TestCommon.CreateCosmosClient(true); + await this.ReplaceDocumentWithUriPrivateAsync(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator @@ -477,6 +475,8 @@ private async Task ReplaceDocumentWithUriPrivateAsync(CosmosClient client) sqlQueryText = @"select * from root r where r.title = ""My old Book"""; cosmosResultSet = collection.GetItemQueryIterator(queryText: sqlQueryText, requestOptions: options); Assert.AreEqual(1, await GetCountFromIterator(cosmosResultSet), "Query Count doesnt match"); + + await database.DeleteStreamAsync(); } [TestMethod] @@ -484,8 +484,7 @@ public async Task CollectionDeleteAndCreateWithSameNameTest() { // when collection name changes, the collectionName ->Id cache at the gateway need to get invalidated and refreshed. // This test is to verify this case is working well. - DocumentClient client; - client = TestCommon.CreateClient(true); + using DocumentClient client = TestCommon.CreateClient(true); await this.CollectionDeleteAndCreateWithSameNameTestPrivateAsync(client); #if DIRECT_MODE @@ -557,7 +556,7 @@ private async Task CollectionDeleteAndCreateWithSameNameTestPrivateAsync(Documen finally { - TestCommon.DeleteAllDatabasesAsync().Wait(); + await TestCommon.DeleteAllDatabasesAsync(); } } @@ -1368,7 +1367,8 @@ public async Task TestInvalidPartitionKeyException() [Ignore /* TODO: This tests throws a "The read session is not available for the input session token" */] public async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForQuery() { - await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForQuery(TestCommon.CreateClient(true)); + using DocumentClient client = TestCommon.CreateClient(true); + await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForQuery(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); @@ -1425,7 +1425,8 @@ internal async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartiti [Ignore /* TODO: This tests throws a "The read session is not available for the input session token" */] public async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForParallelQuery() { - await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForParallelQuery(TestCommon.CreateClient(true)); + using DocumentClient client = TestCommon.CreateClient(true); + await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForParallelQuery(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartitionedToPartitionedForParallelQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); @@ -1442,12 +1443,12 @@ internal async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartiti await client.CreateDocumentAsync("/dbs/db1/colls/coll1", document1); Assert.AreEqual(1, client.CreateDocumentQuery("/dbs/db1/colls/coll1", "SELECT * FROM c WHERE c.field1 IN (1, 2)", new FeedOptions { EnableCrossPartitionQuery = true }).AsEnumerable().Count()); - DocumentClient otherClient = TestCommon.CreateClient(false); + using DocumentClient otherClient = TestCommon.CreateClient(false); await otherClient.DeleteDocumentCollectionAsync("/dbs/db1/colls/coll1"); PartitionKeyDefinition partitionKeyDefinition2 = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/field2" }), Kind = PartitionKind.Hash }; DocumentCollection coll = await TestCommon.CreateCollectionAsync(otherClient, "/dbs/db1", new DocumentCollection { Id = "coll1", PartitionKey = partitionKeyDefinition2 }, new RequestOptions { OfferThroughput = 12000 }); - DocumentClient directClient = TestCommon.CreateClient(false); + using DocumentClient directClient = TestCommon.CreateClient(false); string sessionToken1 = (await directClient.CreateDocumentAsync("/dbs/db1/colls/coll1", document1)).SessionToken; document1 = new Document { Id = "doc2" }; document1.SetPropertyValue("field1", 2); @@ -1466,7 +1467,7 @@ internal async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartiti Assert.AreEqual(2, client.CreateDocumentQuery("/dbs/db1/colls/coll1", "SELECT * FROM c WHERE c.field1 IN (1, 2)", new FeedOptions { EnableCrossPartitionQuery = true }).AsEnumerable().Count()); - DocumentClient newClient = TestCommon.CreateClient(false); + using DocumentClient newClient = TestCommon.CreateClient(false); Assert.AreEqual(2, newClient.CreateDocumentQuery("/dbs/db1/colls/coll1", "SELECT * FROM c WHERE c.field1 IN (1, 2)", new FeedOptions { EnableCrossPartitionQuery = true }).AsEnumerable().Count()); } @@ -1479,8 +1480,10 @@ internal async Task TestPartitionKeyDefinitionOnCollectionRecreateFromNonPartiti [TestMethod] public async Task TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery() { - await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(TestCommon.CreateClient(true)); - await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); + using DocumentClient client = TestCommon.CreateClient(true); + await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(client); + using DocumentClient directClient = TestCommon.CreateClient(false, protocol: Protocol.Tcp); + await this.TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(directClient); } internal async Task TestCollectionRecreateFromMultipartitionToSinglePartitionedForQuery(DocumentClient client) @@ -1523,7 +1526,8 @@ internal async Task TestCollectionRecreateFromMultipartitionToSinglePartitionedF [TestMethod] public async Task TestRouteToNonExistentRangeAfterCollectionRecreate() { - await this.TestRouteToNonExistentRangeAfterCollectionRecreate(TestCommon.CreateCosmosClient(true)); + using CosmosClient client = TestCommon.CreateCosmosClient(true); + await this.TestRouteToNonExistentRangeAfterCollectionRecreate(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestRouteToNonExistentRangeAfterCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); @@ -1595,7 +1599,8 @@ internal async Task TestRouteToNonExistentRangeAfterCollectionRecreate(CosmosCli [TestMethod] public async Task TestRouteToExistentRangeAfterCollectionRecreate() { - await this.TestRouteToExistentRangeAfterCollectionRecreate(TestCommon.CreateCosmosClient(true)); + using CosmosClient client = TestCommon.CreateCosmosClient(true); + await this.TestRouteToExistentRangeAfterCollectionRecreate(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestRouteToExistentRangeAfterCollectionRecreate(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); @@ -1673,7 +1678,8 @@ internal async Task TestRouteToExistentRangeAfterCollectionRecreate(CosmosClient [TestMethod] public async Task TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedToNonPartitionedForQuery() { - await this.TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedToNonPartitionedForQuery(TestCommon.CreateClient(true)); + using DocumentClient client = TestCommon.CreateClient(true); + await this.TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedToNonPartitionedForQuery(client); #if DIRECT_MODE // DIRECT MODE has ReadFeed issues in the Public emulator await this.TestPartitionKeyDefinitionOnCollectionRecreateFromPartitionedToNonPartitionedForQuery(TestCommon.CreateClient(false, protocol: Protocol.Tcp)); @@ -1724,7 +1730,8 @@ internal async Task TestPartitionKeyDefinitionOnCollectionRecreateFromPartitione [TestMethod] public async Task TestScriptCreateOnContainerRecreateFromDifferentPartitionKeyPath() { - await this.TestScriptCreateOnContainerRecreateFromDifferentPartitionKeyPath(TestCommon.CreateCosmosClient(true)); + using CosmosClient client = TestCommon.CreateCosmosClient(true); + await this.TestScriptCreateOnContainerRecreateFromDifferentPartitionKeyPath(client); } internal async Task TestScriptCreateOnContainerRecreateFromDifferentPartitionKeyPath(CosmosClient client) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/OfferTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/OfferTests.cs index aa92401e3e..d2015cc8ae 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/OfferTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/OfferTests.cs @@ -88,11 +88,11 @@ public static void Initialize(TestContext textContext) } [TestInitialize] - public void TestInitialize() + public async Task TestInitialize() { using (DocumentClient client = TestCommon.CreateClient(true)) { - TestCommon.DeleteAllDatabasesAsync().Wait(); + await TestCommon.DeleteAllDatabasesAsync(); } } @@ -100,7 +100,7 @@ public void TestInitialize() [Ignore] //Not a valid scenerio for V3 SDK onwards public async Task ValidateOfferCreateNegative_1() { - DocumentClient client = TestCommon.CreateClient(false); + using DocumentClient client = TestCommon.CreateClient(false); Database database = (await client.CreateDatabaseAsync(new Database { Id = Guid.NewGuid().ToString("N") })).Resource; @@ -123,7 +123,7 @@ public async Task ValidateOfferCreateNegative_1() [TestMethod] public async Task ValidateOfferDefaults() { - DocumentClient client = TestCommon.CreateClient(false); + using DocumentClient client = TestCommon.CreateClient(false); Database database = (await client.CreateDatabaseAsync(new Database { Id = Guid.NewGuid().ToString("N") })).Resource; string collectionId = Guid.NewGuid().ToString("N"); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs index 1b7d554772..d0bdb59adb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/PartitionKeyRangeCacheTests.cs @@ -79,7 +79,7 @@ public async Task VerifyPkRangeCacheRefreshOnSplitWithErrorsAsync() }) }; - CosmosClient resourceClient = TestCommon.CreateCosmosClient(clientOptions); + using CosmosClient resourceClient = TestCommon.CreateCosmosClient(clientOptions); string dbName = Guid.NewGuid().ToString(); string containerName = nameof(PartitionKeyRangeCacheTests); @@ -143,6 +143,8 @@ public async Task VerifyPkRangeCacheRefreshOnSplitWithErrorsAsync() } Assert.AreEqual(0, exceptions.Count, $"Unexpected exceptions: {string.Join(';', exceptions)}"); + + await db.DeleteStreamAsync(); } private async Task CreateAndReadItemBackgroundLoop(Container container, List exceptions) @@ -213,7 +215,7 @@ public async Task VerifyPkRangeCacheRefreshOnThrottlesAsync() }) }; - CosmosClient resourceClient = TestCommon.CreateCosmosClient(clientOptions); + using CosmosClient resourceClient = TestCommon.CreateCosmosClient(clientOptions); string dbName = Guid.NewGuid().ToString(); string containerName = nameof(PartitionKeyRangeCacheTests); @@ -239,6 +241,8 @@ public async Task VerifyPkRangeCacheRefreshOnThrottlesAsync() Assert.AreEqual(4, pkRangeCalls); Assert.AreEqual(0, ifNoneMatchValues.Count(x => string.IsNullOrEmpty(x)), "The cache is already init. It should never re-initialize the cache."); + + await db.DeleteStreamAsync(); } [TestMethod] @@ -272,7 +276,7 @@ public async Task VerifyPkRangeCacheRefreshOnTimeoutsAsync() HttpClientFactory = () => new HttpClient(httpHandlerHelper), }; - CosmosClient resourceClient = TestCommon.CreateCosmosClient(clientOptions); + using CosmosClient resourceClient = TestCommon.CreateCosmosClient(clientOptions); string dbName = Guid.NewGuid().ToString(); string containerName = nameof(PartitionKeyRangeCacheTests); @@ -288,12 +292,14 @@ public async Task VerifyPkRangeCacheRefreshOnTimeoutsAsync() Assert.AreEqual(3, pkRangeCalls); Assert.AreEqual(2, ifNoneMatchValues.Count(x => string.IsNullOrEmpty(x)), "First call is a 408"); + + await db.DeleteStreamAsync(); } [TestMethod] public async Task TestRidRefreshOnNotFoundAsync() { - CosmosClient resourceClient = TestCommon.CreateCosmosClient(); + using CosmosClient resourceClient = TestCommon.CreateCosmosClient(); string dbName = Guid.NewGuid().ToString(); string containerName = Guid.NewGuid().ToString(); @@ -301,7 +307,7 @@ public async Task TestRidRefreshOnNotFoundAsync() Database db = await resourceClient.CreateDatabaseAsync(dbName); Container container = await db.CreateContainerAsync(containerName, "/_id"); - CosmosClient testClient = TestCommon.CreateCosmosClient(); + using CosmosClient testClient = TestCommon.CreateCosmosClient(); ContainerInternal testContainer = (ContainerInlineCore)testClient.GetContainer(dbName, containerName); // Populate the RID cache. @@ -326,6 +332,8 @@ public async Task TestRidRefreshOnNotFoundAsync() CollectionRoutingMap collectionRoutingMapFromCache = await testContainer.GetRoutingMapAsync(cancellationToken: default); Assert.AreEqual(collectionRoutingMap, collectionRoutingMapFromCache); + + await db.DeleteStreamAsync(); } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs index c196af9d44..8af5eeafef 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/QueryTestsBase.cs @@ -40,12 +40,6 @@ public abstract class QueryTestsBase internal CosmosClient Client; internal Cosmos.Database database; - public QueryTestsBase() - { - this.GatewayClient = TestCommon.CreateCosmosClient(true, builder => builder.AddCustomHandlers(this.GatewayRequestChargeHandler)); - this.Client = TestCommon.CreateCosmosClient(false, builder => builder.AddCustomHandlers(this.DirectRequestChargeHandler)); - } - [FlagsAttribute] internal enum ConnectionModes { @@ -63,17 +57,11 @@ internal enum CollectionTypes MultiPartition = 0x4, } - [ClassInitialize] - [ClassCleanup] - public static void ClassSetup(TestContext testContext = null) - { - CosmosClient client = TestCommon.CreateCosmosClient(false); - QueryTestsBase.CleanUp(client).Wait(); - } - [TestInitialize] public async Task Initialize() { + this.GatewayClient = TestCommon.CreateCosmosClient(true, builder => builder.AddCustomHandlers(this.GatewayRequestChargeHandler)); + this.Client = TestCommon.CreateCosmosClient(false, builder => builder.AddCustomHandlers(this.DirectRequestChargeHandler)); this.database = await this.Client.CreateDatabaseAsync(Guid.NewGuid().ToString() + "db"); } @@ -81,6 +69,8 @@ public async Task Initialize() public async Task Cleanup() { await this.database.DeleteStreamAsync(); + this.Client.Dispose(); + this.GatewayClient.Dispose(); } private static string GetApiVersion() @@ -359,6 +349,8 @@ internal async Task RunWithApiVersion(string apiVersion, Func function) } finally { + this.Client.Dispose(); + this.GatewayClient.Dispose(); this.Client = originalCosmosClient; this.GatewayClient = originalGatewayClient; this.database = originalDatabase; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs index 6d6484e5a9..afc25ec771 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryTests.cs @@ -68,6 +68,16 @@ public void TestInitialize() this.CleanUp(); } + [TestCleanup] + public void TestCleanup() + { + this.CleanUp(); + + this.client.Dispose(); + this.primaryReadonlyClient.Dispose(); + this.secondaryReadonlyClient.Dispose(); + } + [ClassInitialize] public static void Initialize(TestContext textContext) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs index 6aa1b2ca16..485f75a2a5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SmokeTests.cs @@ -33,6 +33,13 @@ static SmokeTests() { } + [TestCleanup] + public async Task Cleanup() + { + await this.client.GetDatabase(DatabaseName).DeleteStreamAsync(); + this.client?.Dispose(); + } + /// /// Test for the existence of native assembly dependencies /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SpatialTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SpatialTest.cs index 63eaaeda46..279014dccf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SpatialTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SpatialTest.cs @@ -27,14 +27,22 @@ private class SpatialSampleClass public Geometry Location { get; set; } } - private readonly DocumentClient client; + private DocumentClient client; - public SpatialTest() + [TestInitialize] + public void TestInitialize() { this.client = TestCommon.CreateClient(true, defaultConsistencyLevel: ConsistencyLevel.Session); this.CleanUp(); } + [TestCleanup] + public void TestCleanup() + { + this.CleanUp(); + this.client.Dispose(); + } + [TestMethod] public async Task TestDistanceAndWithin() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/StoredProcedureTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/StoredProcedureTests.cs index 8e61c2dcc9..6d8a0f7873 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/StoredProcedureTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/StoredProcedureTests.cs @@ -2,11 +2,9 @@ // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ -using System.Net.Http; -using Microsoft.Azure.Documents.Client; - namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { + using System.Net.Http; using System; using System.Collections.Generic; using System.IO; @@ -14,7 +12,6 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System.Text; using System.Threading; using System.Threading.Tasks; - using Microsoft.Azure.Cosmos.Fluent; using Microsoft.Azure.Cosmos.Scripts; using Microsoft.Azure.Documents; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -34,8 +31,8 @@ public async Task TestInitialize() SendingRequestEventArgs = this.SendingRequestEventHandlerScriptsVerifier, }; - this.cosmosClient = TestCommon.CreateCosmosClient(clientOptions); - this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), + this.SetClient(TestCommon.CreateCosmosClient(clientOptions)); + this.database = await this.GetClient().CreateDatabaseAsync(Guid.NewGuid().ToString(), cancellationToken: this.cancellationToken); string containerName = Guid.NewGuid().ToString(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs index 9f200af263..ae94a7220d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs @@ -32,6 +32,7 @@ public async Task TestInitialize() public async Task Cleanup() { await this.Database.DeleteAsync(); + this.Client.Dispose(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index bb46c0f3f3..e81eda0d01 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -98,6 +98,10 @@ public static async Task ClassCleanupAsync() Util.DisposeOpenTelemetryAndCustomListeners(); + EndToEndTraceWriterBaselineTests.client?.Dispose(); + EndToEndTraceWriterBaselineTests.bulkClient?.Dispose(); + EndToEndTraceWriterBaselineTests.miscCosmosClient?.Dispose(); + await Task.Delay(5000); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs index 720f37375c..9e7394bf21 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TransportWrapperTests.cs @@ -19,7 +19,7 @@ public class TransportWrapperTests [TestMethod] public async Task TransportInterceptorContractTest() { - CosmosClient cosmosClient = TestCommon.CreateCosmosClient( + using CosmosClient cosmosClient = TestCommon.CreateCosmosClient( builder => { builder.WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper(transportClient, TransportWrapperTests.Interceptor)); @@ -31,12 +31,13 @@ public async Task TransportInterceptorContractTest() string id1 = Guid.NewGuid().ToString(); TestPayload payload1 = await container.CreateItemAsync(new TestPayload { id = id1 }); payload1 = await container.ReadItemAsync(id1, new Cosmos.PartitionKey(id1)); + await database.DeleteStreamAsync(); } [TestMethod] public async Task TransportExceptionValidationTest() { - CosmosClient cosmosClient = TestCommon.CreateCosmosClient( + using CosmosClient cosmosClient = TestCommon.CreateCosmosClient( builder => { builder.WithTransportClientHandlerFactory(transportClient => new TransportClientWrapper( @@ -79,7 +80,9 @@ public async Task TransportExceptionValidationTest() using (ResponseMessage responseMessage = await streamIterator.ReadNextAsync()) { this.ValidateTransportException(responseMessage); - } + } + + await database.DeleteStreamAsync(); } private void ValidateTransportException(CosmosException cosmosException) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TriggersTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TriggersTests.cs index d32f33643d..82d76427d5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TriggersTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/TriggersTests.cs @@ -29,8 +29,8 @@ public async Task TestInitialize() SendingRequestEventArgs = this.SendingRequestEventHandlerTriggersVerifier, }; - this.cosmosClient = TestCommon.CreateCosmosClient(clientOptions); - this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), + this.SetClient(TestCommon.CreateCosmosClient(clientOptions)); + this.database = await this.GetClient().CreateDatabaseAsync(Guid.NewGuid().ToString(), cancellationToken: this.cancellationToken); string PartitionKey = "/pk"; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UniqueIndexTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UniqueIndexTests.cs index e6a33ab170..f2c856b837 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UniqueIndexTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UniqueIndexTests.cs @@ -34,6 +34,8 @@ public async Task TestCleanupAsync() { using (await this.database.DeleteStreamAsync()) { } } + + this.client.Dispose(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UserDefinedFunctionsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UserDefinedFunctionsTests.cs index 6ff6c117ee..cf3354575d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UserDefinedFunctionsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/UserDefinedFunctionsTests.cs @@ -28,8 +28,8 @@ public async Task TestInitialize() SendingRequestEventArgs = this.SendingRequestEventHandlerUdfVerifier, }; - this.cosmosClient = TestCommon.CreateCosmosClient(clientOptions); - this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), + this.SetClient(TestCommon.CreateCosmosClient(clientOptions)); + this.database = await this.GetClient().CreateDatabaseAsync(Guid.NewGuid().ToString(), cancellationToken: this.cancellationToken); string PartitionKey = "/pk"; ContainerResponse response = await this.database.CreateContainerAsync( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs index 20f083d85d..26930a59a0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/BaseCosmosClientHelper.cs @@ -11,34 +11,44 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests public abstract class BaseCosmosClientHelper { - protected CosmosClient cosmosClient = null; + private static readonly CosmosClient defaultCosmosClient = TestCommon.CreateCosmosClient(); + + private CosmosClient cosmosClient = null; protected Database database = null; protected CancellationTokenSource cancellationTokenSource = null; protected CancellationToken cancellationToken; - public async Task TestInit( - bool validateSinglePartitionKeyRangeCacheCall = false, - Action customizeClientBuilder = null, - string accountEndpointOverride = null) + private async Task BaseInit(CosmosClient client) + { + this.cancellationTokenSource = new CancellationTokenSource(); + this.cancellationToken = this.cancellationTokenSource.Token; + + this.database = await client.CreateDatabaseAsync(Guid.NewGuid().ToString(), + cancellationToken: this.cancellationToken); + } + + public async Task TestInit() { this.cancellationTokenSource = new CancellationTokenSource(); this.cancellationToken = this.cancellationTokenSource.Token; + await this.BaseInit(BaseCosmosClientHelper.defaultCosmosClient); + } + + public async Task TestInit( + bool validateSinglePartitionKeyRangeCacheCall, + Action customizeClientBuilder = null, + string accountEndpointOverride = null) + { this.cosmosClient = TestCommon.CreateCosmosClient( validatePartitionKeyRangeCalls: validateSinglePartitionKeyRangeCacheCall, customizeClientBuilder: customizeClientBuilder, accountEndpointOverride: accountEndpointOverride); - this.database = await this.cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString(), - cancellationToken: this.cancellationToken); + await this.BaseInit(this.cosmosClient); } public async Task TestCleanup() { - if (this.cosmosClient == null) - { - return; - } - if (this.database != null) { await this.database.DeleteStreamAsync( @@ -48,7 +58,19 @@ await this.database.DeleteStreamAsync( this.cancellationTokenSource?.Cancel(); - this.cosmosClient.Dispose(); + // Only dispose if the caller set a custom client + this.cosmosClient?.Dispose(); + } + + public CosmosClient GetClient() + { + return this.cosmosClient ?? BaseCosmosClientHelper.defaultCosmosClient; + } + + public void SetClient(CosmosClient client) + { + this.cosmosClient?.Dispose(); + this.cosmosClient = client; } } } diff --git a/templates/emulator-setup.yml b/templates/emulator-setup.yml index 56ba69b98b..f081209295 100644 --- a/templates/emulator-setup.yml +++ b/templates/emulator-setup.yml @@ -1,30 +1,52 @@ # File: templates/emulator-setup.yml steps: - - pwsh: | - Write-Host "Downloading Cosmos Emulator - $env:EMULATORMSIURL" -ForegroundColor green - Invoke-WebRequest "$env:EMULATORMSIURL" -OutFile "$env:temp\azure-cosmosdb-emulator.msi" - Write-Host "Finished Downloading Cosmos Emulator - $env:temp\azure-cosmosdb-emulator.msi" -ForegroundColor green - dir "$env:temp" - choco install lessmsi - choco upgrade lessmsi - mkdir "$env:temp\Azure Cosmos DB Emulator" - lessmsi x "$env:temp\azure-cosmosdb-emulator.msi" "$env:temp\Azure Cosmos DB Emulator\" - Write-Host "Starting Comsos DB Emulator" -ForegroundColor green - Add-MpPreference -ExclusionPath "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator" - Start-Process "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI /DisableRateLimiting /PartitionCount=100 /Consistency=Strong /enableRio /EnablePreview /EnableAadAuthentication /EnableSqlComputeEndpoint" -Verb RunAs - Import-Module "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" - Get-Item env:* | Sort-Object -Property Name - for ($i=0; $i -lt 10; $i++) { - $status=Get-CosmosDbEmulatorStatus + - pwsh: | + Write-Host "Downloading Cosmos Emulator - $env:EMULATORMSIURL" -ForegroundColor green + Invoke-WebRequest "$env:EMULATORMSIURL" -OutFile "$env:temp\azure-cosmosdb-emulator.msi" + Write-Host "Finished Downloading Cosmos Emulator - $env:temp\azure-cosmosdb-emulator.msi" -ForegroundColor green + dir "$env:temp" + choco install lessmsi + choco upgrade lessmsi + mkdir "$env:temp\Azure Cosmos DB Emulator" + lessmsi x "$env:temp\azure-cosmosdb-emulator.msi" "$env:temp\Azure Cosmos DB Emulator\" + Add-MpPreference -ExclusionPath "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator" + Add-MpPreference -ExclusionPath "$env:localappdata\CosmosDBEmulator" + displayName: Downloading and Installing Cosmos DB Emulator + failOnStderr: true + errorActionPreference: stop + - pwsh: | + Write-Host "Starting Cosmos DB Emulator" -ForegroundColor green + Import-Module "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\PSModules\Microsoft.Azure.CosmosDB.Emulator" + Get-Item env:* | Sort-Object -Property Name + + for ($j=0; $j -lt 3; $j++) { + Write-Host "Attempt $j" + Start-Process "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/NoExplorer /NoUI /DisableRateLimiting /PartitionCount=50 /Consistency=Strong /EnablePreview /EnableSqlComputeEndpoint" -Verb RunAs + for ($i=0; $i -lt 5; $i++) { + $status = Get-CosmosDbEmulatorStatus + Write-Host "Cosmos DB Emulator Status: $status" if ($status -ne "Running") { sleep 30; - Write-Host "Cosmos DB Emulator Status: $status" -ForegroundColor yellow - } else { + } + else { break; } } - - displayName: Install Public Cosmos DB Emulator - failOnStderr: true - errorActionPreference: stop + if ($status -ne "Running") { + Write-Host "Shutting down and restarting" + Start-Process "$env:temp\Azure Cosmos DB Emulator\SourceDir\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" "/Shutdown" -Verb RunAs + sleep 30; + } + else { + break; + } + } + + if ($status -ne "Running") { + Write-Error "Emulator failed to start" + } + + displayName: Waiting for Cosmos DB Emulator status + failOnStderr: true + errorActionPreference: stop From 6434c1074615cf435085cba5a5e31f62d3ea6b37 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Tue, 14 Feb 2023 14:52:55 -0800 Subject: [PATCH 055/164] [Internal] GitHub Template: Adds needs-investigation label (#3708) By default, all "Bug report" issues will have "needs-investigation" --- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 40d469e6fe..39dc8d035f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: '' +labels: needs-investigation assignees: '' --- From 4e923da024956732acfa44a5205104cdd751bee4 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Tue, 14 Feb 2023 15:57:51 -0800 Subject: [PATCH 056/164] Adding fabric bot action (#3709) --- .github/fabricbot.json | 56 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 54 insertions(+), 2 deletions(-) diff --git a/.github/fabricbot.json b/.github/fabricbot.json index eddfa52721..90924da0c3 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -6,7 +6,6 @@ "capabilityId": "ScheduledSearch", "subCapability": "ScheduledSearch", "version": "1.1", - "id": "a-PNOJWK3Jbr7QY7vkc2O", "config": { "frequency": [ { @@ -50,7 +49,60 @@ ] }, "disabled": true + }, + { + "taskType": "trigger", + "capabilityId": "IssueResponder", + "subCapability": "IssuesOnlyResponder", + "version": "1.0", + "config": { + "conditions": { + "operator": "and", + "operands": [ + { + "operator": "not", + "operands": [ + { + "name": "isAssignedToSomeone", + "parameters": {} + } + ] + }, + { + "name": "isAction", + "parameters": { + "action": "opened" + } + }, + { + "operator": "not", + "operands": [ + { + "name": "hasLabel", + "parameters": { + "label": "needs-investigation" + } + } + ] + } + ] + }, + "eventType": "issue", + "eventNames": [ + "issues", + "project_card" + ], + "taskName": "Add needs-investigation", + "actions": [ + { + "name": "addLabel", + "parameters": { + "label": "needs-investigation" + } + } + ] + } } ], "userGroups": [] -} +} \ No newline at end of file From 38d1bcc09022b3d96fcc34cb51aa0912f211b10b Mon Sep 17 00:00:00 2001 From: Abhijeet Mohanty Date: Fri, 17 Feb 2023 14:46:38 -0500 Subject: [PATCH 057/164] CosmosNullReferenceException: Refactors CosmosNullReferenceException to pass along InnerException property on parent NullReferenceException (#3713) * Passed inner exception details to NullReferenceException ctor when instantiating CosmosNullReferenceException. * Added unit tests. * Addressed PR feedback. --- .../CosmosExceptions/CosmosNullReferenceException.cs | 5 +++-- .../CosmosNullReferenceExceptionTests.cs | 10 +++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs index 03e4cb21e8..4e7aa73f54 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs @@ -25,9 +25,10 @@ internal class CosmosNullReferenceException : NullReferenceException /// internal CosmosNullReferenceException( NullReferenceException originalException, - ITrace trace) + ITrace trace) + : base(originalException?.Message ?? throw new ArgumentNullException(nameof(originalException)), originalException ?? throw new ArgumentNullException(nameof(originalException))) { - this.originalException = originalException ?? throw new ArgumentNullException(nameof(originalException)); + this.originalException = originalException; if (trace == null) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosNullReferenceExceptionTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosNullReferenceExceptionTests.cs index a97b56189b..072b63a660 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosNullReferenceExceptionTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosNullReferenceExceptionTests.cs @@ -37,9 +37,10 @@ public void CosmosNullRefWrapingTest() trace); Assert.AreEqual(nullReferenceException.StackTrace, cosmosNullReferenceException.StackTrace); - Assert.AreEqual(nullReferenceException.InnerException, cosmosNullReferenceException.InnerException); + Assert.AreEqual(nullReferenceException, cosmosNullReferenceException.InnerException); Assert.AreEqual(nullReferenceException.Data, cosmosNullReferenceException.Data); + Assert.IsTrue(cosmosNullReferenceException.Message.Contains(message)); Assert.IsTrue(cosmosNullReferenceException.Message.Contains(rootTraceName)); Assert.AreNotEqual(nullReferenceException.Message, cosmosNullReferenceException.Message); @@ -48,5 +49,12 @@ public void CosmosNullRefWrapingTest() Assert.IsTrue(cosmosToString.Contains(message)); Assert.IsTrue(cosmosToString.Contains(rootTraceName)); } + + [TestMethod] + [ExpectedException(typeof(ArgumentNullException))] + public void ExpectArgumentNullExceptionTest() + { + _ = new CosmosNullReferenceException(null, NoOpTrace.Singleton); + } } } From 209e4733a7047e57439f2fa40a016ea8cfc77e2c Mon Sep 17 00:00:00 2001 From: Achint-Agrawal <45819170+Achint-Agrawal@users.noreply.github.com> Date: Sat, 18 Feb 2023 02:54:37 +0530 Subject: [PATCH 058/164] [Internal] PriorityRequests: Fixes header value (#3714) Co-authored-by: Matias Quaranta --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 887ca2d334..a4a5b0a087 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.32.0 3.32.0 preview - 3.30.1 + 3.30.2 2.0.1 2.0.1 preview From 67e1a90a5a2f4a33123e714d80393bdf937343ba Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Fri, 17 Feb 2023 14:59:15 -0800 Subject: [PATCH 059/164] [Internal] Query: Adds single physical partition check for OptimisticDirectExecution queries (#3699) * Added single physical partition check for Ode queries. Updated test infrastructure for Ode emulator tests too. * Refactored emulator tests to have all the test cases at the top of the file * Updated TryGetTargetRangeOptimisticDirectExecutionAsync() * Uodated logic on how many times CreateIngestQueryDeleteAsync() gets called * Added debug asserts for partitionKeyDefinition * Added pageSizeOptions parameter in CreateInput() in EmulatorTests * Fixed comments --- .../CosmosQueryExecutionContextFactory.cs | 30 +- .../OptimisticDirectExecutionQueryTests.cs | 309 ++++++++---------- ...egativeOptimisticDirectExecutionOutput.xml | 39 --- ...ositiveOptimisticDirectExecutionOutput.xml | 39 +++ ...misticDirectExecutionQueryBaselineTests.cs | 54 +-- 5 files changed, 218 insertions(+), 253 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index d8a885a07b..a7f7f17934 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -755,22 +755,9 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP { if (!inputParameters.EnableOptimisticDirectExecution) return null; - // case 1: Is query going to a single partition - bool hasPartitionKey = inputParameters.PartitionKey.HasValue - && inputParameters.PartitionKey != PartitionKey.Null - && inputParameters.PartitionKey != PartitionKey.None; - - // case 2: does query execution plan have a single query range - bool hasQueryRanges = partitionedQueryExecutionInfo != null - && partitionedQueryExecutionInfo.QueryRanges.Count == 1 - && partitionedQueryExecutionInfo.QueryRanges[0].IsSingleValue; - - if (!hasPartitionKey && !hasQueryRanges) return null; - - //TODO: does collection have only one physical partition - - List targetRanges = new List(); + Debug.Assert(containerQueryProperties.ResourceId != null, "CosmosQueryExecutionContextFactory Assert!", "Container ResourceId cannot be null!"); + List targetRanges; if (partitionedQueryExecutionInfo != null) { targetRanges = await CosmosQueryExecutionContextFactory.GetTargetPartitionKeyRangesAsync( @@ -785,8 +772,10 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP else { Documents.PartitionKeyDefinition partitionKeyDefinition = GetPartitionKeyDefinition(inputParameters, containerQueryProperties); - if (partitionKeyDefinition != null && containerQueryProperties.ResourceId != null && inputParameters.PartitionKey != null) + if (inputParameters.PartitionKey != null) { + Debug.Assert(partitionKeyDefinition != null, "CosmosQueryExecutionContextFactory Assert!", "PartitionKeyDefinition cannot be null if partitionKey is defined"); + targetRanges = await cosmosQueryContext.QueryClient.GetTargetPartitionKeyRangesByEpkStringAsync( cosmosQueryContext.ResourceLink, containerQueryProperties.ResourceId, @@ -794,6 +783,15 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP forceRefresh: false, trace); } + else + { + targetRanges = await cosmosQueryContext.QueryClient.GetTargetPartitionKeyRangesAsync( + cosmosQueryContext.ResourceLink, + containerQueryProperties.ResourceId, + new List> { FeedRangeEpk.FullRange.Range }, + forceRefresh: false, + trace); + } } if (targetRanges.Count == 1) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs index 9d89f6362a..751c21b64b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs @@ -14,195 +14,131 @@ [TestCategory("Query")] public sealed class OptimisticDirectExecutionQueryTests : QueryTestsBase { + private static class PageSizeOptions + { + public static readonly int[] NonGroupByPageSizeOptions = { -1, 1, 2, 10, 100 }; + public static readonly int[] GroupByPageSizeOptions = { -1 }; + } + [TestMethod] - public async Task TestOptimisticDirectExecutionQueries() + public async Task TestPassingOptimisticDirectExecutionQueries() { int numberOfDocuments = 8; string partitionKey = "key"; string numberField = "numberField"; string nullField = "nullField"; - List documents = new List(numberOfDocuments); - for (int i = 0; i < numberOfDocuments; ++i) + List documents = CreateDocuments(numberOfDocuments, partitionKey, numberField, nullField); + + List singlePartitionContainerTestCases = new List() { - Document doc = new Document(); - doc.SetPropertyValue(partitionKey, "/value"); - doc.SetPropertyValue(numberField, i % 8); - doc.SetPropertyValue(nullField, null); - documents.Add(doc.ToString()); - } + // Tests for bool enableOptimisticDirectExecution + CreateInput( query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{partitionKey}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{partitionKey}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: false, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Passthrough), + + // Simple query + CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: null, partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + // DISTINCT with ORDER BY + CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: null, partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + // TOP with GROUP BY + CreateInput( query: $"SELECT TOP 5 VALUE r.{numberField} FROM r GROUP BY r.{numberField}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT TOP 5 VALUE r.{numberField} FROM r GROUP BY r.{numberField}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: null, partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + // OFFSET LIMIT with WHERE and BETWEEN + CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, enableOptimisticDirectExecution: true, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: null, partition: CollectionTypes.SinglePartition, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, enableOptimisticDirectExecution: true, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution) + }; - SinglePartitionWithContinuationsArgs args = new SinglePartitionWithContinuationsArgs + List multiPartitionContainerTestCases = new List() { - NumberOfDocuments = numberOfDocuments, - PartitionKey = partitionKey, - NumberField = numberField, - NullField = nullField, + // Simple query + CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: "/value", partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: null, partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Passthrough), + + // DISTINCT with ORDER BY + CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: "/value", partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: null, partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Specialized), + + // OFFSET LIMIT with WHERE and BETWEEN + CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: "/value", partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: null, partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Specialized) }; - await this.CreateIngestQueryDeleteAsync( + await this.CreateIngestQueryDeleteAsync( ConnectionModes.Direct | ConnectionModes.Gateway, - CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + CollectionTypes.SinglePartition, documents, - RunTests, - args, + (container, documents) => RunPassingTests(singlePartitionContainerTestCases, container), "/" + partitionKey); - } - private static async Task RunTests(Container container, IReadOnlyList documents, SinglePartitionWithContinuationsArgs args) - { - await TestPositiveOptimisticDirectExecutionOutput(container, args); - await TestNegativeOptimisticDirectExecutionOutput(container); + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct | ConnectionModes.Gateway, + CollectionTypes.MultiPartition, + documents, + (container, documents) => RunPassingTests(multiPartitionContainerTestCases, container), + "/" + partitionKey); } - private static async Task TestPositiveOptimisticDirectExecutionOutput( - Container container, - SinglePartitionWithContinuationsArgs args) + [TestMethod] + public async Task TestFailingOptimisticDirectExecutionOutput() { - int documentCount = args.NumberOfDocuments; - string partitionKey = args.PartitionKey; - string numberField = args.NumberField; - string nullField = args.NullField; - - QueryRequestOptions feedOptions = new QueryRequestOptions - { - MaxItemCount = -1, - EnableOptimisticDirectExecution = true, - TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) - }; - - // check if pipeline returns empty continuation token - FeedResponse responseWithEmptyContinuationExpected = await container.GetItemQueryIterator( - $"SELECT TOP 0 * FROM r", - requestOptions: feedOptions).ReadNextAsync(); - - Assert.AreEqual(null, responseWithEmptyContinuationExpected.ContinuationToken); - - List queries = new List - { - $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{partitionKey}", - $"SELECT VALUE r.numberField FROM r", - $"SELECT VALUE r.numberField FROM r", - $"SELECT TOP 4 VALUE r.numberField FROM r ORDER BY r.{numberField}", - $"SELECT TOP 3 VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {documentCount} ORDER BY r.{numberField} DESC", - $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {documentCount} OFFSET 1 LIMIT 1", - $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField}", - $"SELECT TOP 3 VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {documentCount} ORDER BY r.{numberField} DESC", - $"SELECT TOP 4 VALUE r.numberField FROM r ORDER BY r.{numberField}", - $"SELECT VALUE r.numberField FROM r", - }; - - List> results = new List> - { - new List { 0, 1, 2, 3, 4 }, - new List { 0, 1, 2, 3, 4, 5, 6, 7 }, - new List { 0, 1, 2, 3, 4, 5, 6, 7 }, - new List { 0, 1, 2, 3}, - new List { 7, 6, 5}, - new List { 1}, - new List { 0, 1, 2, 3, 4, 5, 6, 7}, - new List { 7, 6, 5}, - new List { 0, 1, 2, 3}, - new List { 0, 1, 2, 3, 4, 5, 6, 7 }, - }; - - List partitionKeys = new List - { - "/value", - null, - "/value", - "/value", - "/value", - null, - null, - "/value", - "/value", - "/value", - }; + int numberOfDocuments = 8; + string partitionKey = "key"; + string numberField = "numberField"; + string nullField = "nullField"; - List expectedPipelineType = new List - { - TestInjections.PipelineType.OptimisticDirectExecution, - TestInjections.PipelineType.Passthrough, - TestInjections.PipelineType.OptimisticDirectExecution, - TestInjections.PipelineType.OptimisticDirectExecution, - TestInjections.PipelineType.OptimisticDirectExecution, - TestInjections.PipelineType.Specialized, - TestInjections.PipelineType.Specialized, - TestInjections.PipelineType.Specialized, - TestInjections.PipelineType.Specialized, - TestInjections.PipelineType.Passthrough, - }; + List documents = CreateDocuments(numberOfDocuments, partitionKey, numberField, nullField); - List enabledOptimisticDirectExecution = new List + // check if bad continuation queries and syntax error queries are handled by pipeline + IDictionary invalidQueries = new Dictionary { - true, - true, - true, - true, - true, - true, - true, - false, - false, - false, + { "SELECT * FROM t", Guid.NewGuid().ToString() }, + { "SELECT TOP 10 * FOM r", null }, + { "this is not a valid query", null }, }; + + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct | ConnectionModes.Gateway, + CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + documents, + (container, documents) => RunFailingTests(container, invalidQueries), + "/" + partitionKey); + } - List queryAndResults = new List(); - - for (int i = 0; i < queries.Count(); i++) - { - QueryResultsAndPipelineType queryAndResult = new QueryResultsAndPipelineType() - { - Query = queries[i], - Result = results[i], - PartitionKey = partitionKeys[i], - ExpectedPipelineType = expectedPipelineType[i], - EnableOptimisticDirectExecution = enabledOptimisticDirectExecution[i], - }; - - queryAndResults.Add(queryAndResult); - } - - int[] pageSizeOptions = new[] { -1, 1, 2, 10, 100 }; - - for (int i = 0; i < pageSizeOptions.Length; i++) + private static async Task RunPassingTests(IEnumerable testCases, Container container) + { + foreach (DirectExecutionTestCase testCase in testCases) { - for(int j = 0; j < queryAndResults.Count(); j++) + foreach (int pageSize in testCase.PageSizeOptions) { - feedOptions = new QueryRequestOptions + QueryRequestOptions feedOptions = new QueryRequestOptions { - MaxItemCount = pageSizeOptions[i], - PartitionKey = queryAndResults[j].PartitionKey == null - ? null - : new Cosmos.PartitionKey(queryAndResults[j].PartitionKey), - EnableOptimisticDirectExecution = queryAndResults[j].EnableOptimisticDirectExecution, + MaxItemCount = pageSize, + PartitionKey = testCase.PartitionKey == null + ? null + : new Cosmos.PartitionKey(testCase.PartitionKey), + EnableOptimisticDirectExecution = testCase.EnableOptimisticDirectExecution, TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) }; List items = await RunQueryAsync( container, - queryAndResults[j].Query, + testCase.Query, feedOptions); long[] actual = items.Cast().Select(x => Number64.ToLong(x.Value)).ToArray(); - Assert.IsTrue(queryAndResults[j].Result.SequenceEqual(actual)); - - if (queryAndResults[j].EnableOptimisticDirectExecution) - { - Assert.AreEqual(queryAndResults[j].ExpectedPipelineType, feedOptions.TestSettings.Stats.PipelineType.Value); - } - else - { // test if pipeline is called if TestInjection.EnableOptimisticDirectExecution is false - Assert.AreNotEqual(TestInjections.PipelineType.OptimisticDirectExecution, feedOptions.TestSettings.Stats.PipelineType.Value); - } + Assert.IsTrue(testCase.ExpectedResult.SequenceEqual(actual)); + Assert.AreEqual(testCase.ExpectedPipelineType, feedOptions.TestSettings.Stats.PipelineType.Value); } } } - private static async Task TestNegativeOptimisticDirectExecutionOutput( - Container container) + private static async Task RunFailingTests(Container container, IDictionary invalidQueries) { QueryRequestOptions feedOptions = new QueryRequestOptions { @@ -211,21 +147,13 @@ private static async Task TestNegativeOptimisticDirectExecutionOutput( TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) }; - // check if bad continuation queries and syntax error queries are handled by pipeline - IDictionary invalidQueries = new Dictionary - { - { "SELECT * FROM t", Guid.NewGuid().ToString() }, - { "SELECT TOP 10 * FOM r", null }, - { "this is not a valid query", null }, - }; - - foreach (KeyValuePair entry in invalidQueries) + foreach (KeyValuePair queryAndResult in invalidQueries) { try { await container.GetItemQueryIterator( - queryDefinition: new QueryDefinition(entry.Key), - continuationToken: entry.Value, + queryDefinition: new QueryDefinition(queryAndResult.Key), + continuationToken: queryAndResult.Value, requestOptions: feedOptions).ReadNextAsync(); Assert.Fail("Expect exception"); @@ -241,21 +169,60 @@ await container.GetItemQueryIterator( } } - private struct SinglePartitionWithContinuationsArgs + private static List CreateDocuments(int documentCount, string partitionKey, string numberField, string nullField) + { + List documents = new List(documentCount); + for (int i = 0; i < documentCount; ++i) + { + Document doc = new Document(); + doc.SetPropertyValue(partitionKey, "/value"); + doc.SetPropertyValue(numberField, i % documentCount); + doc.SetPropertyValue(nullField, null); + documents.Add(doc.ToString()); + } + + return documents; + } + + private static DirectExecutionTestCase CreateInput( + string query, + List expectedResult, + string partitionKey, + CollectionTypes partition, + bool enableOptimisticDirectExecution, + int[] pageSizeOptions, + TestInjections.PipelineType expectedPipelineType) { - public int NumberOfDocuments; - public string PartitionKey; - public string NumberField; - public string NullField; + return new DirectExecutionTestCase(query, expectedResult, partitionKey, partition, enableOptimisticDirectExecution, pageSizeOptions, expectedPipelineType); } - private struct QueryResultsAndPipelineType + internal readonly struct DirectExecutionTestCase { - public string Query { get; set; } - public List Result { get; set; } - public string PartitionKey { get; set; } - public TestInjections.PipelineType ExpectedPipelineType { get; set; } - public bool EnableOptimisticDirectExecution { get; set; } + public string Query { get; } + public List ExpectedResult { get; } + public string PartitionKey { get; } + public CollectionTypes Partition { get; } + public bool EnableOptimisticDirectExecution { get; } + public int[] PageSizeOptions { get; } + public TestInjections.PipelineType ExpectedPipelineType { get; } + + public DirectExecutionTestCase( + string query, + List expectedResult, + string partitionKey, + CollectionTypes partition, + bool enableOptimisticDirectExecution, + int[] pageSizeOptions, + TestInjections.PipelineType expectedPipelineType) + { + this.Query = query; + this.ExpectedResult = expectedResult; + this.PartitionKey = partitionKey; + this.Partition = partition; + this.EnableOptimisticDirectExecution = enableOptimisticDirectExecution; + this.PageSizeOptions = pageSizeOptions; + this.ExpectedPipelineType = expectedPipelineType; + } } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml index 7a8259eefc..4685001217 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.NegativeOptimisticDirectExecutionOutput.xml @@ -1,43 +1,4 @@  - - - Null Partition Key Value - SELECT * FROM c - - /pk - - Hash - - - false - - - - - None Partition Key Value - SELECT * FROM c - - /pk - - Hash - - - false - - - - - C# Null Partition Key Value - SELECT * FROM c - - /pk - - Hash - - - false - - Single Partition Key with Parallel continuation token diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml index 2482925bd8..5e496fc564 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml @@ -64,4 +64,43 @@ true + + + Null Partition Key Value + SELECT * FROM c + + /pk + + Hash + + + true + + + + + None Partition Key Value + SELECT * FROM c + + /pk + + Hash + + + true + + + + + C# Null Partition Key Value + SELECT * FROM c + + /pk + + Hash + + + true + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index b6a78c111d..20de3f1f03 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -36,10 +36,6 @@ public class OptimisticDirectExecutionQueryBaselineTests : BaselineTests testVariations = new List { CreateInput( @@ -77,7 +73,32 @@ public void PositiveOptimisticDirectExecutionOutput() expectedOptimisticDirectExecution: true, partitionKeyPath: @"/pk", partitionKeyValue: "a", - continuationToken: cosmosElementOdeContinuationToken), + continuationToken: CosmosElement.Parse( + "{\"OptimisticDirectExecutionToken\":{\"token\":\"{\\\"resourceId\\\":\\\"AQAAAMmFOw8LAAAAAAAAAA==\\\"," + + "\\\"skipCount\\\":1}\", \"range\":{\"min\":\"\",\"max\":\"FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF-FF\"}}}")), + + // Below cases are Ode because they have a collection with a single physical partition. + // Added emulator tests (TestPassingOptimisticDirectExecutionQueries()) to verify the negation of the below cases. + CreateInput( + description: @"Null Partition Key Value", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: Cosmos.PartitionKey.Null), + + CreateInput( + description: @"None Partition Key Value", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: Cosmos.PartitionKey.None), + + CreateInput( + description: @"C# Null Partition Key Value", + query: "SELECT * FROM c", + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: null), }; this.ExecuteTestSuite(testVariations); } @@ -105,27 +126,6 @@ public void NegativeOptimisticDirectExecutionOutput() List testVariations = new List { - CreateInput( - description: @"Null Partition Key Value", - query: "SELECT * FROM c", - expectedOptimisticDirectExecution: false, - partitionKeyPath: @"/pk", - partitionKeyValue: Cosmos.PartitionKey.Null), - - CreateInput( - description: @"None Partition Key Value", - query: "SELECT * FROM c", - expectedOptimisticDirectExecution: false, - partitionKeyPath: @"/pk", - partitionKeyValue: Cosmos.PartitionKey.None), - - CreateInput( - description: @"C# Null Partition Key Value", - query: "SELECT * FROM c", - expectedOptimisticDirectExecution: false, - partitionKeyPath: @"/pk", - partitionKeyValue: null), - CreateInput( description: @"Single Partition Key with Parallel continuation token", query: "SELECT * FROM c", @@ -798,7 +798,7 @@ public override Task> TryGetOverlappingRangesAs } public override async Task> TryGetPartitionedQueryExecutionInfoAsync(SqlQuerySpec sqlQuerySpec, ResourceType resourceType, PartitionKeyDefinition partitionKeyDefinition, bool requireFormattableOrderByQuery, bool isContinuationExpected, bool allowNonValueAggregateQuery, bool hasLogicalPartitionKey, bool allowDCount, bool useSystemPrefix, Cosmos.GeospatialType geospatialType, CancellationToken cancellationToken) - { + { CosmosSerializerCore serializerCore = new(); using StreamReader streamReader = new(serializerCore.ToStreamSqlQuerySpec(sqlQuerySpec, Documents.ResourceType.Document)); string sqlQuerySpecJsonString = streamReader.ReadToEnd(); From b257f8e9b14ee1eae243b2c462d7582dbf5fb07f Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Fri, 17 Feb 2023 15:26:51 -0800 Subject: [PATCH 060/164] [Internal] CTL: Fixes Reservoir Sampling Logic (#3712) * Code changes to fix the reservoir sampling logic in CTL * Code changes to modify help text on reservoir type. * Code changes to address minor code refactor. --- .../Tools/CTL/CTLConfig.cs | 9 +++- .../Tools/CTL/ReservoirProvider.cs | 49 +++++++++++++++++++ .../CTL/Scenarios/ChangeFeedPullScenario.cs | 2 +- .../Tools/CTL/Scenarios/ReadManyScenario.cs | 2 +- .../CTL/Scenarios/ReadWriteQueryScenario.cs | 14 +++--- 5 files changed, 66 insertions(+), 10 deletions(-) create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/CTL/ReservoirProvider.cs diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/CTLConfig.cs b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/CTLConfig.cs index ae930dd7ba..05064003ce 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/CTLConfig.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/CTLConfig.cs @@ -11,6 +11,7 @@ namespace CosmosCTL using CommandLine.Text; using Microsoft.Azure.Cosmos; using Newtonsoft.Json; + using static CosmosCTL.ReservoirProvider; public class CTLConfig { @@ -76,7 +77,7 @@ public string DiagnosticsThresholdDuration } [Option("ctl_content_response_on_write", Required = false, HelpText = "Should return content response on writes")] - public bool IsContentResponseOnWriteEnabled { get; set; } = true; + public bool? IsContentResponseOnWriteEnabled { get; set; } = true; [Option("ctl_output_event_traces", Required = false, HelpText = "Outputs TraceSource to console")] public bool OutputEventTraces { get; set; } = false; @@ -102,6 +103,12 @@ public string DiagnosticsThresholdDuration [Option("ctl_telemetry_schedule_in_sec", Required = false, HelpText = "telemetry task schedule time in sec")] public string TelemetryScheduleInSeconds { get; set; } + [Option("ctl_reservoir_type", Required = false, HelpText = "Defines the reservoir type. Valid values are: Uniform, SlidingWindow and ExponentialDecay. The default value is SlidingWindow.")] + public ReservoirTypes ReservoirType { get; set; } = ReservoirTypes.SlidingWindow; + + [Option("ctl_reservoir_sample_size", Required = false, HelpText = "The reservoir sample size.")] + public int ReservoirSampleSize { get; set; } = 1028; + internal TimeSpan RunningTimeDurationAsTimespan { get; private set; } = TimeSpan.FromHours(10); internal TimeSpan DiagnosticsThresholdDurationAsTimespan { get; private set; } = TimeSpan.FromSeconds(60); diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/ReservoirProvider.cs b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/ReservoirProvider.cs new file mode 100644 index 0000000000..9f655bbd0d --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/ReservoirProvider.cs @@ -0,0 +1,49 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace CosmosCTL +{ + using System; + using App.Metrics.ReservoirSampling; + + /// + /// Returns the based on the CTL configuration. + /// + public class ReservoirProvider + { + /// + /// Create and returns a new instance of the based on the CTL configuration. + /// + /// An instance of containing the CTL config params. + /// An implementation of . + public static IReservoir GetReservoir(CTLConfig ctlConfig) + { + return ctlConfig.ReservoirType switch + { + ReservoirTypes.Uniform => new App.Metrics.ReservoirSampling.Uniform.DefaultAlgorithmRReservoir( + sampleSize: ctlConfig.ReservoirSampleSize), + + ReservoirTypes.SlidingWindow => new App.Metrics.ReservoirSampling.SlidingWindow.DefaultSlidingWindowReservoir( + sampleSize: ctlConfig.ReservoirSampleSize), + + ReservoirTypes.ExponentialDecay => new App.Metrics.ReservoirSampling.ExponentialDecay.DefaultForwardDecayingReservoir( + sampleSize: ctlConfig.ReservoirSampleSize, + alpha: 0.015), + + _ => throw new ArgumentException( + message: "Invalid ReservoirType Specified."), + }; + } + + /// + /// An enum containing different reservoir types. + /// + public enum ReservoirTypes + { + Uniform, + SlidingWindow, + ExponentialDecay + } + } +} diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ChangeFeedPullScenario.cs b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ChangeFeedPullScenario.cs index d549f398d1..65c40864f7 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ChangeFeedPullScenario.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ChangeFeedPullScenario.cs @@ -64,7 +64,7 @@ public async Task RunAsync( DurationUnit = TimeUnit.Milliseconds, RateUnit = TimeUnit.Seconds, Context = loggingContextIdentifier, - Reservoir = () => new App.Metrics.ReservoirSampling.Uniform.DefaultAlgorithmRReservoir() + Reservoir = () => ReservoirProvider.GetReservoir(config) }; Container container = cosmosClient.GetContainer(config.Database, config.Collection); diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadManyScenario.cs b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadManyScenario.cs index ae53acb07f..09a84530a6 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadManyScenario.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadManyScenario.cs @@ -76,7 +76,7 @@ public async Task RunAsync( DurationUnit = TimeUnit.Milliseconds, RateUnit = TimeUnit.Seconds, Context = loggingContextIdentifier, - Reservoir = () => new App.Metrics.ReservoirSampling.Uniform.DefaultAlgorithmRReservoir() + Reservoir = () => ReservoirProvider.GetReservoir(config) }; Container container = cosmosClient.GetContainer(config.Database, config.Collection); diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs index fe15e4efaa..db85445bef 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/CTL/Scenarios/ReadWriteQueryScenario.cs @@ -105,34 +105,34 @@ private async Task ExecuteOperationsAsync( CounterOptions querySuccessMeter = new CounterOptions { Name = "#Query Successful Operations", Context = loggingContextIdentifier }; CounterOptions queryFailureMeter = new CounterOptions { Name = "#Query Unsuccessful Operations", Context = loggingContextIdentifier }; - TimerOptions readLatencyTimer = new TimerOptions + TimerOptions readLatencyTimer = new() { Name = "Read latency", MeasurementUnit = Unit.Requests, DurationUnit = TimeUnit.Milliseconds, RateUnit = TimeUnit.Seconds, Context = loggingContextIdentifier, - Reservoir = () => new App.Metrics.ReservoirSampling.Uniform.DefaultAlgorithmRReservoir() + Reservoir = () => ReservoirProvider.GetReservoir(config) }; - TimerOptions writeLatencyTimer = new TimerOptions + TimerOptions writeLatencyTimer = new () { Name = "Write latency", MeasurementUnit = Unit.Requests, DurationUnit = TimeUnit.Milliseconds, RateUnit = TimeUnit.Seconds, Context = loggingContextIdentifier, - Reservoir = () => new App.Metrics.ReservoirSampling.Uniform.DefaultAlgorithmRReservoir() + Reservoir = () => ReservoirProvider.GetReservoir(config) }; - TimerOptions queryLatencyTimer = new TimerOptions + TimerOptions queryLatencyTimer = new () { Name = "Query latency", MeasurementUnit = Unit.Requests, DurationUnit = TimeUnit.Milliseconds, RateUnit = TimeUnit.Seconds, Context = loggingContextIdentifier, - Reservoir = () => new App.Metrics.ReservoirSampling.Uniform.DefaultAlgorithmRReservoir() + Reservoir = () => ReservoirProvider.GetReservoir(config) }; SemaphoreSlim concurrencyControlSemaphore = new SemaphoreSlim(config.Concurrency); @@ -178,7 +178,7 @@ private async Task ExecuteOperationsAsync( operation: i, partitionKeyAttributeName: config.CollectionPartitionKey, containers: initializationResult.Containers, - isContentResponseOnWriteEnabled: config.IsContentResponseOnWriteEnabled)), + isContentResponseOnWriteEnabled: config.IsContentResponseOnWriteEnabled.Value)), onSuccess: () => { concurrencyControlSemaphore.Release(); From 94c83f58ed9f83b36b5e42b6a5187b579f666d0d Mon Sep 17 00:00:00 2001 From: Nimit Shah Date: Mon, 27 Feb 2023 07:53:21 -0800 Subject: [PATCH 061/164] Diagnostics: Adds startDate in Summary (#3707) * Adding start date * Updated trace files * PR comment * Committing missing tests --------- Co-authored-by: Matias Quaranta --- .../Tracing/TraceWriter.TraceJsonWriter.cs | 4 ++-- .../Tracing/TraceWriter.TraceTextWriter.cs | 1 + ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 22 +++++++++---------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 10 ++++----- ...eWriterBaselineTests.MiscellanousAsync.xml | 4 ++-- ...neTests.PointOperationsExceptionsAsync.xml | 12 +++++----- ...EndTraceWriterBaselineTests.QueryAsync.xml | 14 ++++++------ ...TraceWriterBaselineTests.ReadFeedAsync.xml | 8 +++---- ...TraceWriterBaselineTests.ReadManyAsync.xml | 4 ++-- ...selineTests.StreamPointOperationsAsync.xml | 8 +++---- ...aselineTests.TypedPointOperationsAsync.xml | 8 +++---- ...raceWriterBaselineTests.ScenariosAsync.xml | 6 ++--- ...TraceWriterBaselineTests.Serialization.xml | 14 ++++++------ .../TraceWriterBaselineTests.TraceData.xml | 14 ++++++------ 15 files changed, 66 insertions(+), 65 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs index 4710f00a2e..74363c8ca1 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs @@ -46,8 +46,8 @@ public static void WriteTrace( if (isRootTrace) { - writer.WriteFieldName("start time"); - writer.WriteStringValue(trace.StartTime.ToString(TraceWriter.HourTimeFormatString)); + writer.WriteFieldName("start datetime"); + writer.WriteStringValue(trace.StartTime.ToString(TraceWriter.DateTimeFormatString)); } writer.WriteFieldName("duration in milliseconds"); writer.WriteNumber64Value(trace.Duration.TotalMilliseconds); diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs index f77307b359..502c87c4fe 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceTextWriter.cs @@ -18,6 +18,7 @@ namespace Microsoft.Azure.Cosmos.Tracing internal static partial class TraceWriter { internal static readonly string HourTimeFormatString = "HH:mm:ss:fff"; + internal static readonly string DateTimeFormatString = "yyyy-MM-ddTHH:mm:ss.fffZ"; private static class TraceTextWriter { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 59a5eabf76..d468fe87f5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -61,7 +61,7 @@ @@ -71,7 +71,7 @@ Date: Tue, 28 Feb 2023 01:04:01 +0530 Subject: [PATCH 062/164] [Internal] Client Telemetry: Adds network information in the payload (#3691) * first draft * clean code * add test * fix test * add replica info collection * fix substatuscode and operation type error * fix code * collect http infor in cache also * message to stacktrace * remove rntbd recording from cache * print proper exception message * fix test * cleanup unused code and added few status codes in ignore list * fixed all exception logging * refactor conditions * fix tests --- .../src/Handler/TelemetryHandler.cs | 5 +- .../src/Telemetry/ClientTelemetry.cs | 73 +++++++++++++++---- .../src/Telemetry/ClientTelemetryHelper.cs | 35 +++++++-- .../src/Telemetry/ClientTelemetryOptions.cs | 38 +++++++++- .../Models/ClientTelemetryProperties.cs | 5 ++ .../src/Telemetry/Models/RequestInfo.cs | 66 +++++++++++++++++ .../ClientSideRequestStatisticsTraceDatum.cs | 1 + .../Tracing/TraceData/SummaryDiagnostics.cs | 24 ++++-- .../ClientTelemetryTests.cs | 58 ++++++++++++--- .../ClientTelemetryTests.cs | 57 +++++++++------ 10 files changed, 300 insertions(+), 62 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs diff --git a/Microsoft.Azure.Cosmos/src/Handler/TelemetryHandler.cs b/Microsoft.Azure.Cosmos/src/Handler/TelemetryHandler.cs index 449a981d0d..9d7e504eba 100644 --- a/Microsoft.Azure.Cosmos/src/Handler/TelemetryHandler.cs +++ b/Microsoft.Azure.Cosmos/src/Handler/TelemetryHandler.cs @@ -40,11 +40,12 @@ public override async Task SendAsync( resourceType: request.ResourceType, consistencyLevel: request.Headers?[Documents.HttpConstants.HttpHeaders.ConsistencyLevel], requestCharge: response.Headers.RequestCharge, - subStatusCode: response.Headers.SubStatusCode); + subStatusCode: response.Headers.SubStatusCode, + trace: response.Trace); } catch (Exception ex) { - DefaultTrace.TraceError("Error while collecting telemetry information : " + ex.Message); + DefaultTrace.TraceError("Error while collecting telemetry information : {0}", ex); } } return response; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs index 3f124e2ee0..82e212f7f3 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs @@ -17,11 +17,14 @@ namespace Microsoft.Azure.Cosmos.Telemetry using Microsoft.Azure.Cosmos.Core.Trace; using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Telemetry.Models; + using Microsoft.Azure.Cosmos.Tracing; + using Microsoft.Azure.Cosmos.Tracing.TraceData; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Collections; using Microsoft.Azure.Documents.Rntbd; using Newtonsoft.Json; using Util; + using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; /// /// This class collects and send all the telemetry information. @@ -53,6 +56,9 @@ internal class ClientTelemetry : IDisposable private ConcurrentDictionary cacheRefreshInfoMap = new ConcurrentDictionary(); + private ConcurrentDictionary requestInfoMap + = new ConcurrentDictionary(); + private int numberOfFailures = 0; /// @@ -182,22 +188,26 @@ private async Task EnrichAndSendAsync() this.RecordSystemUtilization(); this.clientTelemetryInfo.DateTimeUtc = DateTime.UtcNow.ToString(ClientTelemetryOptions.DateFormat); - + ConcurrentDictionary operationInfoSnapshot = Interlocked.Exchange(ref this.operationInfoMap, new ConcurrentDictionary()); ConcurrentDictionary cacheRefreshInfoSnapshot = Interlocked.Exchange(ref this.cacheRefreshInfoMap, new ConcurrentDictionary()); + ConcurrentDictionary requestInfoSnapshot + = Interlocked.Exchange(ref this.requestInfoMap, new ConcurrentDictionary()); + this.clientTelemetryInfo.OperationInfo = ClientTelemetryHelper.ToListWithMetricsInfo(operationInfoSnapshot); this.clientTelemetryInfo.CacheRefreshInfo = ClientTelemetryHelper.ToListWithMetricsInfo(cacheRefreshInfoSnapshot); - + this.clientTelemetryInfo.RequestInfo = ClientTelemetryHelper.ToListWithMetricsInfo(requestInfoSnapshot); + await this.SendAsync(); } } catch (Exception ex) { - DefaultTrace.TraceError("Exception in EnrichAndSendAsync() : {0}", ex.Message); + DefaultTrace.TraceError("Exception in EnrichAndSendAsync() : {0}", ex); } DefaultTrace.TraceInformation("Telemetry Job Stopped."); @@ -224,7 +234,7 @@ internal void CollectCacheInfo(string cacheRefreshSource, } DefaultTrace.TraceVerbose($"Collecting cacheRefreshSource {cacheRefreshSource} data for Telemetry."); - + string regionsContacted = ClientTelemetryHelper.GetContactedRegions(regionsContactedList); // Recording Request Latency @@ -249,7 +259,7 @@ internal void CollectCacheInfo(string cacheRefreshSource, } catch (Exception ex) { - DefaultTrace.TraceError("Latency Recording Failed by Telemetry. Exception : {0}", ex.Message); + DefaultTrace.TraceError("Latency Recording Failed by Telemetry. Exception : {0}", ex); } } @@ -266,6 +276,7 @@ internal void CollectCacheInfo(string cacheRefreshSource, /// /// /// + /// internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, HttpStatusCode statusCode, long responseSizeInBytes, @@ -275,17 +286,22 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, ResourceType resourceType, string consistencyLevel, double requestCharge, - SubStatusCodes subStatusCode) + SubStatusCodes subStatusCode, + ITrace trace) { DefaultTrace.TraceVerbose("Collecting Operation data for Telemetry."); - + if (cosmosDiagnostics == null) { throw new ArgumentNullException(nameof(cosmosDiagnostics)); } - string regionsContacted = ClientTelemetryHelper.GetContactedRegions(cosmosDiagnostics.GetContactedRegions()); + // Record Network/Replica Information + SummaryDiagnostics summaryDiagnostics = new SummaryDiagnostics(trace); + this.RecordRntbdResponses(containerId, databaseId, summaryDiagnostics.StoreResponseStatistics.Value); + string regionsContacted = ClientTelemetryHelper.GetContactedRegions(cosmosDiagnostics.GetContactedRegions()); + // Recording Request Latency and Request Charge OperationInfo payloadKey = new OperationInfo(regionsContacted: regionsContacted?.ToString(), responseSizeInBytes: responseSizeInBytes, @@ -307,10 +323,10 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, try { latency.RecordValue(cosmosDiagnostics.GetClientElapsedTime().Ticks); - } + } catch (Exception ex) { - DefaultTrace.TraceError("Latency Recording Failed by Telemetry. Exception : {0}", ex.Message); + DefaultTrace.TraceError("Latency Recording Failed by Telemetry. Exception : {0}", ex); } long requestChargeToRecord = (long)(requestCharge * ClientTelemetryOptions.HistogramPrecisionFactor); @@ -320,10 +336,41 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, } catch (Exception ex) { - DefaultTrace.TraceError("Request Charge Recording Failed by Telemetry. Request Charge Value : {0} Exception : {1} ", requestChargeToRecord, ex.Message); + DefaultTrace.TraceError("Request Charge Recording Failed by Telemetry. Request Charge Value : {0} Exception : {1} ", requestChargeToRecord, ex); } } + /// + /// Records RNTBD calls statistics + /// + /// + /// + /// + private void RecordRntbdResponses(string containerId, string databaseId, List storeResponseStatistics) + { + foreach (StoreResponseStatistics storetatistics in storeResponseStatistics) + { + if (ClientTelemetryOptions.IsEligible((int)storetatistics.StoreResult.StatusCode, (int)storetatistics.StoreResult.SubStatusCode, storetatistics.RequestLatency)) + { + RequestInfo requestInfo = new RequestInfo() + { + DatabaseName = databaseId, + ContainerName = containerId, + Uri = storetatistics.StoreResult.StorePhysicalAddress.ToString(), + StatusCode = (int)storetatistics.StoreResult.StatusCode, + SubStatusCode = (int)storetatistics.StoreResult.SubStatusCode, + Resource = storetatistics.RequestResourceType.ToString(), + Operation = storetatistics.RequestOperationType.ToString(), + }; + + LongConcurrentHistogram latencyHist = this.requestInfoMap.GetOrAdd(requestInfo, x => new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision)); + latencyHist.RecordValue(storetatistics.RequestLatency.Ticks); + } + } + } + /// /// Record CPU and memory usage which will be sent as part of telemetry information /// @@ -349,7 +396,7 @@ private void RecordSystemUtilization() } catch (Exception ex) { - DefaultTrace.TraceError("System Usage Recording Error : {0}", ex.Message); + DefaultTrace.TraceError("System Usage Recording Error : {0} ", ex); } } @@ -427,7 +474,7 @@ await this.tokenProvider.AddAuthorizationHeaderAsync( { this.numberOfFailures++; - DefaultTrace.TraceError("Exception while sending telemetry data : {0}", ex.Message); + DefaultTrace.TraceError("Exception while sending telemetry data : {0}", ex); } finally { diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs index dca2ef6b94..2a29ef9454 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs @@ -6,15 +6,12 @@ namespace Microsoft.Azure.Cosmos.Telemetry using System; using System.Collections.Generic; using System.Linq; - using System.Net.Http; using System.Text; - using System.Threading; using System.Threading.Tasks; using HdrHistogram; using Microsoft.Azure.Cosmos.Core.Trace; using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Telemetry.Models; - using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Rntbd; internal static class ClientTelemetryHelper @@ -93,7 +90,7 @@ internal static List ToListWithMetricsInfo( OperationInfo payloadForLatency = entry.Key; payloadForLatency.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); payloadForLatency.SetAggregators(entry.Value.latency, ClientTelemetryOptions.TicksToMsFactor); - + payloadWithMetricInformation.Add(payloadForLatency); OperationInfo payloadForRequestCharge = payloadForLatency.Copy(); @@ -103,7 +100,35 @@ internal static List ToListWithMetricsInfo( payloadWithMetricInformation.Add(payloadForRequestCharge); } - DefaultTrace.TraceInformation("Aggregating operation information to list done"); + DefaultTrace.TraceVerbose("Aggregating operation information to list done"); + + return payloadWithMetricInformation; + } + + /// + /// Convert map with request information to list of operations along with request latency and request charge metrics + /// + /// + /// Collection of ReportPayload + internal static List ToListWithMetricsInfo( + IDictionary metrics) + { + DefaultTrace.TraceVerbose("Aggregating RequestInfo information to list started"); + + List payloadWithMetricInformation = new List(); + foreach (KeyValuePair entry in metrics) + { + MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); + metricInfo.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); + + RequestInfo payloadForLatency = entry.Key; + payloadForLatency.Metrics.Add(metricInfo); + + payloadWithMetricInformation.Add(payloadForLatency); + } + + DefaultTrace.TraceVerbose("Aggregating RequestInfo information to list done"); return payloadWithMetricInformation; } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs index f114483b07..3b69e0c621 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs @@ -4,11 +4,11 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; + using System.Collections.Generic; using Microsoft.Azure.Cosmos.Core.Trace; using Microsoft.Azure.Cosmos.Telemetry.Models; using Microsoft.Azure.Documents; using Newtonsoft.Json; - using Util; internal static class ClientTelemetryOptions { @@ -79,7 +79,7 @@ internal static class ClientTelemetryOptions internal const double Percentile99 = 99.0; internal const double Percentile999 = 99.9; internal const string DateFormat = "yyyy-MM-ddTHH:mm:ssZ"; - + internal const string EnvPropsClientTelemetrySchedulingInSeconds = "COSMOS.CLIENT_TELEMETRY_SCHEDULING_IN_SECONDS"; internal const string EnvPropsClientTelemetryEnabled = "COSMOS.CLIENT_TELEMETRY_ENABLED"; internal const string EnvPropsClientTelemetryVmMetadataUrl = "COSMOS.VM_METADATA_URL"; @@ -87,17 +87,20 @@ internal static class ClientTelemetryOptions internal const string EnvPropsClientTelemetryEnvironmentName = "COSMOS.ENVIRONMENT_NAME"; internal static readonly ResourceType AllowedResourceTypes = ResourceType.Document; - + // Why 5 sec? As of now, if any network request is taking more than 5 millisecond sec, we will consider it slow request this value can be revisited in future + private static readonly TimeSpan NetworkLatencyThreshold = TimeSpan.FromMilliseconds(5); internal static readonly JsonSerializerSettings JsonSerializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MaxDepth = 64, // https://github.com/advisories/GHSA-5crp-9r3c-p9vr }; + private static readonly List ExcludedStatusCodes = new List { 404, 409 }; + private static Uri clientTelemetryEndpoint; private static string environmentName; private static TimeSpan scheduledTimeSpan = TimeSpan.Zero; - + internal static bool IsClientTelemetryEnabled() { bool isTelemetryEnabled = ConfigurationManager @@ -175,5 +178,32 @@ internal static string GetEnvironmentName() } return environmentName; } + + /// + /// This method will return true if the request is failed with User or Server Exception and not excluded from telemetry. + /// This method will return true if the request latency is more than the threshold. + /// otherwise return false + /// + /// + /// + /// + /// true/false + internal static bool IsEligible(int statusCode, int subStatusCode, TimeSpan latencyInMs) + { + return + ClientTelemetryOptions.IsStatusCodeNotExcluded(statusCode, subStatusCode) && + (ClientTelemetryOptions.IsUserOrServerError(statusCode) || latencyInMs >= ClientTelemetryOptions.NetworkLatencyThreshold); + } + + private static bool IsUserOrServerError(int statusCode) + { + return statusCode >= 400 && statusCode <= 599; + } + + private static bool IsStatusCodeNotExcluded(int statusCode, int subStatusCode) + { + return !(ClientTelemetryOptions.ExcludedStatusCodes.Contains(statusCode) && subStatusCode == 0); + } + } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs b/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs index 87418ac8d7..6ad08f694e 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs @@ -60,6 +60,9 @@ internal sealed class ClientTelemetryProperties [JsonProperty(PropertyName = "operationInfo")] internal List OperationInfo { get; set; } + [JsonProperty(PropertyName = "requestInfo")] + internal List RequestInfo { get; set; } + [JsonIgnore] internal bool IsDirectConnectionMode { get; } @@ -97,6 +100,7 @@ public ClientTelemetryProperties(string dateTimeUtc, List systemInfo, List cacheRefreshInfo, List operationInfo, + List requestInfo, string machineId) { this.DateTimeUtc = dateTimeUtc; @@ -111,6 +115,7 @@ public ClientTelemetryProperties(string dateTimeUtc, this.SystemInfo = systemInfo; this.CacheRefreshInfo = cacheRefreshInfo; this.OperationInfo = operationInfo; + this.RequestInfo = requestInfo; this.PreferredRegions = preferredRegions; this.MachineId = machineId; } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs b/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs new file mode 100644 index 0000000000..d71f0fa446 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs @@ -0,0 +1,66 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Telemetry.Models +{ + using System; + using System.Collections.Generic; + using Newtonsoft.Json; + + [Serializable] + internal sealed class RequestInfo + { + [JsonProperty("uri")] + public string Uri { get; set; } + + [JsonProperty("databaseName")] + public string DatabaseName { get; set; } + + [JsonProperty("containerName")] + public string ContainerName { get; set; } + + [JsonProperty("operation")] + public string Operation { get; set; } + + [JsonProperty("resource")] + public string Resource { get; set; } + + [JsonProperty("statusCode")] + public int? StatusCode { get; set; } + + [JsonProperty("subStatusCode")] + public int SubStatusCode { get; set; } + + [JsonProperty("metricInfo")] + public List Metrics { get; set; } = new List(); + + public override int GetHashCode() + { + int hash = 3; + hash = (hash * 7) ^ (this.Uri == null ? 0 : this.Uri.GetHashCode()); + hash = (hash * 7) ^ (this.DatabaseName == null ? 0 : this.DatabaseName.GetHashCode()); + hash = (hash * 7) ^ (this.ContainerName == null ? 0 : this.ContainerName.GetHashCode()); + hash = (hash * 7) ^ (this.Operation == null ? 0 : this.Operation.GetHashCode()); + hash = (hash * 7) ^ (this.Resource == null ? 0 : this.Resource.GetHashCode()); + hash = (hash * 7) ^ (this.StatusCode == null ? 0 : this.StatusCode.GetHashCode()); + hash = (hash * 7) ^ (this.SubStatusCode.GetHashCode()); + return hash; + } + + public override bool Equals(object obj) + { + bool isequal = obj is RequestInfo payload && + ((this.Uri == null && payload.Uri == null) || (this.Uri != null && payload.Uri != null && this.Uri.Equals(payload.Uri))) && + ((this.DatabaseName == null && payload.DatabaseName == null) || (this.DatabaseName != null && payload.DatabaseName != null && this.DatabaseName.Equals(payload.DatabaseName))) && + ((this.ContainerName == null && payload.ContainerName == null) || (this.ContainerName != null && payload.ContainerName != null && this.ContainerName.Equals(payload.ContainerName))) && + ((this.Operation == null && payload.Operation == null) || (this.Operation != null && payload.Operation != null && this.Operation.Equals(payload.Operation))) && + ((this.Resource == null && payload.Resource == null) || (this.Resource != null && payload.Resource != null && this.Resource.Equals(payload.Resource))) && + ((this.StatusCode == null && payload.StatusCode == null) || (this.StatusCode != null && payload.StatusCode != null && this.StatusCode.Equals(payload.StatusCode))) && + this.SubStatusCode.Equals(payload.SubStatusCode); + + return isequal; + } + + } +} diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs index e4e160c13a..10845f133f 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs @@ -477,6 +477,7 @@ public StoreResponseStatistics( public string RequestSessionToken { get; } public Uri LocationEndpoint { get; } public bool IsSupplementalResponse { get; } + public TimeSpan RequestLatency => this.RequestResponseTime - this.RequestStartTime.GetValueOrDefault(); } public readonly struct HttpResponseStatistics diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs index b01ddcfb77..1838cb72c5 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs @@ -8,25 +8,31 @@ namespace Microsoft.Azure.Cosmos.Tracing.TraceData using System.Collections.Generic; using System.Globalization; using Microsoft.Azure.Cosmos.Json; + using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; internal struct SummaryDiagnostics { public SummaryDiagnostics(ITrace trace) : this() { - this.DirectRequestsSummary = new Lazy>(() => - new Dictionary<(int, int), int>()); - this.GatewayRequestsSummary = new Lazy>(() => - new Dictionary<(int, int), int>()); - this.AllRegionsContacted = new Lazy>(() => new HashSet()); + this.DirectRequestsSummary + = new Lazy>(() => new Dictionary<(int, int), int>()); + this.GatewayRequestsSummary + = new Lazy>(() => new Dictionary<(int, int), int>()); + this.AllRegionsContacted + = new Lazy>(() => new HashSet()); + this.CollectSummaryFromTraceTree(trace); } + public Lazy> AllRegionsNameContacted { get; private set; } = new Lazy>(() => new HashSet()); public Lazy> AllRegionsContacted { get; private set; } + public Lazy> StoreResponseStatistics { get; private set; } = new Lazy>(() => new List()); // Count of (StatusCode, SubStatusCode) tuples public Lazy> DirectRequestsSummary { get; private set; } + public Lazy> HttpResponseStatistics { get; private set; } = new Lazy>(() => new List()); public Lazy> GatewayRequestsSummary { get; private set; } private void CollectSummaryFromTraceTree(ITrace currentTrace) @@ -49,9 +55,10 @@ private void CollectSummaryFromTraceTree(ITrace currentTrace) private void AggregateRegionsContacted(HashSet<(string, Uri)> regionsContacted) { - foreach ((string _, Uri uri) in regionsContacted) + foreach ((string name, Uri uri) in regionsContacted) { this.AllRegionsContacted.Value.Add(uri); + this.AllRegionsNameContacted.Value.Add(name); } } @@ -59,6 +66,8 @@ private void AggregateGatewayStatistics(IReadOnlyList( await this.WaitAndAssert(expectedOperationCount: 2, expectedConsistencyLevel: Microsoft.Azure.Cosmos.ConsistencyLevel.Eventual, expectedOperationRecordCountMap: expectedRecordCountInOperation, - expectedCacheSource: null); + expectedCacheSource: null, + isExpectedNetworkTelemetry: false); } [TestMethod] @@ -303,7 +302,8 @@ await container.ReadItemStreamAsync( await this.WaitAndAssert(expectedOperationCount: 2, expectedConsistencyLevel: Microsoft.Azure.Cosmos.ConsistencyLevel.ConsistentPrefix, expectedOperationRecordCountMap: expectedRecordCountInOperation, - expectedCacheSource: null); + expectedCacheSource: null, + isExpectedNetworkTelemetry: false); } [TestMethod] @@ -758,10 +758,11 @@ public async Task CreateItemWithSubStatusCodeTest(ConnectionMode mode) { { Documents.OperationType.Create.ToString(), 1} }; - + await this.WaitAndAssert(expectedOperationCount: 2, expectedOperationRecordCountMap: expectedRecordCountInOperation, - expectedSubstatuscode: 999999); + expectedSubstatuscode: 999999, + isExpectedNetworkTelemetry: false); } @@ -778,19 +779,23 @@ private async Task WaitAndAssert( IDictionary expectedOperationRecordCountMap = null, int expectedSubstatuscode = 0, bool? isAzureInstance = null, - string expectedCacheSource = "ClientCollectionCache") + string expectedCacheSource = "ClientCollectionCache", + bool isExpectedNetworkTelemetry = true) { Assert.IsNotNull(this.actualInfo, "Telemetry Information not available"); // As this feature is thread based execution so wait for the results to avoid test flakiness List localCopyOfActualInfo = null; ValueStopwatch stopwatch = ValueStopwatch.StartNew(); + HashSet cacheRefreshInfoSet = new HashSet(); do { await Task.Delay(TimeSpan.FromMilliseconds(1500)); // wait at least for 1 round of telemetry HashSet actualOperationSet = new HashSet(); + HashSet requestInfoSet = new HashSet(); + lock (this.actualInfo) { // Setting the number of unique OperationInfo irrespective of response size as response size is varying in case of queries. @@ -830,7 +835,8 @@ private async Task WaitAndAssert( List actualOperationList = new List(); List actualSystemInformation = new List(); - + List actualRequestInformation = new List(); + if (localCopyOfActualInfo[0].ConnectionMode == ConnectionMode.Direct.ToString().ToUpperInvariant()) { this.expectedMetricNameUnitMap.Add(ClientTelemetryOptions.NumberOfTcpConnectionName, ClientTelemetryOptions.NumberOfTcpConnectionUnit); @@ -840,6 +846,7 @@ private async Task WaitAndAssert( localCopyOfActualInfo: localCopyOfActualInfo, actualOperationList: actualOperationList, actualSystemInformation: actualSystemInformation, + actualRequestInformation: actualRequestInformation, isAzureInstance: isAzureInstance); ClientTelemetryTests.AssertOperationLevelInformation( @@ -858,8 +865,37 @@ private async Task WaitAndAssert( } ClientTelemetryTests.AssertSystemLevelInformation(actualSystemInformation, this.expectedMetricNameUnitMap); + if (localCopyOfActualInfo.First().ConnectionMode == ConnectionMode.Direct.ToString().ToUpperInvariant() + && isExpectedNetworkTelemetry) + { + ClientTelemetryTests.AssertNetworkLevelInformation(actualRequestInformation); + } + else + { + Assert.IsTrue(actualRequestInformation == null || actualRequestInformation.Count == 0, "Request Information is not expected in Gateway mode"); + } } - + + private static void AssertNetworkLevelInformation(List actualRequestInformation) + { + Assert.IsNotNull(actualRequestInformation); + Assert.IsTrue(actualRequestInformation.Count > 0); + + foreach(RequestInfo requestInfo in actualRequestInformation) + { + Assert.IsNotNull(requestInfo.Uri); + Assert.IsNotNull(requestInfo.DatabaseName); + Assert.IsNotNull(requestInfo.ContainerName); + Assert.IsNotNull(requestInfo.Operation); + Assert.IsNotNull(requestInfo.Resource); + Assert.IsNotNull(requestInfo.StatusCode); + Assert.AreNotEqual(0, requestInfo.StatusCode); + Assert.IsNotNull(requestInfo.SubStatusCode); + + Assert.IsNotNull(requestInfo.Metrics, "MetricInfo is null"); + } + } + private static void AssertSystemLevelInformation(List actualSystemInformation, IDictionary expectedMetricNameUnitMap) { IDictionary actualMetricNameUnitMap = new Dictionary(); @@ -903,12 +939,12 @@ private static void AssertOperationLevelInformation( int expectedSubstatuscode = 0) { IDictionary actualOperationRecordCountMap = new Dictionary(); - // Asserting If operation list is as expected foreach (OperationInfo operation in actualOperationList) { Assert.IsNotNull(operation.Operation, "Operation Type is null"); Assert.IsNotNull(operation.Resource, "Resource Type is null"); + Assert.AreEqual(expectedSubstatuscode, operation.SubStatusCode); Assert.AreEqual(expectedConsistencyLevel?.ToString(), operation.Consistency, $"Consistency is not {expectedConsistencyLevel}"); @@ -944,6 +980,7 @@ private static void AssertAccountLevelInformation( List localCopyOfActualInfo, List actualOperationList, List actualSystemInformation, + List actualRequestInformation, bool? isAzureInstance) { ISet machineId = new HashSet(); @@ -953,6 +990,7 @@ private static void AssertAccountLevelInformation( { actualOperationList.AddRange(telemetryInfo.OperationInfo); actualSystemInformation.AddRange(telemetryInfo.SystemInfo); + actualRequestInformation.AddRange(telemetryInfo.RequestInfo); if (telemetryInfo.ConnectionMode == ConnectionMode.Direct.ToString().ToUpperInvariant()) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs index 3bbbd1d3ac..b7e5d1f08e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs @@ -30,13 +30,13 @@ public void CheckMetricsAggregationLogic() MetricInfo metrics = new MetricInfo("metricsName", "unitName"); LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, - Int64.MaxValue, + long.MaxValue, 5); - histogram.RecordValue((long)10); - histogram.RecordValue((long)20); - histogram.RecordValue((long)30); - histogram.RecordValue((long)40); + histogram.RecordValue(10); + histogram.RecordValue(20); + histogram.RecordValue(30); + histogram.RecordValue(40); metrics.SetAggregators(histogram); @@ -58,14 +58,14 @@ public void CheckMetricsAggregationLogicWithAdjustment() MetricInfo metrics = new MetricInfo("metricsName", "unitName"); long adjustmentFactor = 1000; - LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, - Int64.MaxValue, - 5); + LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, + long.MaxValue, + 5); - histogram.RecordValue((long)(10 * adjustmentFactor)); - histogram.RecordValue((long)(20 * adjustmentFactor)); - histogram.RecordValue((long)(30 * adjustmentFactor)); - histogram.RecordValue((long)(40 * adjustmentFactor)); + histogram.RecordValue(10 * adjustmentFactor); + histogram.RecordValue(20 * adjustmentFactor); + histogram.RecordValue(30 * adjustmentFactor); + histogram.RecordValue(40 * adjustmentFactor); metrics.SetAggregators(histogram, adjustmentFactor); @@ -85,11 +85,11 @@ public void CheckMetricsAggregationLogicWithAdjustment() [TestMethod] public void CheckJsonSerializerContract() { - string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", - processId: "", - userAgent: null, - connectionMode: ConnectionMode.Direct, - preferredRegions: null, + string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", + processId: "", + userAgent: null, + connectionMode: ConnectionMode.Direct, + preferredRegions: null, aggregationIntervalInSec: 10), ClientTelemetryOptions.JsonSerializerSettings); Assert.AreEqual("{\"clientId\":\"clientId\",\"processId\":\"\",\"connectionMode\":\"DIRECT\",\"aggregationIntervalInSec\":10,\"systemInfo\":[]}", json); } @@ -101,21 +101,34 @@ public void CheckJsonSerializerContractWithPreferredRegions() { "region1" }; - string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", - processId: "", - userAgent: null, - connectionMode: ConnectionMode.Direct, + string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", + processId: "", + userAgent: null, + connectionMode: ConnectionMode.Direct, preferredRegions: preferredRegion, aggregationIntervalInSec: 1), ClientTelemetryOptions.JsonSerializerSettings); Assert.AreEqual("{\"clientId\":\"clientId\",\"processId\":\"\",\"connectionMode\":\"DIRECT\",\"preferredRegions\":[\"region1\"],\"aggregationIntervalInSec\":1,\"systemInfo\":[]}", json); } [TestMethod] - [ExpectedException(typeof(System.FormatException))] + [ExpectedException(typeof(FormatException))] public void CheckMisconfiguredTelemetry_should_fail() { Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, "non-boolean"); using CosmosClient client = MockCosmosUtil.CreateMockCosmosClient(); } + + [TestMethod] + [DataRow(200, 0 ,1, false)] + [DataRow(404, 0, 1, false)] + [DataRow(404, 1002, 1, true)] + [DataRow(409, 0, 1, false)] + [DataRow(409, 1002, 1, true)] + [DataRow(503, 2001, 1, true)] + [DataRow(200, 0, 6, true)] + public void CheckEligibleStatistics(int statusCode, int subStatusCode, int latencyInMs, bool expectedFlag) + { + Assert.AreEqual(expectedFlag, ClientTelemetryOptions.IsEligible(statusCode, subStatusCode, TimeSpan.FromMilliseconds(latencyInMs))); + } } } From 0088c2f8e4f8562c03f06ff852337b6aeca7d75c Mon Sep 17 00:00:00 2001 From: SaurabhSharma-MSFT <38112130+SaurabhSharma-MSFT@users.noreply.github.com> Date: Tue, 28 Feb 2023 19:31:29 -0800 Subject: [PATCH 063/164] Documentation: Fixes Database.ReadAsync description (#3457) * Documentation: Modify retry time to timespan Modify retry time in seconds to timespan of parameter maxRetryWaitTimeOnThrottledRequests (Method: [WithThrottlingRetryOptions](https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.cosmos.fluent.cosmosclientbuilder.withthrottlingretryoptions?view=azure-dotnet#feedback)) Resolves https://github.com/Azure/azure-sdk-for-net/issues/29567 * Documentation: Fixes DeleteItemAsync Example Documentation: Fixes DeleteItemAsync Example * Documentation: Fixes ItemRequestOptions Example Documentation: Fixes ItemRequestOptions Example * Documentation:Update Database.ReadAsync description Documentation: Update Database.ReadAsync description * Documentation: Update Database.ReadAsync description Documentation: Update Database.ReadAsync description * Documentation: Updated ToStreamIterator example Documentation: Updated ToStreamIterator example * Modified StreamIterator section * Update Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs Co-authored-by: Matias Quaranta * Remarks correction * Revert the StreamIterator changes Revert the StreamIterator changes Co-authored-by: Matias Quaranta Co-authored-by: Kiran Kumar Kolli --- Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs | 2 +- Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs b/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs index baddf0fe31..dc86de0cb6 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs @@ -186,7 +186,7 @@ public static FeedIterator ToFeedIterator(this IQueryable query) /// /// linqQueryable = this.Container.GetItemLinqQueryable(); - /// using (FeedIterator setIterator = linqQueryable.Where(item => (item.taskNum < 100)).ToFeedIterator() + /// using (FeedIterator setIterator = linqQueryable.Where(item => (item.taskNum < 100)).ToStreamIterator()) /// ]]> /// /// diff --git a/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs b/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs index a59dcb8be9..8a62f9ec56 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Database/Database.cs @@ -31,8 +31,8 @@ public abstract class Database /// public abstract CosmosClient Client { get; } - /// - /// Reads a from the Azure Cosmos service as an asynchronous operation. + /// + /// Reads a from the Azure Cosmos service as an asynchronous operation. /// /// (Optional) The options for the request. /// (Optional) representing request cancellation. @@ -40,6 +40,9 @@ public abstract class Database /// A containing a which wraps a containing the read resource record. /// /// https://aka.ms/cosmosdb-dot-net-exceptions + /// + /// contains the that include the resource information. + /// /// /// /// Date: Wed, 1 Mar 2023 08:02:15 -0800 Subject: [PATCH 064/164] Upgrade Resiliency: Adds Implementation for Validating the Unhealthy Backend Replicas in Direct mode (#3631) * Code changes to implement replica validation in dotnet v3 sdk. * Cosmetic changes to add inline code comments. * Code chages to address review comments. * Code changes to cover a scenario for async cache. * Code changes to refactor async non-blocking cache code. * Code changes to address minor review comments. --------- Co-authored-by: Kiran Kumar Kolli --- .../src/Routing/AsyncCacheNonBlocking.cs | 93 +++- .../src/Routing/GatewayAddressCache.cs | 154 +++++++ .../GatewayAddressCacheTests.cs | 433 +++++++++++++++++- .../Routing/AsyncCacheNonBlockingTests.cs | 145 ++++++ .../Utils/ReflectionUtils.cs | 43 ++ docs/ReplicaValidationDesign.md | 338 ++++++++++++++ 6 files changed, 1180 insertions(+), 26 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Utils/ReflectionUtils.cs create mode 100644 docs/ReplicaValidationDesign.md diff --git a/Microsoft.Azure.Cosmos/src/Routing/AsyncCacheNonBlocking.cs b/Microsoft.Azure.Cosmos/src/Routing/AsyncCacheNonBlocking.cs index 2b1f82ea3a..9fb908d83f 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/AsyncCacheNonBlocking.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/AsyncCacheNonBlocking.cs @@ -120,30 +120,11 @@ public async Task GetAsync( throw; } - try - { - return await initialLazyValue.CreateAndWaitForBackgroundRefreshTaskAsync( - createRefreshTask: singleValueInitFunc); - } - catch (Exception e) - { - if (initialLazyValue.ShouldRemoveFromCacheThreadSafe()) - { - DefaultTrace.TraceError( - "AsyncCacheNonBlocking.GetAsync with ForceRefresh Failed. key: {0}, Exception: {1}", - key, - e); - - // In some scenarios when a background failure occurs like a 404 - // the initial cache value should be removed. - if (this.removeFromCacheOnBackgroundRefreshException(e)) - { - this.TryRemove(key); - } - } - - throw; - } + return await this.UpdateCacheAndGetValueFromBackgroundTaskAsync( + key: key, + initialValue: initialLazyValue, + callbackDelegate: singleValueInitFunc, + operationName: nameof(GetAsync)); } // The AsyncLazyWithRefreshTask is lazy and won't create the task until GetValue is called. @@ -196,6 +177,70 @@ public bool TryRemove(TKey key) return this.values.TryRemove(key, out _); } + /// + /// Refreshes the async non blocking cache on-demand for the given + /// and caches the result for later usage. + /// + /// The requested key to be refreshed. + /// A func delegate to be invoked at a later point of time. + public async Task RefreshAsync( + TKey key, + Func> singleValueInitFunc) + { + if (this.values.TryGetValue(key, out AsyncLazyWithRefreshTask initialLazyValue)) + { + await this.UpdateCacheAndGetValueFromBackgroundTaskAsync( + key: key, + initialValue: initialLazyValue, + callbackDelegate: singleValueInitFunc, + operationName: nameof(RefreshAsync)); + } + } + + /// + /// Creates a background task to invoke the callback delegate and updates the cache with the value returned from the delegate. + /// + /// The requested key to be updated. + /// An instance of containing the initial cached value. + /// A func callback delegate to be invoked at a later point of time. + /// A string indicating the operation on the cache. + /// A containing the updated, refreshed value. + private async Task UpdateCacheAndGetValueFromBackgroundTaskAsync( + TKey key, + AsyncLazyWithRefreshTask initialValue, + Func> callbackDelegate, + string operationName) + { + try + { + return await initialValue.CreateAndWaitForBackgroundRefreshTaskAsync( + createRefreshTask: callbackDelegate); + } + catch (Exception ex) + { + if (initialValue.ShouldRemoveFromCacheThreadSafe()) + { + bool removed = false; + + // In some scenarios when a background failure occurs like a 404 + // the initial cache value should be removed. + if (this.removeFromCacheOnBackgroundRefreshException(ex)) + { + removed = this.TryRemove(key); + } + + DefaultTrace.TraceError( + "AsyncCacheNonBlocking Failed. key: {0}, operation: {1}, tryRemoved: {2}, Exception: {3}", + key, + operationName, + removed, + ex); + } + + throw; + } + } + /// /// This is AsyncLazy that has an additional Task that can /// be used to update the value. This allows concurrent requests diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index 7c6355591e..b577443761 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -46,6 +46,7 @@ internal class GatewayAddressCache : IAddressCache, IDisposable private readonly bool enableTcpConnectionEndpointRediscovery; private readonly CosmosHttpClient httpClient; + private readonly bool isReplicaAddressValidationEnabled; private Tuple masterPartitionAddressCache; private DateTime suboptimalMasterPartitionTimestamp; @@ -84,10 +85,27 @@ public GatewayAddressCache( GatewayAddressCache.ProtocolString(this.protocol)); this.openConnectionsHandler = openConnectionsHandler; + this.isReplicaAddressValidationEnabled = Helpers.GetEnvironmentVariableAsBool( + name: Constants.EnvironmentVariables.ReplicaConnectivityValidationEnabled, + defaultValue: false); } public Uri ServiceEndpoint => this.serviceEndpoint; + /// + /// Gets the address information from the gateway and sets them into the async non blocking cache for later lookup. + /// Additionally attempts to establish Rntbd connections to the backend replicas based on `shouldOpenRntbdChannels` + /// boolean flag. + /// + /// A string containing the database name. + /// An instance of containing the collection properties. + /// A read only list containing the partition key range identities. + /// A boolean flag indicating whether Rntbd connections are required to be established + /// to the backend replica nodes. For cosmos client initialization and cache warmups, the Rntbd connection are needed to be + /// openned deterministically to the backend replicas to reduce latency, thus the + /// should be set to `true` during cosmos client initialization and cache warmups. The OpenAsync flow from DocumentClient + /// doesn't require the connections to be opened deterministically thus should set the parameter to `false`. + /// An instance of . public async Task OpenConnectionsAsync( string databaseName, ContainerProperties collection, @@ -161,6 +179,10 @@ public async Task OpenConnectionsAsync( new PartitionKeyRangeIdentity(collection.ResourceId, addressInfo.Item1.PartitionKeyRangeId), addressInfo.Item2); + // The `shouldOpenRntbdChannels` boolean flag indicates whether the SDK should establish Rntbd connections to the + // backend replica nodes. For the `CosmosClient.CreateAndInitializeAsync()` flow, the flag should be passed as + // `true` so that the Rntbd connections to the backend replicas could be established deterministically. For any + // other flow, the flag should be passed as `false`. if (this.openConnectionsHandler != null && shouldOpenRntbdChannels) { await this.openConnectionsHandler @@ -178,6 +200,7 @@ public void SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionsHan this.openConnectionsHandler = openConnectionsHandler; } + /// public async Task TryGetAddressesAsync( DocumentServiceRequest request, PartitionKeyRangeIdentity partitionKeyRangeIdentity, @@ -229,6 +252,7 @@ public async Task TryGetAddressesAsync( return this.GetAddressesForRangeIdAsync( request, + cachedAddresses: currentCachedValue, partitionKeyRangeIdentity.CollectionRid, partitionKeyRangeIdentity.PartitionKeyRangeId, forceRefresh: forceRefreshPartitionAddresses); @@ -259,6 +283,7 @@ public async Task TryGetAddressesAsync( key: partitionKeyRangeIdentity, singleValueInitFunc: (_) => this.GetAddressesForRangeIdAsync( request, + cachedAddresses: null, partitionKeyRangeIdentity.CollectionRid, partitionKeyRangeIdentity.PartitionKeyRangeId, forceRefresh: false), @@ -278,6 +303,27 @@ public async Task TryGetAddressesAsync( this.suboptimalServerPartitionTimestamps.TryAdd(partitionKeyRangeIdentity, DateTime.UtcNow); } + // Refresh the cache on-demand, if there were some address that remained as unhealthy long enough (more than 1 minute) + // and need to revalidate its status. The reason it is not dependent on 410 to force refresh the addresses, is being: + // When an address is marked as unhealthy, then the address enumerator will deprioritize it and move it back to the + // end of the transport uris list. Therefore, it could happen that no request will land on the unhealthy address for + // an extended period of time therefore, the chances of 410 (Gone Exception) to trigger the forceRefresh workflow may + // not happen for that particular replica. + if (addresses + .Get(Protocol.Tcp) + .ReplicaTransportAddressUris + .Any(x => x.ShouldRefreshHealthStatus())) + { + Task refreshAddressesInBackgroundTask = Task.Run(async () => await this.serverPartitionAddressCache.RefreshAsync( + key: partitionKeyRangeIdentity, + singleValueInitFunc: (currentCachedValue) => this.GetAddressesForRangeIdAsync( + request, + cachedAddresses: currentCachedValue, + partitionKeyRangeIdentity.CollectionRid, + partitionKeyRangeIdentity.PartitionKeyRangeId, + forceRefresh: true))); + } + return addresses; } catch (DocumentClientException ex) @@ -384,6 +430,7 @@ public async Task UpdateAsync( key: partitionKeyRangeIdentity, singleValueInitFunc: (_) => this.GetAddressesForRangeIdAsync( null, + cachedAddresses: null, partitionKeyRangeIdentity.CollectionRid, partitionKeyRangeIdentity.PartitionKeyRangeId, forceRefresh: true), @@ -444,6 +491,7 @@ private async Task private async Task GetAddressesForRangeIdAsync( DocumentServiceRequest request, + PartitionAddressInformation cachedAddresses, string collectionRid, string partitionKeyRangeId, bool forceRefresh) @@ -475,6 +523,32 @@ await this.GetServerAddressesViaGatewayAsync(request, collectionRid, new[] { par throw new PartitionKeyRangeGoneException(errorMessage) { ResourceAddress = collectionRid }; } + if (this.isReplicaAddressValidationEnabled) + { + // The purpose of this step is to merge the new transport addresses with the old one. What this means is - + // 1. If a newly returned address from gateway is already a part of the cache, then restore the health state + // of the new address with that of the cached one. + // 2. If a newly returned address from gateway doesn't exist in the cache, then keep using the new address + // with `Unknown` (initial) status. + PartitionAddressInformation mergedAddresses = GatewayAddressCache.MergeAddresses(result.Item2, cachedAddresses); + IReadOnlyList transportAddressUris = mergedAddresses.Get(Protocol.Tcp)?.ReplicaTransportAddressUris; + + // If cachedAddresses are null, that would mean that the returned address from gateway would remain in Unknown + // status and there is no cached state that could transition them into Unhealthy. + if (cachedAddresses != null) + { + foreach (TransportAddressUri address in transportAddressUris) + { + // The main purpose for this step is to move address health status from Unhealthy to UnhealthyPending. + address.SetRefreshedIfUnhealthy(); + } + } + + this.ValidateUnhealthyPendingReplicas(transportAddressUris); + + return mergedAddresses; + } + return result.Item2; } } @@ -760,6 +834,86 @@ await this.GetServerAddressesViaGatewayAsync( } } + /// + /// Validates the unhealthy pending replicas by attempting to open the Rntbd connection. This operation + /// will eventually marks the unhealthy pending replicas to healthy, if the rntbd connection attempt made was + /// successful or unhealthy otherwise. + /// + /// A read-only list of needs to be validated. + private void ValidateUnhealthyPendingReplicas( + IReadOnlyList addresses) + { + if (addresses == null) + { + throw new ArgumentNullException(nameof(addresses)); + } + + IEnumerable addressesNeedToValidation = addresses + .Where(address => address + .GetCurrentHealthState() + .GetHealthStatus() == TransportAddressHealthState.HealthStatus.UnhealthyPending); + + if (addressesNeedToValidation.Any()) + { + Task openConnectionsInBackgroundTask = Task.Run(async () => await this.openConnectionsHandler.TryOpenRntbdChannelsAsync( + addresses: addressesNeedToValidation.ToList())); + } + } + + /// + /// Merge the new addresses returned from gateway service with that of the cached addresses. If the returned + /// new addresses list contains some of the addresses, which are already cached, then reset the health state + /// of the new address to that of the cached one. If the the new addresses doesn't contain any of the cached + /// addresses, then keep using the health state of the new addresses, which should be `unknown`. + /// + /// A list of containing the latest + /// addresses being returned from gateway. + /// A list of containing the cached + /// addresses from the async non blocking cache. + /// A list of containing the merged addresses. + private static PartitionAddressInformation MergeAddresses( + PartitionAddressInformation newAddresses, + PartitionAddressInformation cachedAddresses) + { + if (newAddresses == null) + { + throw new ArgumentNullException(nameof(newAddresses)); + } + + if (cachedAddresses == null) + { + return newAddresses; + } + + PerProtocolPartitionAddressInformation currentAddressInfo = newAddresses.Get(Protocol.Tcp); + PerProtocolPartitionAddressInformation cachedAddressInfo = cachedAddresses.Get(Protocol.Tcp); + Dictionary cachedAddressDict = new (); + + foreach (TransportAddressUri transportAddressUri in cachedAddressInfo.ReplicaTransportAddressUris) + { + cachedAddressDict[transportAddressUri.ToString()] = transportAddressUri; + } + + foreach (TransportAddressUri transportAddressUri in currentAddressInfo.ReplicaTransportAddressUris) + { + if (cachedAddressDict.ContainsKey(transportAddressUri.ToString())) + { + TransportAddressUri cachedTransportAddressUri = cachedAddressDict[transportAddressUri.ToString()]; + transportAddressUri.ResetHealthStatus( + status: cachedTransportAddressUri.GetCurrentHealthState().GetHealthStatus(), + lastUnknownTimestamp: cachedTransportAddressUri.GetCurrentHealthState().GetLastKnownTimestampByHealthStatus( + healthStatus: TransportAddressHealthState.HealthStatus.Unknown), + lastUnhealthyPendingTimestamp: cachedTransportAddressUri.GetCurrentHealthState().GetLastKnownTimestampByHealthStatus( + healthStatus: TransportAddressHealthState.HealthStatus.UnhealthyPending), + lastUnhealthyTimestamp: cachedTransportAddressUri.GetCurrentHealthState().GetLastKnownTimestampByHealthStatus( + healthStatus: TransportAddressHealthState.HealthStatus.Unhealthy)); + + } + } + + return newAddresses; + } + protected virtual void Dispose(bool disposing) { if (this.disposedValue) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 3954b4ae8f..9e3b87ec83 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -6,16 +6,15 @@ namespace Microsoft.Azure.Cosmos using System; using System.Collections.Generic; using System.Collections.ObjectModel; - using System.Collections.Specialized; using System.Linq; using System.Net; using System.Net.Http; + using System.Reflection; using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Common; using Microsoft.Azure.Cosmos.Routing; - using Microsoft.Azure.Cosmos.Serialization.HybridRow; using Microsoft.Azure.Cosmos.Tests; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Documents; @@ -872,6 +871,436 @@ await cache.OpenConnectionsAsync( expectedSuccessCount: addresses.Count); } + /// + /// Test to validate that when replica validation is enabled and force address refresh happens to fetch the latest address from gateway, + /// if in case the gateway returns the same address which was previously unhealthy, the gateway address cache resets the returned status + /// to unhealthy and validates that replica using the open connection handler and finally marks it to connected. + /// + [TestMethod] + [Owner("dkunda")] + public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidateUnhealthyReplicasHealth() + { + // Arrange. + ManualResetEvent manualResetEvent = new(initialState: false); + Mock mockHttpHandler = new (MockBehavior.Strict); + string oldAddress = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/4s"; + string newAddress = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/5s"; + string addressTobeMarkedUnhealthy = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/2s"; + mockHttpHandler.SetupSequence(x => x.SendAsync( + It.IsAny(), + It.IsAny())) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + oldAddress, + })) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + newAddress, + })); + + FakeOpenConnectionHandler fakeOpenConnectionHandler = new ( + failingIndexes: new HashSet(), + manualResetEvent: manualResetEvent); + + HttpClient httpClient = new (new HttpHandlerHelper(mockHttpHandler.Object)); + GatewayAddressCache cache = new ( + new Uri(GatewayAddressCacheTests.DatabaseAccountApiEndpoint), + Documents.Client.Protocol.Tcp, + this.mockTokenProvider.Object, + this.mockServiceConfigReader.Object, + MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: fakeOpenConnectionHandler, + suboptimalPartitionForceRefreshIntervalInSeconds: 2, + enableTcpConnectionEndpointRediscovery: true); + + // By default, the replica validation feature is disabled in GatewayAddressCache. Reflection is used to enable the feature + // for the purpose of this test. + FieldInfo fieldInfo = cache + .GetType() + .GetField( + name: "isReplicaAddressValidationEnabled", + bindingAttr: BindingFlags.Instance | BindingFlags.NonPublic); + + fieldInfo.SetValue( + obj: cache, + value: true); + + DocumentServiceRequest request = DocumentServiceRequest.Create(OperationType.Invalid, ResourceType.Address, AuthorizationTokenType.Invalid); + + // Act and Assert. + PartitionAddressInformation addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: false, + cancellationToken: CancellationToken.None); + + TransportAddressUri refreshedUri = addressInfo + .Get(Documents.Client.Protocol.Tcp)? + .ReplicaTransportAddressUris + .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + + Assert.IsNotNull(refreshedUri); + Assert.AreEqual( + expected: TransportAddressHealthState.HealthStatus.Unknown, + actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); + Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); + + // Because force refresh is requested, an unhealthy replica is added to the failed endpoint so that it's status could be validted. + request.RequestContext.FailedEndpoints.Value.Add( + new TransportAddressUri( + addressUri: new Uri( + uriString: addressTobeMarkedUnhealthy))); + + addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: true, + cancellationToken: CancellationToken.None); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); + Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); + + // Waits until a completion signal from the background task is received. + GatewayAddressCacheTests.WaitForManualResetEventSignal( + manualResetEvent: manualResetEvent, + shouldReset: false); + + refreshedUri = addressInfo + .Get(Documents.Client.Protocol.Tcp)? + .ReplicaTransportAddressUris + .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + + Assert.IsNotNull(refreshedUri); + Assert.AreEqual( + expected: TransportAddressHealthState.HealthStatus.Connected, + actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + + mockHttpHandler.VerifyAll(); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: 1, + expectedSuccessCount: 1); + } + + /// + /// Test to validate that when replica validation is enabled and there exists a replica such that it remained unhealthy for a period of one minute or + /// more, then even though a force refresh is not requested, the unhealthy replicas at least get a chance to re-validate it's status by the + /// on-demand async non-blocking cache refresh flow and eventually marks itself as healthy once the open connection attempt is successful. + /// + [TestMethod] + [Owner("dkunda")] + public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUriExistsForOneMinute_ShouldForceRefreshUnhealthyReplicas() + { + // Arrange. + ManualResetEvent manualResetEvent = new (initialState: false); + Mock mockHttpHandler = new(MockBehavior.Strict); + string oldAddress = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/4s"; + string newAddress = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/5s"; + string addressTobeMarkedUnhealthy = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/2s"; + mockHttpHandler.SetupSequence(x => x.SendAsync( + It.IsAny(), + It.IsAny())) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + oldAddress, + })) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + newAddress, + })) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + newAddress, + })); + + FakeOpenConnectionHandler fakeOpenConnectionHandler = new ( + failIndexesByAttempts: new Dictionary>() + { + { 0, new HashSet() { 0 } } + }, + manualResetEvent: manualResetEvent); + + HttpClient httpClient = new (new HttpHandlerHelper(mockHttpHandler.Object)); + GatewayAddressCache cache = new ( + new Uri(GatewayAddressCacheTests.DatabaseAccountApiEndpoint), + Documents.Client.Protocol.Tcp, + this.mockTokenProvider.Object, + this.mockServiceConfigReader.Object, + MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: fakeOpenConnectionHandler, + suboptimalPartitionForceRefreshIntervalInSeconds: 2, + enableTcpConnectionEndpointRediscovery: true); + + // By default, the replica validation feature is disabled in GatewayAddressCache. Reflection is used to enable the feature + // for the purpose of this test. + FieldInfo fieldInfo = cache + .GetType() + .GetField( + name: "isReplicaAddressValidationEnabled", + bindingAttr: BindingFlags.Instance | BindingFlags.NonPublic); + + fieldInfo.SetValue( + obj: cache, + value: true); + + DocumentServiceRequest request = DocumentServiceRequest.Create(OperationType.Invalid, ResourceType.Address, AuthorizationTokenType.Invalid); + + // Act and Assert. + PartitionAddressInformation addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: false, + cancellationToken: CancellationToken.None); + + TransportAddressUri refreshedUri = addressInfo + .Get(Documents.Client.Protocol.Tcp)? + .ReplicaTransportAddressUris + .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + + Assert.IsNotNull(refreshedUri); + Assert.AreEqual( + expected: TransportAddressHealthState.HealthStatus.Unknown, + actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); + Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); + + // Because force refresh is requested, an unhealthy replica is added to the failed endpoint so that it's health status could be validted. + request.RequestContext.FailedEndpoints.Value.Add( + new TransportAddressUri( + addressUri: new Uri( + uriString: addressTobeMarkedUnhealthy))); + + addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: true, + cancellationToken: CancellationToken.None); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); + Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); + + // Waits until a completion signal from the background task is received. + GatewayAddressCacheTests.WaitForManualResetEventSignal( + manualResetEvent: manualResetEvent, + shouldReset: true); + + // During the replica validation flow, the connection attempt was not successful thus the replica + // was marked unhealthy. + refreshedUri = addressInfo + .Get(Documents.Client.Protocol.Tcp)? + .ReplicaTransportAddressUris + .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + + Assert.IsNotNull(refreshedUri); + Assert.AreEqual( + expected: TransportAddressHealthState.HealthStatus.Unhealthy, + actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 1, + expectedMethodInvocationCount: 1, + expectedReceivedAddressesCount: 1, + expectedSuccessCount: 0); + + // A delay of 2 minute was added to make the replica unhealthy for more than one minute. This + // will make sure the unhealthy replica gets a chance to re-validate it's health status. + ReflectionUtils.AddMinuteToDateTimeFieldUsingReflection( + objectName: refreshedUri.GetCurrentHealthState(), + fieldName: "lastUnhealthyTimestamp", + delayInMinutes: -2); + + addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: false, + cancellationToken: CancellationToken.None); + + // Waits until a completion signal from the background task is received. + GatewayAddressCacheTests.WaitForManualResetEventSignal( + manualResetEvent: manualResetEvent, + shouldReset: false); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 1, + expectedMethodInvocationCount: 2, + expectedReceivedAddressesCount: 1, + expectedSuccessCount: 1); + + addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: false, + cancellationToken: CancellationToken.None); + + refreshedUri = addressInfo + .Get(Documents.Client.Protocol.Tcp)? + .ReplicaTransportAddressUris + .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + + // Because the open connection attempt to the unhealthy replica was successful, the replica was + // marked as healthy. + mockHttpHandler.VerifyAll(); + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.IsNotNull(refreshedUri); + Assert.AreEqual( + expected: TransportAddressHealthState.HealthStatus.Connected, + actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + + // This assertion makes sure that no additional calls were made to the open connection handler after + // since the last address refresh, because all the replicas are now either Unknown or Connected. + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 1, + expectedMethodInvocationCount: 2, + expectedReceivedAddressesCount: 1, + expectedSuccessCount: 1); + } + + /// + /// Test to validate that when replica validation is disabled and there exists some unhealthy replicas, the gateway address + /// cache doesn't validate the health state of the unhealthy replicas. + /// + [TestMethod] + [Owner("dkunda")] + public async Task TryGetAddressesAsync_WhenReplicaVlidationDisabled_ShouldNotValidateUnhealthyReplicas() + { + // Arrange. + Mock mockHttpHandler = new(MockBehavior.Strict); + string oldAddress = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/4s"; + string newAddress = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/5s"; + string addressTobeMarkedUnhealthy = "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/2s"; + mockHttpHandler.SetupSequence(x => x.SendAsync( + It.IsAny(), + It.IsAny())) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + oldAddress, + })) + .Returns(MockCosmosUtil.CreateHttpResponseOfAddresses(new List() + { + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/1p", + addressTobeMarkedUnhealthy, + "rntbd://dummytenant.documents.azure.com:14003/apps/APPGUID/services/SERVICEGUID/partitions/PARTITIONGUID/replicas/3s", + newAddress, + })); + + FakeOpenConnectionHandler fakeOpenConnectionHandler = new(failingIndexes: new HashSet()); + HttpClient httpClient = new(new HttpHandlerHelper(mockHttpHandler.Object)); + GatewayAddressCache cache = new( + new Uri(GatewayAddressCacheTests.DatabaseAccountApiEndpoint), + Documents.Client.Protocol.Tcp, + this.mockTokenProvider.Object, + this.mockServiceConfigReader.Object, + MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: fakeOpenConnectionHandler, + suboptimalPartitionForceRefreshIntervalInSeconds: 2, + enableTcpConnectionEndpointRediscovery: true); + + DocumentServiceRequest request = DocumentServiceRequest.Create(OperationType.Invalid, ResourceType.Address, AuthorizationTokenType.Invalid); + + // Act and Assert. + PartitionAddressInformation addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: false, + cancellationToken: CancellationToken.None); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); + Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); + + // Because force refresh is requested, an unhealthy replica is added to the failed endpoint so that it's status could be validted. + request.RequestContext.FailedEndpoints.Value.Add( + new TransportAddressUri( + addressUri: new Uri( + uriString: addressTobeMarkedUnhealthy))); + + addressInfo = await cache.TryGetAddressesAsync( + request: request, + partitionKeyRangeIdentity: this.testPartitionKeyRangeIdentity, + serviceIdentity: this.serviceIdentity, + forceRefreshPartitionAddresses: true, + cancellationToken: CancellationToken.None); + + Assert.AreEqual(4, addressInfo.AllAddresses.Count); + Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); + Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); + + TransportAddressUri refreshedUri = addressInfo + .Get(Documents.Client.Protocol.Tcp)? + .ReplicaTransportAddressUris + .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + + Assert.IsNotNull(refreshedUri); + Assert.AreEqual( + expected: TransportAddressHealthState.HealthStatus.Unknown, + actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + + mockHttpHandler.VerifyAll(); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedExceptionCount: 0, + expectedMethodInvocationCount: 0, + expectedReceivedAddressesCount: 0, + expectedSuccessCount: 0); + } + + /// + /// Blocks the current thread until a completion signal on the ManualResetEvent + /// is received. A timeout of 5 seconds is added to avoid any thread starvation. + /// + /// An instance of . + /// A boolean flag indicating if a Reset on the manualResetEvent is required. + private static void WaitForManualResetEventSignal( + ManualResetEvent manualResetEvent, + bool shouldReset) + { + manualResetEvent.WaitOne( + millisecondsTimeout: 5000); + + if (shouldReset) + { + manualResetEvent.Reset(); + } + } + /// /// Helper method to assert on the class attributes /// to match with that of the expected ones. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/AsyncCacheNonBlockingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/AsyncCacheNonBlockingTests.cs index d5250b0408..d58ab3db5b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/AsyncCacheNonBlockingTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/AsyncCacheNonBlockingTests.cs @@ -392,5 +392,150 @@ await asyncCache.GetAsync( Assert.AreEqual(1, totalLazyCalls); Assert.AreEqual("Test3", result); } + + /// + /// Test to validate that when RefreshAsync() is invoked for a valid existing key, the + /// cache refreshes the key successfully and the new value is updated in the cache. + /// + [TestMethod] + [Owner("dkunda")] + public async Task RefreshAsync_WhenRefreshRequestedForAnExistingKey_ShouldRefreshTheCache() + { + // Arrange. + AsyncCacheNonBlocking asyncCache = new (); + + // Act and Assert. + string result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value1"), + (_) => false); + + Assert.AreEqual("value1", result); + + await asyncCache.RefreshAsync( + "key", + (_) => Task.FromResult("value2")); + + result = await asyncCache.GetAsync( + "key", + (_) => throw new Exception("Should not refresh."), + (_) => false); + + Assert.AreEqual("value2", result); + } + + /// + /// Test to validate that when a DocumentClientException is thrown during RefreshAsync() operation, + /// then the cache removes the key for which a refresh was requested. + /// + [TestMethod] + [Owner("dkunda")] + public async Task RefreshAsync_WhenThrowsDocumentClientException_ShouldRemoveKeyFromTheCache() + { + // Arrange. + AsyncCacheNonBlocking asyncCache = new (); + + // Act and Assert. + string result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value1"), + (_) => false); + + Assert.AreEqual("value1", result); + + result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value2"), + (_) => false); + + // Because the key is already present in the cache and a force refresh was not requested + // the func delegate should not get invoked and thus the cache should not be updated + // and still return the old cached value. + Assert.AreEqual("value1", result); + + NotFoundException notFoundException = new ( + message: "Item was deleted."); + try + { + await asyncCache.RefreshAsync( + "key", + async (_) => + { + await Task.Delay(TimeSpan.FromMilliseconds(5)); + throw notFoundException; + }); + Assert.Fail("Should throw a NotFoundException"); + } + catch (NotFoundException exception) + { + Assert.AreEqual(notFoundException, exception); + } + + // Because the key was deleted from the cache, the func delegate should get invoked at + // this point and update the value to value2. + result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value2"), + (_) => false); + + Assert.AreEqual("value2", result); + } + + /// + /// Test to validate that when some other Exception is thrown during RefreshAsync() operation, + /// then the cache does not remove the key for which the refresh was originally requested. + /// + [TestMethod] + [Owner("dkunda")] + public async Task RefreshAsync_WhenThrowsOtherException_ShouldNotRemoveKeyFromTheCache() + { + // Arrange. + AsyncCacheNonBlocking asyncCache = new(); + + // Act and Assert. + string result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value1"), + (_) => false); + + Assert.AreEqual("value1", result); + + result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value2"), + (_) => false); + + // Because the key is already present in the cache and a force refresh was not requested + // the func delegate should not get invoked and thus the cache should not be updated + // and still return the old cached value. + Assert.AreEqual("value1", result); + + Exception exception = new( + message: "Timeout exception."); + try + { + await asyncCache.RefreshAsync( + "key", + async (_) => + { + await Task.Delay(TimeSpan.FromMilliseconds(5)); + throw exception; + }); + Assert.Fail("Should throw a NotFoundException"); + } + catch (Exception ex) + { + Assert.AreEqual(ex, exception); + } + + // Because the key should not get deleted from the cache, the func delegate should not get invoked at + // this point. + result = await asyncCache.GetAsync( + "key", + (_) => Task.FromResult("value2"), + (_) => false); + + Assert.AreEqual("value1", result); + } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Utils/ReflectionUtils.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Utils/ReflectionUtils.cs new file mode 100644 index 0000000000..78bf6fafb2 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Utils/ReflectionUtils.cs @@ -0,0 +1,43 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tests +{ + using System; + using System.Reflection; + + /// + /// Common utility class for reflaction related operations. + /// + internal static class ReflectionUtils + { + /// + /// This helper method uses reflection to set the private and read only fields + /// to the disered values to help the test cases mimic the expected behavior. + /// + /// An object where reflection will be applied to update the field. + /// A string containing the internal field name. + /// An integer to add or substract the desired delay in minutes. + internal static void AddMinuteToDateTimeFieldUsingReflection( + object objectName, + string fieldName, + int delayInMinutes) + { + FieldInfo fieldInfo = objectName + .GetType() + .GetField( + name: fieldName, + bindingAttr: BindingFlags.Instance | BindingFlags.NonPublic); + + DateTime? fieldValue = (DateTime?)fieldInfo + .GetValue( + obj: objectName); + + fieldInfo + .SetValue( + obj: objectName, + value: ((DateTime)fieldValue).AddMinutes(delayInMinutes)); + } + } +} diff --git a/docs/ReplicaValidationDesign.md b/docs/ReplicaValidationDesign.md new file mode 100644 index 0000000000..0e23db09d7 --- /dev/null +++ b/docs/ReplicaValidationDesign.md @@ -0,0 +1,338 @@ +# Design Approach to Validate Backend Replicas During Service Upgrade in Direct Mode + +## Table of Contents + +* [Scope.](#scope) +* [Backgraound.](#backgraound) +* [Proposed Solution.](#proposed-solution) +* [Design Approach.](#design-approach) + * [Outline.](#outline) + * [Updated Sequence Diagram for `CosmosClient` initialization.](#updated-sequence-diagram-for-cosmosclient-initialization) + * [Sequence Diagram when `StoreReader` invokes the `GatewayAddressCache` to resolve addresses and leverages `AddressEnumerator` to enumerate the transport addresses.](#sequence-diagram-when-storereader-invokes-the-gatewayaddresscache-to-resolve-addresses-and-leverages-addressenumerator-to-enumerate-the-transport-addresses) + * [State Diagram to Understand the `TransportAddressUri` Health State Transformations.](#state-diagram-to-understand-the-transportaddressuri-health-state-transformations) + * [`Microsoft.Azure.Cosmos.Direct` package class diagrams.](#azurecosmosdirect-package-class-diagrams) + * [`Microsoft.Azure.Cosmos` package class diagrams.](#microsoftazurecosmos-package-class-diagrams) +* [Pull Request with Sample Code Changes.](#pull-request-with-sample-code-changes) +* [References.](#references) + +## Scope + +The scope of the replica validation workstream is targed for the `CosmosClient` configured for `Direct` mode. + +## Backgraund + +During an upgrade scenario in the backend replica nodes, there has been an observation of increased request latency. One of the primary reason for the latency is that, during an upgrade, a replica which is still undergoing upgrade may still be returned back to SDK, when an address refresh occurres. As of today, the incoming request will have `25%` chance to hit the replica that not ready yet, therefore causing the `ConnectionTimeoutException`, which contributes to the increased latency. + +To understand the problem statement better, please take a look at the below sequence diagram which reflects the connection timeouts caused by the replica upgrade. + +```mermaid +sequenceDiagram + autonumber + participant A as StoreReader
[Direct Code] + participant B as GlobalAddressResolver
[v3 Code] + participant C as GatewayAddressCache
[v3 Code] + participant D as GatewayService
[External Service] + participant E as BackendReplica
[A Replica Node Still Undergoing Upgrade
Address: rntbd://test.azure.com:443/partitions/2s] + A->>+B: Request (forceRefresh - false) + B->>+C: TryGetAddresses (forceRefresh - false) + C->>-B: Fetch Cached Addresses
rntbd://test.azure.com:443/partitions/2s + B->>-A: Return Addresses
rntbd://test.azure.com:443/partitions/2s + A->>+E: Request Sent to Backend Replica + E-x-A: Request fails with 410 GoneException + A->>+B: Request (forceRefresh - true)
GoneWithRetryAttempt + B->>+C: TryGetAddresses (forceRefresh - true) + C->>+D: GetServerAddresses + D->>-C: Returns the new refreshed addresses
rntbd://test.azure.com:443/partitions/2s + Note over D: Note that the returned addresses from
GatewayService may still undergoing
the upgrade, thus and they are not in a ready state. + C->>-B: Returns the refreshed addresses
rntbd://test.azure.com:443/partitions/2s + B->>-A: Returns the refreshed addresses
rntbd://test.azure.com:443/partitions/2s + A->>+E: Request Sent to Backend Replica + E-x-A: Request fails again with 410 GoneException + Note over A: Note that the request fails to connect to the replica
which causes a "ConnectionTimeoutException". +``` + +## Proposed Solution + +The .NET SDK will track the replica endpoint health based on client side metrics, and de-prioritize any replica which were marked as - `Unhealthy`. SDK will validate the health of the replica by attempting to open RNTBD connections to the backend. When SDK refresh addresses back from gateway for a partition, **SDK will only validate the replica/s which were in `Unhealthy` status, by opening RNTBD connection requests**. This process will be completed with best effort, which means: + +- If the validation can not finish within `1 min` of opening connections, the de-prioritize will stop for certain status. + +- The selection of the replica will not be blocked by the validation process. To better understand this - if a request needs to be sent to `N` replicas, and if there is only `N-1` replica in good status, it will still go ahead selecting the `Nth` replica which needs validation. + +- It is opt in only for now, by setting the environment variable `AZURE_COSMOS_REPLICA_VALIDATION_ENABLED` to `true`. + +## Design Approach + +### Outline + +The basic idea for this design approach has been divited into *three* parts, which has been mentioned below in detail: + +- Maintain `4` new health statuses into the `TransportAddressUri`, which are : + + - **`Connected`** (Indicates that there is already a connection made successfully to the backend replica) + - **`Unknown`** (Indicates that the connection exists however the status is unknown at the moment) + - **`Unhealthy Pending`** (Indicates that the connection was unhealthy previously, but an attempt will be made to validate the replica to check the current status) + - **`Unhealthy`** (Indicates that the connection is unhealthy at the moment) + +- Validate the `Unhealthy` replicas returned from the Address Cache, by attempting to open the RNTBD connection. Note that the validation task and the connection opening part has been done as a background task, so that the address resolving doesn't wait on the RNTBD context negotiation to finish. + +- Leverage the `AddressEnumerator` to reorder the replicas by their health statuses. For instance, if the replica validation is enabled, the `AddressEnumerator` will reorder the replicas by sorting them in the order of **Connected/ Unknown** > **Unhealthy Pending** > **Unhealthy**. However, if the replica validation is disabled, the replicas will be sorted in the order of **Connected/ Unknown/ Unhealthy Pending** > **Unhealthy**. + +Prior discussing the replica validation, it is very important to understand the changes in the flow while opening the RNTBD connections to the backend replica nodes, during the `CosmosClient` initialization. The changes in the flow are mentioned below as an updated sequence diagram. + +### Updated Sequence Diagram for `CosmosClient` initialization. + +```mermaid +sequenceDiagram + participant A as CosmosClient
[v3 Code] + participant B as ClientContextCore
[v3 Code] + participant C as DocumentClient
[v3 Code] + participant D as ServerStoreModel
[Direct Code] + participant K as StoreClientFactory
[Direct Code] + participant E as StoreClient
[Direct Code] + participant F as ReplicatedResourceClient
[Direct Code] + participant G as GlobalAddressResolver
[v3 Code] + participant H as GatewayAddressCache
[v3 Code] + participant J as RntbdOpenConnectionHandler
[Direct Code] + participant I as TransportClient
[Direct Code] + A->>B: 1. InitializeContainerWithRntbdAsync() + B->>C: 2. OpenConnectionsAsync() + C->>C: 2.1. CreateStoreModel() + C->>K: 3. CreateStoreClient(addressResolver) + K->>E: 4. new StoreClient(addressResolver) + E->>G: 5. SetOpenConnectionsHandler(new RntbdOpenConnectionHandler(transportClient)) + Note over E: a) Creates a new instance of RntbdOpenConnectionHandler
and sets it to the IAddressResolverExtension.
Note that the GlobalAddressResolver implements the
IAddressResolverExtension today.
b) Sets the IAddressResolverExtension to the Replicated
ResourceClient. + G->>H: 6. SetOpenConnectionsHandler(openConnectionHandler) + C->>D: 7. OpenConnectionsToAllReplicasAsync() + D->>E: 8. OpenConnectionsToAllReplicasAsync() + E->>F: 9. OpenConnectionsToAllReplicasAsync() + F->>G: 10. OpenConnectionsToAllReplicasAsync() + G->>G: 10.1 collection = collectionCache.
ResolveByNameAsync() + G->>G: 10.2 partitionKeyRanges = routingMapProvider.
TryGetOverlappingRangesAsync(FullRange) + G->>H: 11. OpenAsync
(partitionKeyRangeIdentities) + Note over G: Resolves the collection by the
container link url and fetches
the partition key full ranges. + H->>H: 11.1 GetServerAddressesViaGatewayAsync() + H->>J: 12. OpenRntbdChannelsAsync() + Note over H: Gets the transport address uris from address info
and invokes the RntbdOpenConnectionHandler
OpenRntbdChannelsAsync() method with the transport uris
to establish the Rntbd connection. + J->>I: 13. OpenConnectionAsync()
using the resolved transport address uris. +``` + +Now that we are well aware of the changes in the RNTBD open connection flow, let's leverage the changes in the replica validation flow. The below sequence diagram describes the request and response flow from `StoreReader` (present in the `Cosmos.Direct` namespace) to the `GatewayAddressCache` (present in the `Microsoft.Azure.Cosmos` namespace), during the read request to backend replica/s. + +### Sequence Diagram when `StoreReader` invokes the `GatewayAddressCache` to resolve addresses and leverages `AddressEnumerator` to enumerate the transport addresses. + +```mermaid +sequenceDiagram + participant A as StoreReader
[Direct Code] + participant B as AddressSelector
[v3 Code] + participant C as GlobalAddressResolver
[v3 Code] + participant D as AddressResolver
[v3 Code] + participant E as GatewayAddressCache
[v3 Code] + participant F as RntbdOpenConnectionHandler
[Direct Code] + participant G as AsyncCacheNonBlocking
[v3 Code] + participant H as GatewayService
[external service] + participant I as AddressEnumerator
[Direct Code] + participant J as TransportClient
[Direct Code] + participant K as Channel
[Direct Code] + participant L as TransportAddressUri
[Direct Code] + A->>A: 1. ReadMultipleReplicaAsync() + A->>B: 2. ResolveAllTransportAddressUriAsync(forceRefresh - false) + B->>C: 3. ResolveAsync(forceRefresh - false) + C->>D: 4. ResolveAsync(forceRefresh - false) + D->>D: 5. ResolveAddressesAndIdentityAsync() + D->>E: 6. TryGetAddressesAsync(forceRefresh - false) + E->>G: 7. GetAsync ("singleValueInitFunc delegate", "forceRefresh - false") + Note over L: Initial health status of a
TransportAddressUri is "Unknown". + Note over E: Passes the SingleValueInitFunc delegate
to async nonblocking cache. + G->>E: 8. Returns the cached addresses + E->>D: 9. Returns the resolved addresses + D->>C: 10. Returns the resolved addresses + C->>B: 11. Returns the resolved addresses + B->>A: 12. Returns the resolved addresses + A->>A: 13. Request failes with "GoneException" + Note over A: Sets Force Refresh
header to true. + A->>A: 14. ReadMultipleReplicaAsync() + A->>B: 15. ResolveAllTransportAddressUriAsync (forceRefresh - true) + B->>C: 16. ResolveAsync(forceRefresh - true) + C->>D: 17. ResolveAsync(forceRefresh - true) + D->>D: 18. ResolveAddressesAndIdentityAsync(forceRefresh - true) + D->>E: 19. TryGetAddressesAsync(forceRefresh - true) + E->>G: 20. GetAsync ("singleValueInitFunc delegate", "forceRefresh - true") + Note over E: Passes the SingleValueInitFunc delegate
to async nonblocking cache. + G->>E: 21. Invokes the singleValueInitFunc delegate + E->>E: 22. SetTransportAddressUrisToUnhealthy(currentCachedValue, failedEndpoints) + Note over E: Sets the failed TransportAddressUris
to an "Unhealthy" status. + E->>L: 23. SetUnhealthy() + E->>E: 24. GetAddressesForRangeIdAsync(forceRefresh - true, cachedAddresses) + E->>H: 25. Invokes the GatewayService using GetServerAddressesViaGatewayAsync()
to receive new addresses. + H->>E: 26. Receives the resolved new addresses. + E->>E: 27. MergeAddresses + Note over E: The purpose of the merge is to restore the health statuses of all the new addresses to
that of their recpective cached addresses, if returned same addresses. + E->>L: 28. SetRefreshedIfUnhealthy() + Note over E: Sets any TransportAddressUri with
an "Unhealthy" status to "UnhealthyPending". + E->>E: 29. ValidateReplicaAddresses(mergedTransportAddress) + Note over E: Validates the backend replicas,
if the replica validation env variable is enabled. + E-->>F: 30. OpenRntbdChannelsAsync(mergedTransportAddress) + Note over E: If replica validation is enabled, then validate unhealthy pending
replicas by opening RNTBD connections. Note that this
operations executes as a background task. + F-->>J: 31. OpenConnectionAsync()
using the resolved transport address uris + J-->>K: 32. OpenConnectionAsync()
using the resolved physical address uris + K-->>L: 33. SetConnected() + Note over K: Initializes and Establishes a RNTBD
context negotiation to the backend replica nodes. + E->>G: 34. Returns the merged addresses to cache and store into the Async Nonblocking Cache + G->>E: 35. Returns the resolved addresses + E->>E: 36. ShouldRefreshHealthStatus() + Note over E: Refresh the cache if there was an address
has been marked as unhealthy long enough (more than a minute)
and need to revalidate its status. + E-->>G: 37. Refresh ("GetAddressesForRangeIdAsync() as the singleValueInitFunc delegate", "forceRefresh - true") + Note over E: Note that the refresh operation
happens as a background task. + E->>D: 38. Returns the resolved addresses + D->>C: 39. Returns the resolved addresses + C->>B: 40. Returns the resolved addresses + B->>A: 41. Returns the resolved transport addresses + A->>I: 42. GetTransportAddresses("transportAddressUris", "replicaAddressValidationEnabled") + I->>I: 43. ReorderReplicasByHealthStatus() + Note over I: Re-orders the transport addresses
by their health statuses
Connected/Unknown >> UnhealthyPending >> Unhealthy. + I->>A: 44. Returns the transport addresses re-ordered by their health statuses +``` +### State Diagram to Understand the `TransportAddressUri` Health State Transformations. + +To better understand the design, it is critical to understand the `TransportAddressUri` health state transformations. The below state diagram depicts the `TransportAddressUri` state transitions in detail. + +```mermaid + stateDiagram-v2 + [*] --> Unknown + note right of Unknown + Initial state of
a TransportAddressUri + end note + Unknown --> Connected: Channel Aquire
Successful + Unknown --> Unhealthy: Channel Aquire
Failed + Unhealthy --> Connected: Channel Aquire
Successful after 1 Min + Unhealthy --> UnhealthyPending: Refresh Addresses
from Gateway when
Replica Validation
is enabled + UnhealthyPending --> Unhealthy: RntbdOpenConnectionHandler -
Channel Aquire
Failed + UnhealthyPending --> Connected: RntbdOpenConnectionHandler -
Channel Aquire
Successful + Connected --> Unhealthy: Request failed with 410
GoneException and
force refresh + Connected --> [*] +``` + +To accomplish the above changes in the replica validation flow, below are the class diagrams and the proposed code changes in both `Microsoft.Azure.Cosmos.Direct` and `Microsoft.Azure.Cosmos` packages. + +### `Microsoft.Azure.Cosmos.Direct` package class diagrams. + +Introduce a new `IOpenConnectionsHandler` interface with `OpenRntbdChannelsAsync()` method. Create a new class `RntbdOpenConnectionHandler` that will eventually implement the `IOpenConnectionsHandler` interface and override the `OpenRntbdChannelsAsync()` method to establish Rntbd connections to the transport address uris. Note that, this class will also add the concurrency control logic, so that any burst of connection creation could be avoided. The below class diagram depicts the same behavior. + +```mermaid +classDiagram + IOpenConnectionsHandler --|> RntbdOpenConnectionHandler : implements + <> IOpenConnectionsHandler + IOpenConnectionsHandler: +OpenRntbdChannelsAsync(IReadOnlyList~TransportAddressUri~ addresses) + class RntbdOpenConnectionHandler{ + -TransportClient transportClient + -SemaphoreSlim semaphore + -int SemaphoreAcquireTimeoutInMillis + +OpenRntbdChannelsAsync() + } +``` + +Extend the `IAddressResolverExtension` interface with `SetOpenConnectionsHandler()` method. The benefits and the utilizations are provided below: + +- The `GlobalAddressResolver` can then implement the `SetOpenConnectionsHandler()` method, which will be invoked by the `StoreClient` constructor to set the `RntbdOpenConnectionHandler`. + +- The `OpenConnectionsAsync()` method present inside `GlobalAddressResolver`, will be invoked from the `ReplicatedResourceClient` eventually. The `AddressResolver` class can simply implement the method/s and return an empty `Task`. The `GlobalAddressResolver`.`OpenConnectionsAsync()` is responsible for + + - Resolving the collection by the database name and container link, + - Fetching the partition key full ranges and + - Invoking the `GatewayAddressCache` for the preferred region, with the `RntbdOpenConnectionHandler` instance, passed by the `StoreClient`. + +The below class diagram depicts the same behavior. + +*[Note: The `IAddressResolverExtension` was introduced to hold the new methods, which could break the existing build, if put directly into `IAddressResolver` interface. The `IAddressResolverExtension` will be removed eventually and the existing methods will be moved into `IAddressResolver` interface.]* + +```mermaid +classDiagram + IAddressResolver --|> IAddressResolverExtension : extends + IAddressResolverExtension --|> GlobalAddressResolver : implements + <> IAddressResolver + <> IAddressResolverExtension + IAddressResolverExtension: +OpenConnectionsAsync(string databaseName, string containerLinkUri) + IAddressResolverExtension: +SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionHandler) + class GlobalAddressResolver{ + +OpenConnectionsAsync() + +SetOpenConnectionsHandler() + } +``` + +Update the method definition of `GetTransportAddresses()` present in `IAddressEnumerator` to add a new `boolean` argument `replicaAddressValidationEnabled`. This will help to choose the correct set of replica/s when replica validation is enabled or disabled. Additionally, a new private method `ReorderReplicasByHealthStatus()` will be added in `AddressEnumerator` to re-order the transport uri/s by their health status priority. The below class diagram depicts the same changes. + +```mermaid +classDiagram + IAddressEnumerator --|> AddressEnumerator : implements + <> IAddressEnumerator + IAddressEnumerator: +GetTransportAddresses(IReadOnlyList~TransportAddressUri~ transportAddressUris, Lazy~HashSet~TransportAddressUri~~ failedEndpoints, bool replicaAddressValidationEnabled) IEnumerable~TransportAddressUri~ + class AddressEnumerator{ + +GetTransportAddresses() + -ReorderReplicasByHealthStatus(IReadOnlyList~TransportAddressUri~ transportAddressUris, Lazy~HashSet~TransportAddressUri~~ failedEndpoints, bool replicaAddressValidationEnabled) IEnumerable~TransportAddressUri~ + } +``` + +This class will be updated eventually, with critical set of changes required for the replica validation workstream. It will introduce an enum `HealthStatus` with `4` new health statuses - `Connected`, `Unknown`, `UnhealthyPending` and `Unhealthy` to re-order the replicas with their status priorities. The setters will help to capture the correct health state of the `TransportAddressUri` at any given point of time. The below class diagram depicts the same behavior. + +```mermaid +classDiagram + class TransportAddressUri { + -DateTime? lastUnknownTimestamp + -DateTime? lastUnhealthyPendingTimestamp + -DateTime? lastUnhealthyTimestamp + -HealthStatus healthStatus + -ReaderWriterLockSlim healthStatusLock + +SetConnected() + +SetRefreshedIfUnhealthy() + +SetHealthStatus(HealthStatus status, bool forceSet) + +GetHealthStatus() HealthStatus + +GetEffectiveHealthStatus() HealthStatus + +ShouldRefreshHealthStatus() bool + } + + class HealthStatus { + <> + Connected : 100 + Unknown : 200 + UnhealthyPending : 300 + Unhealthy : 400 + } +``` + +### `Microsoft.Azure.Cosmos` package class diagrams. + +Extend the `IAddressCache` interface with `SetOpenConnectionsHandler()` method. This method should take an instance of the `RntbdOpenConnectionHandler` (which implements the `IOpenConnectionsHandler`) and sets it to a private field for later usage, to establish the Rntbd connectivity to the backend replica nodes. + +```mermaid +classDiagram + IAddressCache --|> GatewayAddressCache : implements + <> IAddressCache + IAddressCache: +SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionsHandler) + class GatewayAddressCache { + -IOpenConnectionsHandler openConnectionsHandler + -string replicaValidationVariableName + +SetOpenConnectionsHandler(IOpenConnectionsHandler openConnectionsHandler) + -MergeAddresses(PartitionAddressInformation newAddresses, PartitionAddressInformation cachedAddresses) PartitionAddressInformation + -ValidateReplicaAddresses(IReadOnlyList~TransportAddressUri~ addresses) + } +``` + +Add a new method `Refresh()` into the `AsyncCacheNonBlocking` to force refresh the address cache on demand. Note that `Refresh()` is used to force refresh any `Unhealthy` replica nodes, which has been in `Unhealthy` state for more than `1` minute. That way, any `Unhealthy` replica nodes will be back into the validation pool, which will eventually be useful to avoid any skewed replica selection. + +```mermaid +classDiagram + class AsyncCacheNonBlocking~TKey, TValue~ { + +Task Refresh(TKey key, Func~TValue, Task~TValue~~ singleValueInitFunc) + } +``` + +## Pull Request with Sample Code Changes + +Here is the [link to a sample PR](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3570) which provides an overview of the incoming changes. + +## References + +- [Mermaid Documentation.](https://mermaid-js.github.io/mermaid/#/) +- [Upgrade Resiliency Tasks List.](https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3409) +- [Design Document to Utilize RNTBD Context Negotiation During `CosmosClient` Initialization.](https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3442) \ No newline at end of file From 93bb10b47b6bc96b3b647daf84cccb0e850ca9f9 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 1 Mar 2023 13:06:30 -0800 Subject: [PATCH 065/164] ReadMany: Fixes BadRequest when using Ids with single quotes (#3732) * Use parameters * Emulator tests --- .../src/ReadManyQueryHelper.cs | 8 +++-- .../CosmosReadManyItemsTests.cs | 31 ++++++++----------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ReadManyQueryHelper.cs b/Microsoft.Azure.Cosmos/src/ReadManyQueryHelper.cs index e69476129c..6ebcda267c 100644 --- a/Microsoft.Azure.Cosmos/src/ReadManyQueryHelper.cs +++ b/Microsoft.Azure.Cosmos/src/ReadManyQueryHelper.cs @@ -249,10 +249,13 @@ private QueryDefinition CreateReadManyQueryDefinitionForId(List<(string, Partiti { int totalItemCount = Math.Min(items.Count, startIndex + this.maxItemsPerQuery); StringBuilder queryStringBuilder = new StringBuilder(); + SqlParameterCollection sqlParameters = new SqlParameterCollection(); queryStringBuilder.Append("SELECT * FROM c WHERE c.id IN ( "); for (int i = startIndex; i < totalItemCount; i++) { - queryStringBuilder.Append($"'{items[i].Item1}'"); + string idParamName = "@param_id" + i; + sqlParameters.Add(new SqlParameter(idParamName, items[i].Item1)); + queryStringBuilder.Append(idParamName); if (i < totalItemCount - 1) { queryStringBuilder.Append(","); @@ -260,7 +263,8 @@ private QueryDefinition CreateReadManyQueryDefinitionForId(List<(string, Partiti } queryStringBuilder.Append(" )"); - return new QueryDefinition(queryStringBuilder.ToString()); + return QueryDefinition.CreateFromQuerySpec(new SqlQuerySpec(queryStringBuilder.ToString(), + sqlParameters)); } private QueryDefinition CreateReadManyQueryDefinitionForOther(List<(string, PartitionKey)> items, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs index ede534cb9d..c3949d763f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs @@ -5,16 +5,11 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { using System; - using System.Collections.Concurrent; using System.Collections.Generic; - using System.Collections.ObjectModel; using System.Net; - using System.Net.Http; - using System.Text; using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Fluent; - using Microsoft.Azure.Cosmos.Query.Core; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -22,16 +17,15 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests public class CosmosReadManyItemsTests : BaseCosmosClientHelper { private Container Container = null; - private ContainerProperties containerSettings = null; [TestInitialize] public async Task TestInitialize() { await base.TestInit(); string PartitionKey = "/pk"; - this.containerSettings = new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: PartitionKey); + ContainerProperties containerSettings = new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: PartitionKey); ContainerResponse response = await this.database.CreateContainerAsync( - this.containerSettings, + containerSettings, throughput: 20000, cancellationToken: this.cancellationToken); Assert.IsNotNull(response); @@ -122,23 +116,24 @@ public async Task ReadManyDoesNotFetchQueryPlan() [TestMethod] public async Task ReadManyWithIdasPk() { - string PartitionKey = "/id"; - ContainerProperties containerSettings = new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: PartitionKey); - Container container = await this.database.CreateContainerAsync(containerSettings); + Container container = await this.database.CreateContainerAsync(Guid.NewGuid().ToString(), "/id"); List<(string, PartitionKey)> itemList = new List<(string, PartitionKey)>(); - for (int i = 0; i < 5; i++) - { - itemList.Add((i.ToString(), new PartitionKey(i.ToString()))); - } // Create items with different pk values for (int i = 0; i < 5; i++) { ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(); - item.id = i.ToString(); ItemResponse itemResponse = await container.CreateItemAsync(item); Assert.AreEqual(HttpStatusCode.Created, itemResponse.StatusCode); + + itemList.Add((item.id, new PartitionKey(item.id))); + + ToDoActivity itemWithSingleQuotes = ToDoActivity.CreateRandomToDoActivity(id: item.id + "'singlequote"); + ItemResponse itemResponseWithSingleQuotes = await container.CreateItemAsync(itemWithSingleQuotes); + Assert.AreEqual(HttpStatusCode.Created, itemResponseWithSingleQuotes.StatusCode); + + itemList.Add((itemWithSingleQuotes.id, new PartitionKey(itemWithSingleQuotes.id))); } using (ResponseMessage responseMessage = await container.ReadManyItemsStreamAsync(itemList)) @@ -149,12 +144,12 @@ public async Task ReadManyWithIdasPk() ToDoActivity[] items = this.GetClient().ClientContext.SerializerCore.FromFeedStream( CosmosFeedResponseSerializer.GetStreamWithoutServiceEnvelope(responseMessage.Content)); - Assert.AreEqual(items.Length, 5); + Assert.AreEqual(items.Length, 10); } FeedResponse feedResponse = await container.ReadManyItemsAsync(itemList); Assert.IsNotNull(feedResponse); - Assert.AreEqual(feedResponse.Count, 5); + Assert.AreEqual(feedResponse.Count, 10); Assert.IsTrue(feedResponse.Headers.RequestCharge > 0); Assert.IsNotNull(feedResponse.Diagnostics); } From 45c0d147ab35ddc6e9c13e91919b147ee6ea06c0 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 1 Mar 2023 14:39:47 -0800 Subject: [PATCH 066/164] Release: Adds SDK version and changelog for 3.32.1 (#3733) * version bump * Contracts --- Directory.Build.props | 4 +- .../contracts/API_3.32.1-preview.txt | 1531 +++++++++++++++++ .../contracts/API_3.32.1.txt | 1478 ++++++++++++++++ changelog.md | 6 + 4 files changed, 3017 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.1-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.1.txt diff --git a/Directory.Build.props b/Directory.Build.props index a4a5b0a087..aa8918e3b1 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.32.0 - 3.32.0 + 3.32.1 + 3.32.1 preview 3.30.2 2.0.1 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.1-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.1-preview.txt new file mode 100644 index 0000000000..69b7a4b83e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.1-preview.txt @@ -0,0 +1,1531 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.1.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.1.txt new file mode 100644 index 0000000000..5218206b0e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.1.txt @@ -0,0 +1,1478 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index aa2aaad67d..b201ba77fb 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,12 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +###
[3.32.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.1) - 2023-03-01 +### [3.32.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.1-preview) - 2023-03-01 + +#### Fixed +- [#3732](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3732) ReadMany: Fixes BadRequest when using Ids with single quotes + ### [3.32.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.0) - 2023-02-03 #### Fixed - [#3466](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3466) ClientRetryPolicy: Fixes behavior to Meta-data write operations in multimaster accounts From 0018c4a1c165dd3bbbca704abdae645fa2cd4182 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Thu, 2 Mar 2023 13:11:10 -0800 Subject: [PATCH 067/164] [Internal] Build: Fixes static tool analysis versions (#3736) * Update Binskim and follow warnings * Fixing task * More version bumps * binskim args * Padding * policheck * postanalysis parameters * analysis settings --- templates/static-tools.yml | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/templates/static-tools.yml b/templates/static-tools.yml index b3ce2b11de..fb7b375586 100644 --- a/templates/static-tools.yml +++ b/templates/static-tools.yml @@ -23,30 +23,16 @@ jobs: arguments: '-p:Optimize=true -p:IsPreview=true --configuration Release' versioningScheme: OFF - - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@3 + - task: securedevelopmentteam.vss-secure-development-tools.build-task-binskim.BinSkim@4 displayName: 'BinSkim' inputs: - toolVersion: Latest - InputType: Basic - Function: analyze - AnalyzeTarget: $(Build.SourcesDirectory)\Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll - AnalyzeConfigPath: default + AnalyzeTargetGlob: $(Build.SourcesDirectory)\Microsoft.Azure.Cosmos\src\bin\Release\netstandard2.0\Microsoft.Azure.Cosmos.Client.dll AnalyzeRecurse: true AnalyzeVerbose: true AnalyzeHashes: false AnalyzeStatistics: false AnalyzeEnvironment: false - #Analyze source code for type of content and target types to help determine which tools to run - - task: securedevelopmentteam.vss-secure-development-tools.build-task-autoapplicability.AutoApplicability@1 - displayName: 'AutoApplicability' - inputs: - VerboseWriter: true - ExternalRelease: true - InternalRelease: true - IsService: true - IsSoftware: true - # Analyze source and build output text files for credentials - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3 displayName: 'CredScan' @@ -58,22 +44,19 @@ jobs: verboseOutput: false # Scan text elements including code, code comments, and content/web pages, for sensitive terms based on legal, cultural, or geopolitical reasons - - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1 + - task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@2 displayName: 'PoliCheck' inputs: targetType: F + optionsFC: 0 # AntiMalware scan - - task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3 + - task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@4 displayName: 'AntiMalware' continueOnError: true # signature refresh failing resulting in tasks failures inputs: EnableServices: true - # Run checks for recently discovered vulnerabilities which are not yet incorporated to another tool - - task: securedevelopmentteam.vss-secure-development-tools.build-task-vulnerabilityassessment.VulnerabilityAssessment@0 - displayName: 'Vulnerability Assessment' - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 displayName: 'Component Governance Detection' #https://docs.opensource.microsoft.com/tools/cg.html inputs: @@ -81,11 +64,16 @@ jobs: failOnAlert: true # Publish Analysis Results (position after all tools ran) - - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@2 + - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3 displayName: 'Publish Security Analysis Logs' # The Post-Analysis build task will analyze the log files produced by the tools, and introduce a build break - - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@1 + - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2 displayName: 'Post Analysis' inputs: - AllTools: true + GdnBreakFast: true + GdnBreakAllTools: false + GdnBreakGdnToolCredScan: true + GdnBreakGdnToolBinSkim: true + GdnBreakGdnToolPoliCheck: true + GdnBreakGdnToolPoliCheckSeverity: Error From d6e04a92f8778565eb1d1452738d37c7faf3c47a Mon Sep 17 00:00:00 2001 From: neildsh <35383880+neildsh@users.noreply.github.com> Date: Thu, 2 Mar 2023 14:11:14 -0800 Subject: [PATCH 068/164] Query: Fixes System.ArgumentException when using PartitionKey.None on x86, Linux or in Optimistic Direct Execution (#3730) * Minor clean up of OptimisticDirectExecutionQueryTests * More minor cleanup in OptimisticDirectExecutionQueryTests * Add emulator tests for the bypass query parsing scenario * Handle PartitionKey.None while creating QueryIterator. This is a workaround for the PartitionKeyInternal.None not following its own contract * Fix up to correctly handle PartitionKey.None using the CachedContainerQueryProperties * Add more tests where PartitionKey.None maps to PartitionKey.Undefined --------- Co-authored-by: Matias Quaranta --- .../CosmosQueryExecutionContextFactory.cs | 4 +- .../src/Query/v3Query/QueryIterator.cs | 6 +- .../Query/BypassQueryParsingTests.cs | 64 ++++ .../OptimisticDirectExecutionQueryTests.cs | 298 ++++++++++++++---- 4 files changed, 303 insertions(+), 69 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index a7f7f17934..744d98bf44 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -214,7 +214,7 @@ private static async Task> TryCreateCoreContextAsy List targetRanges = await cosmosQueryContext.QueryClient.GetTargetPartitionKeyRangesByEpkStringAsync( cosmosQueryContext.ResourceLink, containerQueryProperties.ResourceId, - inputParameters.PartitionKey.Value.InternalKey.GetEffectivePartitionKeyString(partitionKeyDefinition), + containerQueryProperties.EffectivePartitionKeyString, forceRefresh: false, createQueryPipelineTrace); @@ -779,7 +779,7 @@ private static Documents.PartitionKeyDefinition GetPartitionKeyDefinition(InputP targetRanges = await cosmosQueryContext.QueryClient.GetTargetPartitionKeyRangesByEpkStringAsync( cosmosQueryContext.ResourceLink, containerQueryProperties.ResourceId, - inputParameters.PartitionKey.Value.InternalKey.GetEffectivePartitionKeyString(partitionKeyDefinition), + containerQueryProperties.EffectivePartitionKeyString, forceRefresh: false, trace); } diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs index a820a0a49a..7dfcea9818 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/QueryIterator.cs @@ -129,9 +129,9 @@ public static QueryIterator Create( default: throw new ArgumentOutOfRangeException($"Unknown {nameof(ExecutionEnvironment)}: {queryRequestOptions.ExecutionEnvironment.Value}."); - } - - CosmosQueryExecutionContextFactory.InputParameters inputParameters = new CosmosQueryExecutionContextFactory.InputParameters( + } + + CosmosQueryExecutionContextFactory.InputParameters inputParameters = new CosmosQueryExecutionContextFactory.InputParameters( sqlQuerySpec: sqlQuerySpec, initialUserContinuationToken: requestContinuationToken, initialFeedRange: feedRangeInternal, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs new file mode 100644 index 0000000000..a0c821c72d --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs @@ -0,0 +1,64 @@ +namespace Microsoft.Azure.Cosmos.EmulatorTests.Query +{ + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.CosmosElements; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + [TestCategory("Query")] + public sealed class BypassQueryParsingTests : QueryTestsBase + { + [TestMethod] + public async Task TestBypassQueryParsingWithNonePartitionKey() + { + int documentCount = 400; + QueryRequestOptions feedOptions = new QueryRequestOptions { PartitionKey = PartitionKey.None }; + string query = "SELECT VALUE r.numberField FROM r"; + IReadOnlyList expected = Enumerable.Range(0, documentCount).ToList(); + + async Task ImplementationAsync(Container container, IReadOnlyList documents) + { + ContainerInternal containerCore = container as ContainerInlineCore; + + MockCosmosQueryClient cosmosQueryClientCore = new MockCosmosQueryClient( + containerCore.ClientContext, + containerCore, + forceQueryPlanGatewayElseServiceInterop: true); + + ContainerInternal containerWithBypassParsing = new ContainerInlineCore( + containerCore.ClientContext, + (DatabaseCore)containerCore.Database, + containerCore.Id, + cosmosQueryClientCore); + + List items = await RunQueryAsync(containerWithBypassParsing, query, feedOptions); + int[] actual = items.Cast().Select(x => (int)Number64.ToLong(x.Value)).ToArray(); + + Assert.IsTrue(expected.SequenceEqual(actual)); + } + + IReadOnlyList documents = CreateDocuments(documentCount); + + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct | ConnectionModes.Gateway, + CollectionTypes.NonPartitioned | CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + documents, + ImplementationAsync, + "/undefinedPartitionKey"); + } + + private static IReadOnlyList CreateDocuments(int documentCount) + { + List documents = new List(documentCount); + for (int i = 0; i < documentCount; ++i) + { + string document = $@"{{ ""numberField"": {i}, ""nullField"": null }}"; + documents.Add(document); + } + + return documents; + } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs index 751c21b64b..cc9ef91733 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs @@ -7,91 +7,270 @@ using System.Threading.Tasks; using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.Query.Core; - using Microsoft.Azure.Documents; using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] [TestCategory("Query")] public sealed class OptimisticDirectExecutionQueryTests : QueryTestsBase - { + { + private const int NumberOfDocuments = 8; + private const string PartitionKeyField = "key"; + private const string NumberField = "numberField"; + private const string NullField = "nullField"; + private static class PageSizeOptions { public static readonly int[] NonGroupByPageSizeOptions = { -1, 1, 2, 10, 100 }; - public static readonly int[] GroupByPageSizeOptions = { -1 }; + public static readonly int[] GroupByPageSizeOptions = { -1 }; + public static readonly int[] PageSize100 = { 100 }; } [TestMethod] public async Task TestPassingOptimisticDirectExecutionQueries() - { - int numberOfDocuments = 8; - string partitionKey = "key"; - string numberField = "numberField"; - string nullField = "nullField"; - - List documents = CreateDocuments(numberOfDocuments, partitionKey, numberField, nullField); + { + IReadOnlyList empty = new List(0); + IReadOnlyList first5Integers = Enumerable.Range(0, 5).ToList(); + IReadOnlyList first7Integers = Enumerable.Range(0, NumberOfDocuments).ToList(); + IReadOnlyList first7IntegersReversed = Enumerable.Range(0, NumberOfDocuments).Reverse().ToList(); + PartitionKey partitionKeyValue = new PartitionKey("/value"); List singlePartitionContainerTestCases = new List() { // Tests for bool enableOptimisticDirectExecution - CreateInput( query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{partitionKey}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{partitionKey}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: false, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{PartitionKeyField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{PartitionKeyField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: false, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Passthrough), // Simple query - CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: null, partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), // DISTINCT with ORDER BY - CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: null, partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), // TOP with GROUP BY - CreateInput( query: $"SELECT TOP 5 VALUE r.{numberField} FROM r GROUP BY r.{numberField}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT TOP 5 VALUE r.{numberField} FROM r GROUP BY r.{numberField}", expectedResult: new List { 0, 1, 2, 3, 4 }, partitionKey: null, partition: CollectionTypes.SinglePartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r GROUP BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r GROUP BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), // OFFSET LIMIT with WHERE and BETWEEN - CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: "/value", partition: CollectionTypes.SinglePartition, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, enableOptimisticDirectExecution: true, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: null, partition: CollectionTypes.SinglePartition, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, enableOptimisticDirectExecution: true, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution) + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: partitionKeyValue, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + enableOptimisticDirectExecution: true, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: null, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + enableOptimisticDirectExecution: true, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution) }; List multiPartitionContainerTestCases = new List() { // Simple query - CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: "/value", partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: new List { 0, 1, 2, 3, 4, 5, 6, 7 }, partitionKey: null, partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Passthrough), // DISTINCT with ORDER BY - CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: "/value", partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT DISTINCT VALUE r.{numberField} FROM r ORDER BY r.{numberField} DESC", expectedResult: new List { 7, 6, 5, 4, 3, 2, 1, 0 }, partitionKey: null, partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), // OFFSET LIMIT with WHERE and BETWEEN - CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: "/value", partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{numberField} BETWEEN 0 AND {numberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: null, partition: CollectionTypes.MultiPartition, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Specialized) - }; + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized) + }; + + IReadOnlyList documents = CreateDocuments(NumberOfDocuments, PartitionKeyField, NumberField, NullField); await this.CreateIngestQueryDeleteAsync( ConnectionModes.Direct | ConnectionModes.Gateway, CollectionTypes.SinglePartition, documents, - (container, documents) => RunPassingTests(singlePartitionContainerTestCases, container), - "/" + partitionKey); + (container, documents) => RunTests(singlePartitionContainerTestCases, container), + "/" + PartitionKeyField); await this.CreateIngestQueryDeleteAsync( ConnectionModes.Direct | ConnectionModes.Gateway, CollectionTypes.MultiPartition, documents, - (container, documents) => RunPassingTests(multiPartitionContainerTestCases, container), - "/" + partitionKey); + (container, documents) => RunTests(multiPartitionContainerTestCases, container), + "/" + PartitionKeyField); + } + + [TestMethod] + public async Task TestQueriesWithPartitionKeyNone() + { + int documentCount = 400; + IReadOnlyList first400Integers = Enumerable.Range(0, documentCount).ToList(); + IReadOnlyList first400IntegersReversed = Enumerable.Range(0, documentCount).Reverse().ToList(); + + IReadOnlyList testCases = new List + { + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first400Integers, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: false, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} ASC", + expectedResult: first400Integers, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: false, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first400IntegersReversed, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: false, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: false, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first400Integers, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} ASC", + expectedResult: first400Integers, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first400IntegersReversed, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: PartitionKey.None, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.PageSize100, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + }; + + List documents = new List(documentCount); + for (int i = 0; i < documentCount; ++i) + { + string document = $@"{{ {NumberField}: {i}, {NullField}: null }}"; + documents.Add(document); + } + + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct | ConnectionModes.Gateway, + CollectionTypes.NonPartitioned | CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + documents, + (container, documents) => RunTests(testCases, container), + "/undefinedPartitionKey"); } [TestMethod] public async Task TestFailingOptimisticDirectExecutionOutput() { - int numberOfDocuments = 8; - string partitionKey = "key"; - string numberField = "numberField"; - string nullField = "nullField"; - - List documents = CreateDocuments(numberOfDocuments, partitionKey, numberField, nullField); + IReadOnlyList documents = CreateDocuments(NumberOfDocuments, PartitionKeyField, NumberField, NullField); // check if bad continuation queries and syntax error queries are handled by pipeline IDictionary invalidQueries = new Dictionary @@ -106,10 +285,10 @@ await this.CreateIngestQueryDeleteAsync( CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, documents, (container, documents) => RunFailingTests(container, invalidQueries), - "/" + partitionKey); + "/" + PartitionKeyField); } - private static async Task RunPassingTests(IEnumerable testCases, Container container) + private static async Task RunTests(IEnumerable testCases, Container container) { foreach (DirectExecutionTestCase testCase in testCases) { @@ -118,9 +297,7 @@ private static async Task RunPassingTests(IEnumerable t QueryRequestOptions feedOptions = new QueryRequestOptions { MaxItemCount = pageSize, - PartitionKey = testCase.PartitionKey == null - ? null - : new Cosmos.PartitionKey(testCase.PartitionKey), + PartitionKey = testCase.PartitionKey, EnableOptimisticDirectExecution = testCase.EnableOptimisticDirectExecution, TestSettings = new TestInjections(simulate429s: false, simulateEmptyPages: false, new TestInjections.ResponseStats()) }; @@ -130,7 +307,7 @@ private static async Task RunPassingTests(IEnumerable t testCase.Query, feedOptions); - long[] actual = items.Cast().Select(x => Number64.ToLong(x.Value)).ToArray(); + int[] actual = items.Cast().Select(x => (int)Number64.ToLong(x.Value)).ToArray(); Assert.IsTrue(testCase.ExpectedResult.SequenceEqual(actual)); Assert.AreEqual(testCase.ExpectedPipelineType, feedOptions.TestSettings.Stats.PipelineType.Value); @@ -151,7 +328,7 @@ private static async Task RunFailingTests(Container container, IDictionary( + await container.GetItemQueryIterator( queryDefinition: new QueryDefinition(queryAndResult.Key), continuationToken: queryAndResult.Value, requestOptions: feedOptions).ReadNextAsync(); @@ -169,16 +346,13 @@ await container.GetItemQueryIterator( } } - private static List CreateDocuments(int documentCount, string partitionKey, string numberField, string nullField) + private static IReadOnlyList CreateDocuments(int documentCount, string partitionKey, string numberField, string nullField) { List documents = new List(documentCount); for (int i = 0; i < documentCount; ++i) { - Document doc = new Document(); - doc.SetPropertyValue(partitionKey, "/value"); - doc.SetPropertyValue(numberField, i % documentCount); - doc.SetPropertyValue(nullField, null); - documents.Add(doc.ToString()); + string document = $@"{{ {partitionKey}: ""/value"", {numberField}: {i}, {nullField}: null }}"; + documents.Add(document); } return documents; @@ -186,31 +360,28 @@ private static List CreateDocuments(int documentCount, string partitionK private static DirectExecutionTestCase CreateInput( string query, - List expectedResult, - string partitionKey, - CollectionTypes partition, + IReadOnlyList expectedResult, + PartitionKey? partitionKey, bool enableOptimisticDirectExecution, int[] pageSizeOptions, TestInjections.PipelineType expectedPipelineType) { - return new DirectExecutionTestCase(query, expectedResult, partitionKey, partition, enableOptimisticDirectExecution, pageSizeOptions, expectedPipelineType); - } - - internal readonly struct DirectExecutionTestCase + return new DirectExecutionTestCase(query, expectedResult, partitionKey, enableOptimisticDirectExecution, pageSizeOptions, expectedPipelineType); + } + + private readonly struct DirectExecutionTestCase { public string Query { get; } - public List ExpectedResult { get; } - public string PartitionKey { get; } - public CollectionTypes Partition { get; } + public IReadOnlyList ExpectedResult { get; } + public PartitionKey? PartitionKey { get; } public bool EnableOptimisticDirectExecution { get; } public int[] PageSizeOptions { get; } public TestInjections.PipelineType ExpectedPipelineType { get; } public DirectExecutionTestCase( string query, - List expectedResult, - string partitionKey, - CollectionTypes partition, + IReadOnlyList expectedResult, + PartitionKey? partitionKey, bool enableOptimisticDirectExecution, int[] pageSizeOptions, TestInjections.PipelineType expectedPipelineType) @@ -218,7 +389,6 @@ public DirectExecutionTestCase( this.Query = query; this.ExpectedResult = expectedResult; this.PartitionKey = partitionKey; - this.Partition = partition; this.EnableOptimisticDirectExecution = enableOptimisticDirectExecution; this.PageSizeOptions = pageSizeOptions; this.ExpectedPipelineType = expectedPipelineType; From f262f8941f541332509eba64a2297e9d5e221675 Mon Sep 17 00:00:00 2001 From: Ezra Haleva <115735172+ezrahaleva-msft@users.noreply.github.com> Date: Mon, 6 Mar 2023 10:50:04 -0800 Subject: [PATCH 069/164] Query: Adds FIRST and LAST Scalar Expressions (#3629) * Add FIRST and LAST objects and update visitors * add FIRST LAST evaluation and update offline engine visitors * Add FIRST and LAST to parser * update another visitor * Fix typo * fix typo * added new tests and baselines * cleaning * cleaning --------- Co-authored-by: neildsh <35383880+neildsh@users.noreply.github.com> Co-authored-by: Matias Quaranta --- .../src/Query/Core/Parser/CstToAstVisitor.cs | 20 + .../src/Query/Core/Parser/IsqlListener.cs | 24 + .../src/Query/Core/Parser/IsqlVisitor.cs | 14 + .../src/Query/Core/Parser/sql.g4 | 6 + .../src/Query/Core/Parser/sqlBaseListener.cs | 28 + .../src/Query/Core/Parser/sqlBaseVisitor.cs | 22 + .../src/Query/Core/Parser/sqlLexer.cs | 978 +++++++++--------- .../src/Query/Core/Parser/sqlParser.cs | 579 ++++++----- .../CosmosQueryExecutionContextFactory.cs | 12 + .../SqlObjects/SqlFirstScalarExpression.cs | 40 + .../src/SqlObjects/SqlLastScalarExpression.cs | 40 + .../Visitors/SqlObjectEqualityVisitor.cs | 30 + .../SqlObjects/Visitors/SqlObjectHasher.cs | 16 + .../Visitors/SqlObjectObfuscator.cs | 12 +- .../Visitors/SqlObjectTextSerializer.cs | 16 + .../SqlObjects/Visitors/SqlObjectVisitor.cs | 2 + .../SqlObjectVisitor{TArg,TOutput}.cs | 2 + .../Visitors/SqlObjectVisitor{TResult}.cs | 2 + .../Visitors/SqlScalarExpressionVisitor.cs | 2 + ...qlScalarExpressionVisitor{TArg,TOutput}.cs | 2 + .../SqlScalarExpressionVisitor{TResult}.cs | 2 + ...teSubquerySqlParserBaselineTests.First.xml | 92 ++ ...ateSubquerySqlParserBaselineTests.Last.xml | 92 ++ ...ExpressionSqlParserBaselineTests.First.xml | 47 + ...rExpressionSqlParserBaselineTests.Last.xml | 47 + .../Microsoft.Azure.Cosmos.Tests.csproj | 30 +- .../AggregateProjectionDector.cs | 12 + .../AggregateProjectionTransformer.cs | 12 + .../ScalarExpressionEvaluator.cs | 20 + .../Query/OfflineEngine/SqlInterpreter.cs | 10 + ...AggregateSubquerySqlParserBaselineTests.cs | 99 +- .../ScalarExpressionSqlParserBaselineTests.cs | 64 ++ 32 files changed, 1633 insertions(+), 741 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/SqlObjects/SqlFirstScalarExpression.cs create mode 100644 Microsoft.Azure.Cosmos/src/SqlObjects/SqlLastScalarExpression.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.First.xml create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.Last.xml create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.First.xml create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.Last.xml diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs index 448b8f4ca6..8ba6c4fc45 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs @@ -568,6 +568,16 @@ public override SqlObject VisitExistsScalarExpression([NotNull] sqlParser.Exists return SqlExistsScalarExpression.Create(subquery); } + public override SqlObject VisitFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context) + { + Contract.Requires(context != null); + // K_FIRST '(' sql_query ')' + Contract.Requires(context.ChildCount == 4); + + SqlQuery subquery = (SqlQuery)this.Visit(context.children[2]); + return SqlFirstScalarExpression.Create(subquery); + } + public override SqlObject VisitFunctionCallScalarExpression([NotNull] sqlParser.FunctionCallScalarExpressionContext context) { Contract.Requires(context != null); @@ -627,6 +637,16 @@ public override SqlObject VisitIn_scalar_expression([NotNull] sqlParser.In_scala return SqlInScalarExpression.Create(needle, not, searchList.ToImmutableArray()); } + public override SqlObject VisitLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context) + { + Contract.Requires(context != null); + // K_LAST '(' sql_query ')' + Contract.Requires(context.ChildCount == 4); + + SqlQuery subquery = (SqlQuery)this.Visit(context.children[2]); + return SqlLastScalarExpression.Create(subquery); + } + public override SqlObject VisitLike_scalar_expression([NotNull] sqlParser.Like_scalar_expressionContext context) { Contract.Requires(context != null); diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs index 24a4a0694a..9cde50fb6b 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlListener.cs @@ -562,6 +562,18 @@ internal interface IsqlListener : IParseTreeListener { /// The parse tree. void ExitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); /// + /// Enter a parse tree produced by the FirstScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + void EnterFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context); + /// + /// Exit a parse tree produced by the FirstScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + void ExitFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context); + /// /// Enter a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// @@ -670,6 +682,18 @@ internal interface IsqlListener : IParseTreeListener { /// The parse tree. void ExitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context); /// + /// Enter a parse tree produced by the LastScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + void EnterLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context); + /// + /// Exit a parse tree produced by the LastScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + void ExitLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context); + /// /// Enter a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs index e22a9d4218..b9bea8ca1d 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/IsqlVisitor.cs @@ -347,6 +347,13 @@ internal interface IsqlVisitor : IParseTreeVisitor { /// The visitor result. Result VisitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context); /// + /// Visit a parse tree produced by the FirstScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context); + /// /// Visit a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// @@ -410,6 +417,13 @@ internal interface IsqlVisitor : IParseTreeVisitor { /// The visitor result. Result VisitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context); /// + /// Visit a parse tree produced by the LastScalarExpression + /// labeled alternative in . + /// + /// The parse tree. + /// The visitor result. + Result VisitLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context); + /// /// Visit a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 index 42ac229557..2b0002a8ab 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sql.g4 @@ -173,6 +173,8 @@ primary_expression | K_EXISTS '(' sql_query ')' #ExistsScalarExpression | K_ARRAY '(' sql_query ')' #ArrayScalarExpression | K_ALL '(' sql_query ')' #AllScalarExpression + | K_FIRST '(' sql_query ')' #FirstScalarExpression + | K_LAST '(' sql_query ')' #LastScalarExpression | function_call_scalar_expression #FunctionCallScalarExpression ; @@ -191,6 +193,8 @@ object_property : STRING_LITERAL ':' scalar_expression ; identifier : LEX_IDENTIFIER | K_ALL + | K_FIRST + | K_LAST ; /*--------------------------------------------------------------------------------*/ @@ -208,11 +212,13 @@ K_DESC : D E S C; K_DISTINCT : D I S T I N C T; K_ESCAPE: E S C A P E; K_EXISTS : E X I S T S; +K_FIRST : F I R S T; K_FALSE : 'false'; K_FROM : F R O M; K_GROUP : G R O U P; K_IN : I N ; K_JOIN : J O I N; +K_LAST : L A S T; K_LEFT : L E F T; K_LIKE : L I K E; K_LIMIT : L I M I T; diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs index 18003391b1..62f2873d72 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseListener.cs @@ -666,6 +666,20 @@ public virtual void EnterObjectCreateScalarExpression([NotNull] sqlParser.Object /// The parse tree. public virtual void ExitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { } /// + /// Enter a parse tree produced by the FirstScalarExpression + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context) { } + /// + /// Exit a parse tree produced by the FirstScalarExpression + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context) { } + /// /// Enter a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// The default implementation does nothing. @@ -792,6 +806,20 @@ public virtual void EnterArrayScalarExpression([NotNull] sqlParser.ArrayScalarEx /// The parse tree. public virtual void ExitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context) { } /// + /// Enter a parse tree produced by the LastScalarExpression + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void EnterLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context) { } + /// + /// Exit a parse tree produced by the LastScalarExpression + /// labeled alternative in . + /// The default implementation does nothing. + /// + /// The parse tree. + public virtual void ExitLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context) { } + /// /// Enter a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// The default implementation does nothing. diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs index bb3b86379d..4594f5fc79 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlBaseVisitor.cs @@ -549,6 +549,17 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// The visitor result. public virtual Result VisitObjectCreateScalarExpression([NotNull] sqlParser.ObjectCreateScalarExpressionContext context) { return VisitChildren(context); } /// + /// Visit a parse tree produced by the FirstScalarExpression + /// labeled alternative in . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitFirstScalarExpression([NotNull] sqlParser.FirstScalarExpressionContext context) { return VisitChildren(context); } + /// /// Visit a parse tree produced by the ArrayCreateScalarExpression /// labeled alternative in . /// @@ -648,6 +659,17 @@ internal partial class sqlBaseVisitor : AbstractParseTreeVisitor /// The visitor result. public virtual Result VisitArrayScalarExpression([NotNull] sqlParser.ArrayScalarExpressionContext context) { return VisitChildren(context); } /// + /// Visit a parse tree produced by the LastScalarExpression + /// labeled alternative in . + /// + /// The default implementation returns the result of calling + /// on . + /// + /// + /// The parse tree. + /// The visitor result. + public virtual Result VisitLastScalarExpression([NotNull] sqlParser.LastScalarExpressionContext context) { return VisitChildren(context); } + /// /// Visit a parse tree produced by the PropertyRefScalarExpressionRecursive /// labeled alternative in . /// diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs index 1d5b7262bd..88888fea5d 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlLexer.cs @@ -37,11 +37,11 @@ public const int T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, T__24=25, T__25=26, T__26=27, K_ALL=28, K_AND=29, K_ARRAY=30, K_AS=31, K_ASC=32, K_BETWEEN=33, K_BY=34, K_DESC=35, K_DISTINCT=36, K_ESCAPE=37, - K_EXISTS=38, K_FALSE=39, K_FROM=40, K_GROUP=41, K_IN=42, K_JOIN=43, K_LEFT=44, - K_LIKE=45, K_LIMIT=46, K_NOT=47, K_NULL=48, K_OFFSET=49, K_OR=50, K_ORDER=51, - K_RIGHT=52, K_SELECT=53, K_TOP=54, K_TRUE=55, K_UDF=56, K_UNDEFINED=57, - K_VALUE=58, K_WHERE=59, WS=60, NUMERIC_LITERAL=61, STRING_LITERAL=62, - LEX_IDENTIFIER=63, PARAMETER=64; + K_EXISTS=38, K_FIRST=39, K_FALSE=40, K_FROM=41, K_GROUP=42, K_IN=43, K_JOIN=44, + K_LAST=45, K_LEFT=46, K_LIKE=47, K_LIMIT=48, K_NOT=49, K_NULL=50, K_OFFSET=51, + K_OR=52, K_ORDER=53, K_RIGHT=54, K_SELECT=55, K_TOP=56, K_TRUE=57, K_UDF=58, + K_UNDEFINED=59, K_VALUE=60, K_WHERE=61, WS=62, NUMERIC_LITERAL=63, STRING_LITERAL=64, + LEX_IDENTIFIER=65, PARAMETER=66; public static string[] channelNames = { "DEFAULT_TOKEN_CHANNEL", "HIDDEN" }; @@ -55,11 +55,11 @@ public const int "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", "T__25", "T__26", "K_ALL", "K_AND", "K_ARRAY", "K_AS", "K_ASC", "K_BETWEEN", - "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", "K_FROM", - "K_GROUP", "K_IN", "K_JOIN", "K_LEFT", "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", - "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", "K_TOP", "K_TRUE", - "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", "NUMERIC_LITERAL", - "STRING_LITERAL", "ESC", "UNICODE", "HEX", "SAFECODEPOINTWITHSINGLEQUOTATION", + "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FIRST", "K_FALSE", + "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LAST", "K_LEFT", "K_LIKE", "K_LIMIT", + "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", + "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", + "NUMERIC_LITERAL", "STRING_LITERAL", "ESC", "UNICODE", "HEX", "SAFECODEPOINTWITHSINGLEQUOTATION", "SAFECODEPOINTWITHDOUBLEQUOTATION", "LEX_IDENTIFIER", "PARAMETER", "DIGIT", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z" @@ -79,19 +79,20 @@ public sqlLexer(ICharStream input, TextWriter output, TextWriter errorOutput) null, "'*'", "','", "'('", "')'", "'.'", "'['", "']'", "'?'", "':'", "'??'", "'/'", "'%'", "'+'", "'-'", "'<'", "'>'", "'>='", "'<='", "'='", "'!='", "'&'", "'^'", "'|'", "'||'", "'~'", "'{'", "'}'", null, null, null, null, - null, null, null, null, null, null, null, "'false'", null, null, null, - null, null, null, null, null, "'null'", null, null, null, null, null, - null, "'true'", "'udf'", "'undefined'" + null, null, null, null, null, null, null, null, "'false'", null, null, + null, null, null, null, null, null, null, "'null'", null, null, null, + null, null, null, "'true'", "'udf'", "'undefined'" }; private static readonly string[] _SymbolicNames = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "K_ALL", "K_AND", "K_ARRAY", "K_AS", "K_ASC", - "K_BETWEEN", "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", - "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LEFT", "K_LIKE", "K_LIMIT", - "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", - "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", - "NUMERIC_LITERAL", "STRING_LITERAL", "LEX_IDENTIFIER", "PARAMETER" + "K_BETWEEN", "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FIRST", + "K_FALSE", "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LAST", "K_LEFT", + "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", + "K_RIGHT", "K_SELECT", "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", + "K_WHERE", "WS", "NUMERIC_LITERAL", "STRING_LITERAL", "LEX_IDENTIFIER", + "PARAMETER" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -122,7 +123,7 @@ static sqlLexer() { } private static char[] _serializedATN = { '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786', - '\x5964', '\x2', '\x42', '\x24E', '\b', '\x1', '\x4', '\x2', '\t', '\x2', + '\x5964', '\x2', '\x44', '\x25D', '\b', '\x1', '\x4', '\x2', '\t', '\x2', '\x4', '\x3', '\t', '\x3', '\x4', '\x4', '\t', '\x4', '\x4', '\x5', '\t', '\x5', '\x4', '\x6', '\t', '\x6', '\x4', '\a', '\t', '\a', '\x4', '\b', '\t', '\b', '\x4', '\t', '\t', '\t', '\x4', '\n', '\t', '\n', '\x4', '\v', @@ -156,469 +157,482 @@ static sqlLexer() { 'X', '\x4', 'Y', '\t', 'Y', '\x4', 'Z', '\t', 'Z', '\x4', '[', '\t', '[', '\x4', '\\', '\t', '\\', '\x4', ']', '\t', ']', '\x4', '^', '\t', '^', '\x4', '_', '\t', '_', '\x4', '`', '\t', '`', '\x4', '\x61', '\t', '\x61', - '\x3', '\x2', '\x3', '\x2', '\x3', '\x3', '\x3', '\x3', '\x3', '\x4', - '\x3', '\x4', '\x3', '\x5', '\x3', '\x5', '\x3', '\x6', '\x3', '\x6', - '\x3', '\a', '\x3', '\a', '\x3', '\b', '\x3', '\b', '\x3', '\t', '\x3', - '\t', '\x3', '\n', '\x3', '\n', '\x3', '\v', '\x3', '\v', '\x3', '\v', - '\x3', '\f', '\x3', '\f', '\x3', '\r', '\x3', '\r', '\x3', '\xE', '\x3', - '\xE', '\x3', '\xF', '\x3', '\xF', '\x3', '\x10', '\x3', '\x10', '\x3', - '\x11', '\x3', '\x11', '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', - '\x13', '\x3', '\x13', '\x3', '\x13', '\x3', '\x14', '\x3', '\x14', '\x3', - '\x15', '\x3', '\x15', '\x3', '\x15', '\x3', '\x16', '\x3', '\x16', '\x3', - '\x17', '\x3', '\x17', '\x3', '\x18', '\x3', '\x18', '\x3', '\x19', '\x3', - '\x19', '\x3', '\x19', '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1B', '\x3', - '\x1B', '\x3', '\x1C', '\x3', '\x1C', '\x3', '\x1D', '\x3', '\x1D', '\x3', - '\x1D', '\x3', '\x1D', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', - '\x1E', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3', - '\x1F', '\x3', '\x1F', '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', '!', - '\x3', '!', '\x3', '!', '\x3', '!', '\x3', '\"', '\x3', '\"', '\x3', '\"', - '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', - '#', '\x3', '#', '\x3', '#', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', - '$', '\x3', '$', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', - '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '&', '\x3', - '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', - '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', - '\x3', '\'', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', - '\x3', '(', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', - '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', - '\x3', '+', '\x3', '+', '\x3', '+', '\x3', ',', '\x3', ',', '\x3', ',', - '\x3', ',', '\x3', ',', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', - '\x3', '-', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', - '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', - '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x31', - '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x32', - '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', - '\x3', '\x32', '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x34', - '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', - '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', - '\x3', '\x35', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', - '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x37', '\x3', '\x37', - '\x3', '\x37', '\x3', '\x37', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', - '\x3', '\x38', '\x3', '\x38', '\x3', '\x39', '\x3', '\x39', '\x3', '\x39', - '\x3', '\x39', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', - ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', - ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', - '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', - '=', '\x6', '=', '\x1AE', '\n', '=', '\r', '=', '\xE', '=', '\x1AF', '\x3', - '=', '\x3', '=', '\x3', '>', '\x5', '>', '\x1B5', '\n', '>', '\x3', '>', - '\x6', '>', '\x1B8', '\n', '>', '\r', '>', '\xE', '>', '\x1B9', '\x3', - '>', '\x3', '>', '\a', '>', '\x1BE', '\n', '>', '\f', '>', '\xE', '>', - '\x1C1', '\v', '>', '\x5', '>', '\x1C3', '\n', '>', '\x3', '>', '\x3', - '>', '\x5', '>', '\x1C7', '\n', '>', '\x3', '>', '\x6', '>', '\x1CA', - '\n', '>', '\r', '>', '\xE', '>', '\x1CB', '\x5', '>', '\x1CE', '\n', - '>', '\x3', '>', '\x5', '>', '\x1D1', '\n', '>', '\x3', '>', '\x3', '>', - '\x6', '>', '\x1D5', '\n', '>', '\r', '>', '\xE', '>', '\x1D6', '\x3', - '>', '\x3', '>', '\x5', '>', '\x1DB', '\n', '>', '\x3', '>', '\x6', '>', - '\x1DE', '\n', '>', '\r', '>', '\xE', '>', '\x1DF', '\x5', '>', '\x1E2', - '\n', '>', '\x5', '>', '\x1E4', '\n', '>', '\x3', '?', '\x3', '?', '\x3', - '?', '\a', '?', '\x1E9', '\n', '?', '\f', '?', '\xE', '?', '\x1EC', '\v', - '?', '\x3', '?', '\x3', '?', '\x3', '?', '\x3', '?', '\a', '?', '\x1F2', - '\n', '?', '\f', '?', '\xE', '?', '\x1F5', '\v', '?', '\x3', '?', '\x5', - '?', '\x1F8', '\n', '?', '\x3', '@', '\x3', '@', '\x3', '@', '\x5', '@', - '\x1FD', '\n', '@', '\x3', '\x41', '\x3', '\x41', '\x3', '\x41', '\x3', - '\x41', '\x3', '\x41', '\x3', '\x41', '\x3', '\x42', '\x3', '\x42', '\x3', - '\x43', '\x3', '\x43', '\x3', '\x44', '\x3', '\x44', '\x3', '\x45', '\x3', - '\x45', '\x3', '\x45', '\x3', '\x45', '\a', '\x45', '\x20F', '\n', '\x45', - '\f', '\x45', '\xE', '\x45', '\x212', '\v', '\x45', '\x5', '\x45', '\x214', - '\n', '\x45', '\x3', '\x46', '\x3', '\x46', '\x3', '\x46', '\x3', 'G', - '\x3', 'G', '\x3', 'H', '\x3', 'H', '\x3', 'I', '\x3', 'I', '\x3', 'J', - '\x3', 'J', '\x3', 'K', '\x3', 'K', '\x3', 'L', '\x3', 'L', '\x3', 'M', - '\x3', 'M', '\x3', 'N', '\x3', 'N', '\x3', 'O', '\x3', 'O', '\x3', 'P', - '\x3', 'P', '\x3', 'Q', '\x3', 'Q', '\x3', 'R', '\x3', 'R', '\x3', 'S', - '\x3', 'S', '\x3', 'T', '\x3', 'T', '\x3', 'U', '\x3', 'U', '\x3', 'V', - '\x3', 'V', '\x3', 'W', '\x3', 'W', '\x3', 'X', '\x3', 'X', '\x3', 'Y', - '\x3', 'Y', '\x3', 'Z', '\x3', 'Z', '\x3', '[', '\x3', '[', '\x3', '\\', - '\x3', '\\', '\x3', ']', '\x3', ']', '\x3', '^', '\x3', '^', '\x3', '_', - '\x3', '_', '\x3', '`', '\x3', '`', '\x3', '\x61', '\x3', '\x61', '\x2', - '\x2', '\x62', '\x3', '\x3', '\x5', '\x4', '\a', '\x5', '\t', '\x6', '\v', - '\a', '\r', '\b', '\xF', '\t', '\x11', '\n', '\x13', '\v', '\x15', '\f', - '\x17', '\r', '\x19', '\xE', '\x1B', '\xF', '\x1D', '\x10', '\x1F', '\x11', - '!', '\x12', '#', '\x13', '%', '\x14', '\'', '\x15', ')', '\x16', '+', - '\x17', '-', '\x18', '/', '\x19', '\x31', '\x1A', '\x33', '\x1B', '\x35', - '\x1C', '\x37', '\x1D', '\x39', '\x1E', ';', '\x1F', '=', ' ', '?', '!', - '\x41', '\"', '\x43', '#', '\x45', '$', 'G', '%', 'I', '&', 'K', '\'', - 'M', '(', 'O', ')', 'Q', '*', 'S', '+', 'U', ',', 'W', '-', 'Y', '.', - '[', '/', ']', '\x30', '_', '\x31', '\x61', '\x32', '\x63', '\x33', '\x65', - '\x34', 'g', '\x35', 'i', '\x36', 'k', '\x37', 'm', '\x38', 'o', '\x39', - 'q', ':', 's', ';', 'u', '<', 'w', '=', 'y', '>', '{', '?', '}', '@', - '\x7F', '\x2', '\x81', '\x2', '\x83', '\x2', '\x85', '\x2', '\x87', '\x2', - '\x89', '\x41', '\x8B', '\x42', '\x8D', '\x2', '\x8F', '\x2', '\x91', - '\x2', '\x93', '\x2', '\x95', '\x2', '\x97', '\x2', '\x99', '\x2', '\x9B', - '\x2', '\x9D', '\x2', '\x9F', '\x2', '\xA1', '\x2', '\xA3', '\x2', '\xA5', - '\x2', '\xA7', '\x2', '\xA9', '\x2', '\xAB', '\x2', '\xAD', '\x2', '\xAF', - '\x2', '\xB1', '\x2', '\xB3', '\x2', '\xB5', '\x2', '\xB7', '\x2', '\xB9', - '\x2', '\xBB', '\x2', '\xBD', '\x2', '\xBF', '\x2', '\xC1', '\x2', '\x3', - '\x2', '$', '\x5', '\x2', '\v', '\f', '\xF', '\xF', '\"', '\"', '\x4', - '\x2', '-', '-', '/', '/', '\n', '\x2', '$', '$', '\x31', '\x31', '^', - '^', '\x64', '\x64', 'h', 'h', 'p', 'p', 't', 't', 'v', 'v', '\x5', '\x2', - '\x32', ';', '\x43', 'H', '\x63', 'h', '\x5', '\x2', '\x2', '!', ')', - ')', '^', '^', '\x5', '\x2', '\x2', '!', '$', '$', '^', '^', '\x5', '\x2', - '\x43', '\\', '\x61', '\x61', '\x63', '|', '\x3', '\x2', '\x32', ';', - '\x4', '\x2', '\x43', '\x43', '\x63', '\x63', '\x4', '\x2', '\x44', '\x44', - '\x64', '\x64', '\x4', '\x2', '\x45', '\x45', '\x65', '\x65', '\x4', '\x2', - '\x46', '\x46', '\x66', '\x66', '\x4', '\x2', 'G', 'G', 'g', 'g', '\x4', - '\x2', 'H', 'H', 'h', 'h', '\x4', '\x2', 'I', 'I', 'i', 'i', '\x4', '\x2', - 'J', 'J', 'j', 'j', '\x4', '\x2', 'K', 'K', 'k', 'k', '\x4', '\x2', 'L', - 'L', 'l', 'l', '\x4', '\x2', 'M', 'M', 'm', 'm', '\x4', '\x2', 'N', 'N', - 'n', 'n', '\x4', '\x2', 'O', 'O', 'o', 'o', '\x4', '\x2', 'P', 'P', 'p', - 'p', '\x4', '\x2', 'Q', 'Q', 'q', 'q', '\x4', '\x2', 'R', 'R', 'r', 'r', - '\x4', '\x2', 'S', 'S', 's', 's', '\x4', '\x2', 'T', 'T', 't', 't', '\x4', - '\x2', 'U', 'U', 'u', 'u', '\x4', '\x2', 'V', 'V', 'v', 'v', '\x4', '\x2', - 'W', 'W', 'w', 'w', '\x4', '\x2', 'X', 'X', 'x', 'x', '\x4', '\x2', 'Y', - 'Y', 'y', 'y', '\x4', '\x2', 'Z', 'Z', 'z', 'z', '\x4', '\x2', '[', '[', - '{', '{', '\x4', '\x2', '\\', '\\', '|', '|', '\x2', '\x244', '\x2', '\x3', - '\x3', '\x2', '\x2', '\x2', '\x2', '\x5', '\x3', '\x2', '\x2', '\x2', - '\x2', '\a', '\x3', '\x2', '\x2', '\x2', '\x2', '\t', '\x3', '\x2', '\x2', - '\x2', '\x2', '\v', '\x3', '\x2', '\x2', '\x2', '\x2', '\r', '\x3', '\x2', - '\x2', '\x2', '\x2', '\xF', '\x3', '\x2', '\x2', '\x2', '\x2', '\x11', - '\x3', '\x2', '\x2', '\x2', '\x2', '\x13', '\x3', '\x2', '\x2', '\x2', - '\x2', '\x15', '\x3', '\x2', '\x2', '\x2', '\x2', '\x17', '\x3', '\x2', - '\x2', '\x2', '\x2', '\x19', '\x3', '\x2', '\x2', '\x2', '\x2', '\x1B', - '\x3', '\x2', '\x2', '\x2', '\x2', '\x1D', '\x3', '\x2', '\x2', '\x2', - '\x2', '\x1F', '\x3', '\x2', '\x2', '\x2', '\x2', '!', '\x3', '\x2', '\x2', - '\x2', '\x2', '#', '\x3', '\x2', '\x2', '\x2', '\x2', '%', '\x3', '\x2', - '\x2', '\x2', '\x2', '\'', '\x3', '\x2', '\x2', '\x2', '\x2', ')', '\x3', - '\x2', '\x2', '\x2', '\x2', '+', '\x3', '\x2', '\x2', '\x2', '\x2', '-', - '\x3', '\x2', '\x2', '\x2', '\x2', '/', '\x3', '\x2', '\x2', '\x2', '\x2', - '\x31', '\x3', '\x2', '\x2', '\x2', '\x2', '\x33', '\x3', '\x2', '\x2', - '\x2', '\x2', '\x35', '\x3', '\x2', '\x2', '\x2', '\x2', '\x37', '\x3', - '\x2', '\x2', '\x2', '\x2', '\x39', '\x3', '\x2', '\x2', '\x2', '\x2', - ';', '\x3', '\x2', '\x2', '\x2', '\x2', '=', '\x3', '\x2', '\x2', '\x2', - '\x2', '?', '\x3', '\x2', '\x2', '\x2', '\x2', '\x41', '\x3', '\x2', '\x2', - '\x2', '\x2', '\x43', '\x3', '\x2', '\x2', '\x2', '\x2', '\x45', '\x3', - '\x2', '\x2', '\x2', '\x2', 'G', '\x3', '\x2', '\x2', '\x2', '\x2', 'I', - '\x3', '\x2', '\x2', '\x2', '\x2', 'K', '\x3', '\x2', '\x2', '\x2', '\x2', - 'M', '\x3', '\x2', '\x2', '\x2', '\x2', 'O', '\x3', '\x2', '\x2', '\x2', - '\x2', 'Q', '\x3', '\x2', '\x2', '\x2', '\x2', 'S', '\x3', '\x2', '\x2', - '\x2', '\x2', 'U', '\x3', '\x2', '\x2', '\x2', '\x2', 'W', '\x3', '\x2', - '\x2', '\x2', '\x2', 'Y', '\x3', '\x2', '\x2', '\x2', '\x2', '[', '\x3', - '\x2', '\x2', '\x2', '\x2', ']', '\x3', '\x2', '\x2', '\x2', '\x2', '_', - '\x3', '\x2', '\x2', '\x2', '\x2', '\x61', '\x3', '\x2', '\x2', '\x2', - '\x2', '\x63', '\x3', '\x2', '\x2', '\x2', '\x2', '\x65', '\x3', '\x2', - '\x2', '\x2', '\x2', 'g', '\x3', '\x2', '\x2', '\x2', '\x2', 'i', '\x3', - '\x2', '\x2', '\x2', '\x2', 'k', '\x3', '\x2', '\x2', '\x2', '\x2', 'm', - '\x3', '\x2', '\x2', '\x2', '\x2', 'o', '\x3', '\x2', '\x2', '\x2', '\x2', - 'q', '\x3', '\x2', '\x2', '\x2', '\x2', 's', '\x3', '\x2', '\x2', '\x2', - '\x2', 'u', '\x3', '\x2', '\x2', '\x2', '\x2', 'w', '\x3', '\x2', '\x2', - '\x2', '\x2', 'y', '\x3', '\x2', '\x2', '\x2', '\x2', '{', '\x3', '\x2', - '\x2', '\x2', '\x2', '}', '\x3', '\x2', '\x2', '\x2', '\x2', '\x89', '\x3', - '\x2', '\x2', '\x2', '\x2', '\x8B', '\x3', '\x2', '\x2', '\x2', '\x3', - '\xC3', '\x3', '\x2', '\x2', '\x2', '\x5', '\xC5', '\x3', '\x2', '\x2', - '\x2', '\a', '\xC7', '\x3', '\x2', '\x2', '\x2', '\t', '\xC9', '\x3', - '\x2', '\x2', '\x2', '\v', '\xCB', '\x3', '\x2', '\x2', '\x2', '\r', '\xCD', - '\x3', '\x2', '\x2', '\x2', '\xF', '\xCF', '\x3', '\x2', '\x2', '\x2', - '\x11', '\xD1', '\x3', '\x2', '\x2', '\x2', '\x13', '\xD3', '\x3', '\x2', - '\x2', '\x2', '\x15', '\xD5', '\x3', '\x2', '\x2', '\x2', '\x17', '\xD8', - '\x3', '\x2', '\x2', '\x2', '\x19', '\xDA', '\x3', '\x2', '\x2', '\x2', - '\x1B', '\xDC', '\x3', '\x2', '\x2', '\x2', '\x1D', '\xDE', '\x3', '\x2', - '\x2', '\x2', '\x1F', '\xE0', '\x3', '\x2', '\x2', '\x2', '!', '\xE2', - '\x3', '\x2', '\x2', '\x2', '#', '\xE4', '\x3', '\x2', '\x2', '\x2', '%', - '\xE7', '\x3', '\x2', '\x2', '\x2', '\'', '\xEA', '\x3', '\x2', '\x2', - '\x2', ')', '\xEC', '\x3', '\x2', '\x2', '\x2', '+', '\xEF', '\x3', '\x2', - '\x2', '\x2', '-', '\xF1', '\x3', '\x2', '\x2', '\x2', '/', '\xF3', '\x3', - '\x2', '\x2', '\x2', '\x31', '\xF5', '\x3', '\x2', '\x2', '\x2', '\x33', - '\xF8', '\x3', '\x2', '\x2', '\x2', '\x35', '\xFA', '\x3', '\x2', '\x2', - '\x2', '\x37', '\xFC', '\x3', '\x2', '\x2', '\x2', '\x39', '\xFE', '\x3', - '\x2', '\x2', '\x2', ';', '\x102', '\x3', '\x2', '\x2', '\x2', '=', '\x106', - '\x3', '\x2', '\x2', '\x2', '?', '\x10C', '\x3', '\x2', '\x2', '\x2', - '\x41', '\x10F', '\x3', '\x2', '\x2', '\x2', '\x43', '\x113', '\x3', '\x2', - '\x2', '\x2', '\x45', '\x11B', '\x3', '\x2', '\x2', '\x2', 'G', '\x11E', - '\x3', '\x2', '\x2', '\x2', 'I', '\x123', '\x3', '\x2', '\x2', '\x2', - 'K', '\x12C', '\x3', '\x2', '\x2', '\x2', 'M', '\x133', '\x3', '\x2', - '\x2', '\x2', 'O', '\x13A', '\x3', '\x2', '\x2', '\x2', 'Q', '\x140', - '\x3', '\x2', '\x2', '\x2', 'S', '\x145', '\x3', '\x2', '\x2', '\x2', - 'U', '\x14B', '\x3', '\x2', '\x2', '\x2', 'W', '\x14E', '\x3', '\x2', - '\x2', '\x2', 'Y', '\x153', '\x3', '\x2', '\x2', '\x2', '[', '\x158', - '\x3', '\x2', '\x2', '\x2', ']', '\x15D', '\x3', '\x2', '\x2', '\x2', - '_', '\x163', '\x3', '\x2', '\x2', '\x2', '\x61', '\x167', '\x3', '\x2', - '\x2', '\x2', '\x63', '\x16C', '\x3', '\x2', '\x2', '\x2', '\x65', '\x173', - '\x3', '\x2', '\x2', '\x2', 'g', '\x176', '\x3', '\x2', '\x2', '\x2', - 'i', '\x17C', '\x3', '\x2', '\x2', '\x2', 'k', '\x182', '\x3', '\x2', - '\x2', '\x2', 'm', '\x189', '\x3', '\x2', '\x2', '\x2', 'o', '\x18D', - '\x3', '\x2', '\x2', '\x2', 'q', '\x192', '\x3', '\x2', '\x2', '\x2', - 's', '\x196', '\x3', '\x2', '\x2', '\x2', 'u', '\x1A0', '\x3', '\x2', - '\x2', '\x2', 'w', '\x1A6', '\x3', '\x2', '\x2', '\x2', 'y', '\x1AD', - '\x3', '\x2', '\x2', '\x2', '{', '\x1E3', '\x3', '\x2', '\x2', '\x2', - '}', '\x1F7', '\x3', '\x2', '\x2', '\x2', '\x7F', '\x1F9', '\x3', '\x2', - '\x2', '\x2', '\x81', '\x1FE', '\x3', '\x2', '\x2', '\x2', '\x83', '\x204', - '\x3', '\x2', '\x2', '\x2', '\x85', '\x206', '\x3', '\x2', '\x2', '\x2', - '\x87', '\x208', '\x3', '\x2', '\x2', '\x2', '\x89', '\x213', '\x3', '\x2', - '\x2', '\x2', '\x8B', '\x215', '\x3', '\x2', '\x2', '\x2', '\x8D', '\x218', - '\x3', '\x2', '\x2', '\x2', '\x8F', '\x21A', '\x3', '\x2', '\x2', '\x2', - '\x91', '\x21C', '\x3', '\x2', '\x2', '\x2', '\x93', '\x21E', '\x3', '\x2', - '\x2', '\x2', '\x95', '\x220', '\x3', '\x2', '\x2', '\x2', '\x97', '\x222', - '\x3', '\x2', '\x2', '\x2', '\x99', '\x224', '\x3', '\x2', '\x2', '\x2', - '\x9B', '\x226', '\x3', '\x2', '\x2', '\x2', '\x9D', '\x228', '\x3', '\x2', - '\x2', '\x2', '\x9F', '\x22A', '\x3', '\x2', '\x2', '\x2', '\xA1', '\x22C', - '\x3', '\x2', '\x2', '\x2', '\xA3', '\x22E', '\x3', '\x2', '\x2', '\x2', - '\xA5', '\x230', '\x3', '\x2', '\x2', '\x2', '\xA7', '\x232', '\x3', '\x2', - '\x2', '\x2', '\xA9', '\x234', '\x3', '\x2', '\x2', '\x2', '\xAB', '\x236', - '\x3', '\x2', '\x2', '\x2', '\xAD', '\x238', '\x3', '\x2', '\x2', '\x2', - '\xAF', '\x23A', '\x3', '\x2', '\x2', '\x2', '\xB1', '\x23C', '\x3', '\x2', - '\x2', '\x2', '\xB3', '\x23E', '\x3', '\x2', '\x2', '\x2', '\xB5', '\x240', - '\x3', '\x2', '\x2', '\x2', '\xB7', '\x242', '\x3', '\x2', '\x2', '\x2', - '\xB9', '\x244', '\x3', '\x2', '\x2', '\x2', '\xBB', '\x246', '\x3', '\x2', - '\x2', '\x2', '\xBD', '\x248', '\x3', '\x2', '\x2', '\x2', '\xBF', '\x24A', - '\x3', '\x2', '\x2', '\x2', '\xC1', '\x24C', '\x3', '\x2', '\x2', '\x2', - '\xC3', '\xC4', '\a', ',', '\x2', '\x2', '\xC4', '\x4', '\x3', '\x2', - '\x2', '\x2', '\xC5', '\xC6', '\a', '.', '\x2', '\x2', '\xC6', '\x6', - '\x3', '\x2', '\x2', '\x2', '\xC7', '\xC8', '\a', '*', '\x2', '\x2', '\xC8', - '\b', '\x3', '\x2', '\x2', '\x2', '\xC9', '\xCA', '\a', '+', '\x2', '\x2', - '\xCA', '\n', '\x3', '\x2', '\x2', '\x2', '\xCB', '\xCC', '\a', '\x30', - '\x2', '\x2', '\xCC', '\f', '\x3', '\x2', '\x2', '\x2', '\xCD', '\xCE', - '\a', ']', '\x2', '\x2', '\xCE', '\xE', '\x3', '\x2', '\x2', '\x2', '\xCF', - '\xD0', '\a', '_', '\x2', '\x2', '\xD0', '\x10', '\x3', '\x2', '\x2', - '\x2', '\xD1', '\xD2', '\a', '\x41', '\x2', '\x2', '\xD2', '\x12', '\x3', - '\x2', '\x2', '\x2', '\xD3', '\xD4', '\a', '<', '\x2', '\x2', '\xD4', - '\x14', '\x3', '\x2', '\x2', '\x2', '\xD5', '\xD6', '\a', '\x41', '\x2', - '\x2', '\xD6', '\xD7', '\a', '\x41', '\x2', '\x2', '\xD7', '\x16', '\x3', - '\x2', '\x2', '\x2', '\xD8', '\xD9', '\a', '\x31', '\x2', '\x2', '\xD9', - '\x18', '\x3', '\x2', '\x2', '\x2', '\xDA', '\xDB', '\a', '\'', '\x2', - '\x2', '\xDB', '\x1A', '\x3', '\x2', '\x2', '\x2', '\xDC', '\xDD', '\a', - '-', '\x2', '\x2', '\xDD', '\x1C', '\x3', '\x2', '\x2', '\x2', '\xDE', - '\xDF', '\a', '/', '\x2', '\x2', '\xDF', '\x1E', '\x3', '\x2', '\x2', - '\x2', '\xE0', '\xE1', '\a', '>', '\x2', '\x2', '\xE1', ' ', '\x3', '\x2', - '\x2', '\x2', '\xE2', '\xE3', '\a', '@', '\x2', '\x2', '\xE3', '\"', '\x3', - '\x2', '\x2', '\x2', '\xE4', '\xE5', '\a', '@', '\x2', '\x2', '\xE5', - '\xE6', '\a', '?', '\x2', '\x2', '\xE6', '$', '\x3', '\x2', '\x2', '\x2', - '\xE7', '\xE8', '\a', '>', '\x2', '\x2', '\xE8', '\xE9', '\a', '?', '\x2', - '\x2', '\xE9', '&', '\x3', '\x2', '\x2', '\x2', '\xEA', '\xEB', '\a', - '?', '\x2', '\x2', '\xEB', '(', '\x3', '\x2', '\x2', '\x2', '\xEC', '\xED', - '\a', '#', '\x2', '\x2', '\xED', '\xEE', '\a', '?', '\x2', '\x2', '\xEE', - '*', '\x3', '\x2', '\x2', '\x2', '\xEF', '\xF0', '\a', '(', '\x2', '\x2', - '\xF0', ',', '\x3', '\x2', '\x2', '\x2', '\xF1', '\xF2', '\a', '`', '\x2', - '\x2', '\xF2', '.', '\x3', '\x2', '\x2', '\x2', '\xF3', '\xF4', '\a', - '~', '\x2', '\x2', '\xF4', '\x30', '\x3', '\x2', '\x2', '\x2', '\xF5', - '\xF6', '\a', '~', '\x2', '\x2', '\xF6', '\xF7', '\a', '~', '\x2', '\x2', - '\xF7', '\x32', '\x3', '\x2', '\x2', '\x2', '\xF8', '\xF9', '\a', '\x80', - '\x2', '\x2', '\xF9', '\x34', '\x3', '\x2', '\x2', '\x2', '\xFA', '\xFB', - '\a', '}', '\x2', '\x2', '\xFB', '\x36', '\x3', '\x2', '\x2', '\x2', '\xFC', - '\xFD', '\a', '\x7F', '\x2', '\x2', '\xFD', '\x38', '\x3', '\x2', '\x2', - '\x2', '\xFE', '\xFF', '\x5', '\x8F', 'H', '\x2', '\xFF', '\x100', '\x5', - '\xA5', 'S', '\x2', '\x100', '\x101', '\x5', '\xA5', 'S', '\x2', '\x101', - ':', '\x3', '\x2', '\x2', '\x2', '\x102', '\x103', '\x5', '\x8F', 'H', - '\x2', '\x103', '\x104', '\x5', '\xA9', 'U', '\x2', '\x104', '\x105', - '\x5', '\x95', 'K', '\x2', '\x105', '<', '\x3', '\x2', '\x2', '\x2', '\x106', - '\x107', '\x5', '\x8F', 'H', '\x2', '\x107', '\x108', '\x5', '\xB1', 'Y', - '\x2', '\x108', '\x109', '\x5', '\xB1', 'Y', '\x2', '\x109', '\x10A', - '\x5', '\x8F', 'H', '\x2', '\x10A', '\x10B', '\x5', '\xBF', '`', '\x2', - '\x10B', '>', '\x3', '\x2', '\x2', '\x2', '\x10C', '\x10D', '\x5', '\x8F', - 'H', '\x2', '\x10D', '\x10E', '\x5', '\xB3', 'Z', '\x2', '\x10E', '@', - '\x3', '\x2', '\x2', '\x2', '\x10F', '\x110', '\x5', '\x8F', 'H', '\x2', - '\x110', '\x111', '\x5', '\xB3', 'Z', '\x2', '\x111', '\x112', '\x5', - '\x93', 'J', '\x2', '\x112', '\x42', '\x3', '\x2', '\x2', '\x2', '\x113', - '\x114', '\x5', '\x91', 'I', '\x2', '\x114', '\x115', '\x5', '\x97', 'L', - '\x2', '\x115', '\x116', '\x5', '\xB5', '[', '\x2', '\x116', '\x117', - '\x5', '\xBB', '^', '\x2', '\x117', '\x118', '\x5', '\x97', 'L', '\x2', - '\x118', '\x119', '\x5', '\x97', 'L', '\x2', '\x119', '\x11A', '\x5', - '\xA9', 'U', '\x2', '\x11A', '\x44', '\x3', '\x2', '\x2', '\x2', '\x11B', - '\x11C', '\x5', '\x91', 'I', '\x2', '\x11C', '\x11D', '\x5', '\xBF', '`', - '\x2', '\x11D', '\x46', '\x3', '\x2', '\x2', '\x2', '\x11E', '\x11F', - '\x5', '\x95', 'K', '\x2', '\x11F', '\x120', '\x5', '\x97', 'L', '\x2', - '\x120', '\x121', '\x5', '\xB3', 'Z', '\x2', '\x121', '\x122', '\x5', - '\x93', 'J', '\x2', '\x122', 'H', '\x3', '\x2', '\x2', '\x2', '\x123', - '\x124', '\x5', '\x95', 'K', '\x2', '\x124', '\x125', '\x5', '\x9F', 'P', - '\x2', '\x125', '\x126', '\x5', '\xB3', 'Z', '\x2', '\x126', '\x127', - '\x5', '\xB5', '[', '\x2', '\x127', '\x128', '\x5', '\x9F', 'P', '\x2', - '\x128', '\x129', '\x5', '\xA9', 'U', '\x2', '\x129', '\x12A', '\x5', - '\x93', 'J', '\x2', '\x12A', '\x12B', '\x5', '\xB5', '[', '\x2', '\x12B', - 'J', '\x3', '\x2', '\x2', '\x2', '\x12C', '\x12D', '\x5', '\x97', 'L', - '\x2', '\x12D', '\x12E', '\x5', '\xB3', 'Z', '\x2', '\x12E', '\x12F', - '\x5', '\x93', 'J', '\x2', '\x12F', '\x130', '\x5', '\x8F', 'H', '\x2', - '\x130', '\x131', '\x5', '\xAD', 'W', '\x2', '\x131', '\x132', '\x5', - '\x97', 'L', '\x2', '\x132', 'L', '\x3', '\x2', '\x2', '\x2', '\x133', - '\x134', '\x5', '\x97', 'L', '\x2', '\x134', '\x135', '\x5', '\xBD', '_', - '\x2', '\x135', '\x136', '\x5', '\x9F', 'P', '\x2', '\x136', '\x137', - '\x5', '\xB3', 'Z', '\x2', '\x137', '\x138', '\x5', '\xB5', '[', '\x2', - '\x138', '\x139', '\x5', '\xB3', 'Z', '\x2', '\x139', 'N', '\x3', '\x2', - '\x2', '\x2', '\x13A', '\x13B', '\a', 'h', '\x2', '\x2', '\x13B', '\x13C', - '\a', '\x63', '\x2', '\x2', '\x13C', '\x13D', '\a', 'n', '\x2', '\x2', - '\x13D', '\x13E', '\a', 'u', '\x2', '\x2', '\x13E', '\x13F', '\a', 'g', - '\x2', '\x2', '\x13F', 'P', '\x3', '\x2', '\x2', '\x2', '\x140', '\x141', - '\x5', '\x99', 'M', '\x2', '\x141', '\x142', '\x5', '\xB1', 'Y', '\x2', - '\x142', '\x143', '\x5', '\xAB', 'V', '\x2', '\x143', '\x144', '\x5', - '\xA7', 'T', '\x2', '\x144', 'R', '\x3', '\x2', '\x2', '\x2', '\x145', - '\x146', '\x5', '\x9B', 'N', '\x2', '\x146', '\x147', '\x5', '\xB1', 'Y', - '\x2', '\x147', '\x148', '\x5', '\xAB', 'V', '\x2', '\x148', '\x149', - '\x5', '\xB7', '\\', '\x2', '\x149', '\x14A', '\x5', '\xAD', 'W', '\x2', - '\x14A', 'T', '\x3', '\x2', '\x2', '\x2', '\x14B', '\x14C', '\x5', '\x9F', - 'P', '\x2', '\x14C', '\x14D', '\x5', '\xA9', 'U', '\x2', '\x14D', 'V', - '\x3', '\x2', '\x2', '\x2', '\x14E', '\x14F', '\x5', '\xA1', 'Q', '\x2', - '\x14F', '\x150', '\x5', '\xAB', 'V', '\x2', '\x150', '\x151', '\x5', - '\x9F', 'P', '\x2', '\x151', '\x152', '\x5', '\xA9', 'U', '\x2', '\x152', - 'X', '\x3', '\x2', '\x2', '\x2', '\x153', '\x154', '\x5', '\xA5', 'S', - '\x2', '\x154', '\x155', '\x5', '\x97', 'L', '\x2', '\x155', '\x156', - '\x5', '\x99', 'M', '\x2', '\x156', '\x157', '\x5', '\xB5', '[', '\x2', - '\x157', 'Z', '\x3', '\x2', '\x2', '\x2', '\x158', '\x159', '\x5', '\xA5', - 'S', '\x2', '\x159', '\x15A', '\x5', '\x9F', 'P', '\x2', '\x15A', '\x15B', - '\x5', '\xA3', 'R', '\x2', '\x15B', '\x15C', '\x5', '\x97', 'L', '\x2', - '\x15C', '\\', '\x3', '\x2', '\x2', '\x2', '\x15D', '\x15E', '\x5', '\xA5', - 'S', '\x2', '\x15E', '\x15F', '\x5', '\x9F', 'P', '\x2', '\x15F', '\x160', - '\x5', '\xA7', 'T', '\x2', '\x160', '\x161', '\x5', '\x9F', 'P', '\x2', - '\x161', '\x162', '\x5', '\xB5', '[', '\x2', '\x162', '^', '\x3', '\x2', - '\x2', '\x2', '\x163', '\x164', '\x5', '\xA9', 'U', '\x2', '\x164', '\x165', - '\x5', '\xAB', 'V', '\x2', '\x165', '\x166', '\x5', '\xB5', '[', '\x2', - '\x166', '`', '\x3', '\x2', '\x2', '\x2', '\x167', '\x168', '\a', 'p', - '\x2', '\x2', '\x168', '\x169', '\a', 'w', '\x2', '\x2', '\x169', '\x16A', - '\a', 'n', '\x2', '\x2', '\x16A', '\x16B', '\a', 'n', '\x2', '\x2', '\x16B', - '\x62', '\x3', '\x2', '\x2', '\x2', '\x16C', '\x16D', '\x5', '\xAB', 'V', - '\x2', '\x16D', '\x16E', '\x5', '\x99', 'M', '\x2', '\x16E', '\x16F', - '\x5', '\x99', 'M', '\x2', '\x16F', '\x170', '\x5', '\xB3', 'Z', '\x2', - '\x170', '\x171', '\x5', '\x97', 'L', '\x2', '\x171', '\x172', '\x5', - '\xB5', '[', '\x2', '\x172', '\x64', '\x3', '\x2', '\x2', '\x2', '\x173', - '\x174', '\x5', '\xAB', 'V', '\x2', '\x174', '\x175', '\x5', '\xB1', 'Y', - '\x2', '\x175', '\x66', '\x3', '\x2', '\x2', '\x2', '\x176', '\x177', - '\x5', '\xAB', 'V', '\x2', '\x177', '\x178', '\x5', '\xB1', 'Y', '\x2', - '\x178', '\x179', '\x5', '\x95', 'K', '\x2', '\x179', '\x17A', '\x5', - '\x97', 'L', '\x2', '\x17A', '\x17B', '\x5', '\xB1', 'Y', '\x2', '\x17B', - 'h', '\x3', '\x2', '\x2', '\x2', '\x17C', '\x17D', '\x5', '\xB1', 'Y', - '\x2', '\x17D', '\x17E', '\x5', '\x9F', 'P', '\x2', '\x17E', '\x17F', - '\x5', '\x9B', 'N', '\x2', '\x17F', '\x180', '\x5', '\x9D', 'O', '\x2', - '\x180', '\x181', '\x5', '\xB5', '[', '\x2', '\x181', 'j', '\x3', '\x2', - '\x2', '\x2', '\x182', '\x183', '\x5', '\xB3', 'Z', '\x2', '\x183', '\x184', - '\x5', '\x97', 'L', '\x2', '\x184', '\x185', '\x5', '\xA5', 'S', '\x2', - '\x185', '\x186', '\x5', '\x97', 'L', '\x2', '\x186', '\x187', '\x5', - '\x93', 'J', '\x2', '\x187', '\x188', '\x5', '\xB5', '[', '\x2', '\x188', - 'l', '\x3', '\x2', '\x2', '\x2', '\x189', '\x18A', '\x5', '\xB5', '[', - '\x2', '\x18A', '\x18B', '\x5', '\xAB', 'V', '\x2', '\x18B', '\x18C', - '\x5', '\xAD', 'W', '\x2', '\x18C', 'n', '\x3', '\x2', '\x2', '\x2', '\x18D', - '\x18E', '\a', 'v', '\x2', '\x2', '\x18E', '\x18F', '\a', 't', '\x2', - '\x2', '\x18F', '\x190', '\a', 'w', '\x2', '\x2', '\x190', '\x191', '\a', - 'g', '\x2', '\x2', '\x191', 'p', '\x3', '\x2', '\x2', '\x2', '\x192', - '\x193', '\a', 'w', '\x2', '\x2', '\x193', '\x194', '\a', '\x66', '\x2', - '\x2', '\x194', '\x195', '\a', 'h', '\x2', '\x2', '\x195', 'r', '\x3', - '\x2', '\x2', '\x2', '\x196', '\x197', '\a', 'w', '\x2', '\x2', '\x197', - '\x198', '\a', 'p', '\x2', '\x2', '\x198', '\x199', '\a', '\x66', '\x2', - '\x2', '\x199', '\x19A', '\a', 'g', '\x2', '\x2', '\x19A', '\x19B', '\a', - 'h', '\x2', '\x2', '\x19B', '\x19C', '\a', 'k', '\x2', '\x2', '\x19C', - '\x19D', '\a', 'p', '\x2', '\x2', '\x19D', '\x19E', '\a', 'g', '\x2', - '\x2', '\x19E', '\x19F', '\a', '\x66', '\x2', '\x2', '\x19F', 't', '\x3', - '\x2', '\x2', '\x2', '\x1A0', '\x1A1', '\x5', '\xB9', ']', '\x2', '\x1A1', - '\x1A2', '\x5', '\x8F', 'H', '\x2', '\x1A2', '\x1A3', '\x5', '\xA5', 'S', - '\x2', '\x1A3', '\x1A4', '\x5', '\xB7', '\\', '\x2', '\x1A4', '\x1A5', - '\x5', '\x97', 'L', '\x2', '\x1A5', 'v', '\x3', '\x2', '\x2', '\x2', '\x1A6', - '\x1A7', '\x5', '\xBB', '^', '\x2', '\x1A7', '\x1A8', '\x5', '\x9D', 'O', - '\x2', '\x1A8', '\x1A9', '\x5', '\x97', 'L', '\x2', '\x1A9', '\x1AA', - '\x5', '\xB1', 'Y', '\x2', '\x1AA', '\x1AB', '\x5', '\x97', 'L', '\x2', - '\x1AB', 'x', '\x3', '\x2', '\x2', '\x2', '\x1AC', '\x1AE', '\t', '\x2', - '\x2', '\x2', '\x1AD', '\x1AC', '\x3', '\x2', '\x2', '\x2', '\x1AE', '\x1AF', - '\x3', '\x2', '\x2', '\x2', '\x1AF', '\x1AD', '\x3', '\x2', '\x2', '\x2', - '\x1AF', '\x1B0', '\x3', '\x2', '\x2', '\x2', '\x1B0', '\x1B1', '\x3', - '\x2', '\x2', '\x2', '\x1B1', '\x1B2', '\b', '=', '\x2', '\x2', '\x1B2', - 'z', '\x3', '\x2', '\x2', '\x2', '\x1B3', '\x1B5', '\t', '\x3', '\x2', - '\x2', '\x1B4', '\x1B3', '\x3', '\x2', '\x2', '\x2', '\x1B4', '\x1B5', - '\x3', '\x2', '\x2', '\x2', '\x1B5', '\x1B7', '\x3', '\x2', '\x2', '\x2', - '\x1B6', '\x1B8', '\x5', '\x8D', 'G', '\x2', '\x1B7', '\x1B6', '\x3', - '\x2', '\x2', '\x2', '\x1B8', '\x1B9', '\x3', '\x2', '\x2', '\x2', '\x1B9', - '\x1B7', '\x3', '\x2', '\x2', '\x2', '\x1B9', '\x1BA', '\x3', '\x2', '\x2', - '\x2', '\x1BA', '\x1C2', '\x3', '\x2', '\x2', '\x2', '\x1BB', '\x1BF', - '\a', '\x30', '\x2', '\x2', '\x1BC', '\x1BE', '\x5', '\x8D', 'G', '\x2', - '\x1BD', '\x1BC', '\x3', '\x2', '\x2', '\x2', '\x1BE', '\x1C1', '\x3', - '\x2', '\x2', '\x2', '\x1BF', '\x1BD', '\x3', '\x2', '\x2', '\x2', '\x1BF', - '\x1C0', '\x3', '\x2', '\x2', '\x2', '\x1C0', '\x1C3', '\x3', '\x2', '\x2', - '\x2', '\x1C1', '\x1BF', '\x3', '\x2', '\x2', '\x2', '\x1C2', '\x1BB', - '\x3', '\x2', '\x2', '\x2', '\x1C2', '\x1C3', '\x3', '\x2', '\x2', '\x2', - '\x1C3', '\x1CD', '\x3', '\x2', '\x2', '\x2', '\x1C4', '\x1C6', '\x5', - '\x97', 'L', '\x2', '\x1C5', '\x1C7', '\t', '\x3', '\x2', '\x2', '\x1C6', - '\x1C5', '\x3', '\x2', '\x2', '\x2', '\x1C6', '\x1C7', '\x3', '\x2', '\x2', - '\x2', '\x1C7', '\x1C9', '\x3', '\x2', '\x2', '\x2', '\x1C8', '\x1CA', - '\x5', '\x8D', 'G', '\x2', '\x1C9', '\x1C8', '\x3', '\x2', '\x2', '\x2', - '\x1CA', '\x1CB', '\x3', '\x2', '\x2', '\x2', '\x1CB', '\x1C9', '\x3', - '\x2', '\x2', '\x2', '\x1CB', '\x1CC', '\x3', '\x2', '\x2', '\x2', '\x1CC', - '\x1CE', '\x3', '\x2', '\x2', '\x2', '\x1CD', '\x1C4', '\x3', '\x2', '\x2', - '\x2', '\x1CD', '\x1CE', '\x3', '\x2', '\x2', '\x2', '\x1CE', '\x1E4', - '\x3', '\x2', '\x2', '\x2', '\x1CF', '\x1D1', '\t', '\x3', '\x2', '\x2', - '\x1D0', '\x1CF', '\x3', '\x2', '\x2', '\x2', '\x1D0', '\x1D1', '\x3', - '\x2', '\x2', '\x2', '\x1D1', '\x1D2', '\x3', '\x2', '\x2', '\x2', '\x1D2', - '\x1D4', '\a', '\x30', '\x2', '\x2', '\x1D3', '\x1D5', '\x5', '\x8D', - 'G', '\x2', '\x1D4', '\x1D3', '\x3', '\x2', '\x2', '\x2', '\x1D5', '\x1D6', - '\x3', '\x2', '\x2', '\x2', '\x1D6', '\x1D4', '\x3', '\x2', '\x2', '\x2', - '\x1D6', '\x1D7', '\x3', '\x2', '\x2', '\x2', '\x1D7', '\x1E1', '\x3', - '\x2', '\x2', '\x2', '\x1D8', '\x1DA', '\x5', '\x97', 'L', '\x2', '\x1D9', - '\x1DB', '\t', '\x3', '\x2', '\x2', '\x1DA', '\x1D9', '\x3', '\x2', '\x2', - '\x2', '\x1DA', '\x1DB', '\x3', '\x2', '\x2', '\x2', '\x1DB', '\x1DD', - '\x3', '\x2', '\x2', '\x2', '\x1DC', '\x1DE', '\x5', '\x8D', 'G', '\x2', - '\x1DD', '\x1DC', '\x3', '\x2', '\x2', '\x2', '\x1DE', '\x1DF', '\x3', - '\x2', '\x2', '\x2', '\x1DF', '\x1DD', '\x3', '\x2', '\x2', '\x2', '\x1DF', - '\x1E0', '\x3', '\x2', '\x2', '\x2', '\x1E0', '\x1E2', '\x3', '\x2', '\x2', - '\x2', '\x1E1', '\x1D8', '\x3', '\x2', '\x2', '\x2', '\x1E1', '\x1E2', - '\x3', '\x2', '\x2', '\x2', '\x1E2', '\x1E4', '\x3', '\x2', '\x2', '\x2', - '\x1E3', '\x1B4', '\x3', '\x2', '\x2', '\x2', '\x1E3', '\x1D0', '\x3', - '\x2', '\x2', '\x2', '\x1E4', '|', '\x3', '\x2', '\x2', '\x2', '\x1E5', - '\x1EA', '\a', '$', '\x2', '\x2', '\x1E6', '\x1E9', '\x5', '\x7F', '@', - '\x2', '\x1E7', '\x1E9', '\x5', '\x87', '\x44', '\x2', '\x1E8', '\x1E6', - '\x3', '\x2', '\x2', '\x2', '\x1E8', '\x1E7', '\x3', '\x2', '\x2', '\x2', - '\x1E9', '\x1EC', '\x3', '\x2', '\x2', '\x2', '\x1EA', '\x1E8', '\x3', - '\x2', '\x2', '\x2', '\x1EA', '\x1EB', '\x3', '\x2', '\x2', '\x2', '\x1EB', - '\x1ED', '\x3', '\x2', '\x2', '\x2', '\x1EC', '\x1EA', '\x3', '\x2', '\x2', - '\x2', '\x1ED', '\x1F8', '\a', '$', '\x2', '\x2', '\x1EE', '\x1F3', '\a', - ')', '\x2', '\x2', '\x1EF', '\x1F2', '\x5', '\x7F', '@', '\x2', '\x1F0', - '\x1F2', '\x5', '\x85', '\x43', '\x2', '\x1F1', '\x1EF', '\x3', '\x2', - '\x2', '\x2', '\x1F1', '\x1F0', '\x3', '\x2', '\x2', '\x2', '\x1F2', '\x1F5', - '\x3', '\x2', '\x2', '\x2', '\x1F3', '\x1F1', '\x3', '\x2', '\x2', '\x2', - '\x1F3', '\x1F4', '\x3', '\x2', '\x2', '\x2', '\x1F4', '\x1F6', '\x3', - '\x2', '\x2', '\x2', '\x1F5', '\x1F3', '\x3', '\x2', '\x2', '\x2', '\x1F6', - '\x1F8', '\a', ')', '\x2', '\x2', '\x1F7', '\x1E5', '\x3', '\x2', '\x2', - '\x2', '\x1F7', '\x1EE', '\x3', '\x2', '\x2', '\x2', '\x1F8', '~', '\x3', - '\x2', '\x2', '\x2', '\x1F9', '\x1FC', '\a', '^', '\x2', '\x2', '\x1FA', - '\x1FD', '\t', '\x4', '\x2', '\x2', '\x1FB', '\x1FD', '\x5', '\x81', '\x41', - '\x2', '\x1FC', '\x1FA', '\x3', '\x2', '\x2', '\x2', '\x1FC', '\x1FB', - '\x3', '\x2', '\x2', '\x2', '\x1FD', '\x80', '\x3', '\x2', '\x2', '\x2', - '\x1FE', '\x1FF', '\a', 'w', '\x2', '\x2', '\x1FF', '\x200', '\x5', '\x83', - '\x42', '\x2', '\x200', '\x201', '\x5', '\x83', '\x42', '\x2', '\x201', - '\x202', '\x5', '\x83', '\x42', '\x2', '\x202', '\x203', '\x5', '\x83', - '\x42', '\x2', '\x203', '\x82', '\x3', '\x2', '\x2', '\x2', '\x204', '\x205', - '\t', '\x5', '\x2', '\x2', '\x205', '\x84', '\x3', '\x2', '\x2', '\x2', - '\x206', '\x207', '\n', '\x6', '\x2', '\x2', '\x207', '\x86', '\x3', '\x2', - '\x2', '\x2', '\x208', '\x209', '\n', '\a', '\x2', '\x2', '\x209', '\x88', - '\x3', '\x2', '\x2', '\x2', '\x20A', '\x214', '\x3', '\x2', '\x2', '\x2', - '\x20B', '\x210', '\t', '\b', '\x2', '\x2', '\x20C', '\x20F', '\t', '\b', - '\x2', '\x2', '\x20D', '\x20F', '\x5', '\x8D', 'G', '\x2', '\x20E', '\x20C', - '\x3', '\x2', '\x2', '\x2', '\x20E', '\x20D', '\x3', '\x2', '\x2', '\x2', - '\x20F', '\x212', '\x3', '\x2', '\x2', '\x2', '\x210', '\x20E', '\x3', - '\x2', '\x2', '\x2', '\x210', '\x211', '\x3', '\x2', '\x2', '\x2', '\x211', - '\x214', '\x3', '\x2', '\x2', '\x2', '\x212', '\x210', '\x3', '\x2', '\x2', - '\x2', '\x213', '\x20A', '\x3', '\x2', '\x2', '\x2', '\x213', '\x20B', - '\x3', '\x2', '\x2', '\x2', '\x214', '\x8A', '\x3', '\x2', '\x2', '\x2', - '\x215', '\x216', '\a', '\x42', '\x2', '\x2', '\x216', '\x217', '\x5', - '\x89', '\x45', '\x2', '\x217', '\x8C', '\x3', '\x2', '\x2', '\x2', '\x218', - '\x219', '\t', '\t', '\x2', '\x2', '\x219', '\x8E', '\x3', '\x2', '\x2', - '\x2', '\x21A', '\x21B', '\t', '\n', '\x2', '\x2', '\x21B', '\x90', '\x3', - '\x2', '\x2', '\x2', '\x21C', '\x21D', '\t', '\v', '\x2', '\x2', '\x21D', - '\x92', '\x3', '\x2', '\x2', '\x2', '\x21E', '\x21F', '\t', '\f', '\x2', - '\x2', '\x21F', '\x94', '\x3', '\x2', '\x2', '\x2', '\x220', '\x221', - '\t', '\r', '\x2', '\x2', '\x221', '\x96', '\x3', '\x2', '\x2', '\x2', - '\x222', '\x223', '\t', '\xE', '\x2', '\x2', '\x223', '\x98', '\x3', '\x2', - '\x2', '\x2', '\x224', '\x225', '\t', '\xF', '\x2', '\x2', '\x225', '\x9A', - '\x3', '\x2', '\x2', '\x2', '\x226', '\x227', '\t', '\x10', '\x2', '\x2', - '\x227', '\x9C', '\x3', '\x2', '\x2', '\x2', '\x228', '\x229', '\t', '\x11', - '\x2', '\x2', '\x229', '\x9E', '\x3', '\x2', '\x2', '\x2', '\x22A', '\x22B', - '\t', '\x12', '\x2', '\x2', '\x22B', '\xA0', '\x3', '\x2', '\x2', '\x2', - '\x22C', '\x22D', '\t', '\x13', '\x2', '\x2', '\x22D', '\xA2', '\x3', - '\x2', '\x2', '\x2', '\x22E', '\x22F', '\t', '\x14', '\x2', '\x2', '\x22F', - '\xA4', '\x3', '\x2', '\x2', '\x2', '\x230', '\x231', '\t', '\x15', '\x2', - '\x2', '\x231', '\xA6', '\x3', '\x2', '\x2', '\x2', '\x232', '\x233', - '\t', '\x16', '\x2', '\x2', '\x233', '\xA8', '\x3', '\x2', '\x2', '\x2', - '\x234', '\x235', '\t', '\x17', '\x2', '\x2', '\x235', '\xAA', '\x3', - '\x2', '\x2', '\x2', '\x236', '\x237', '\t', '\x18', '\x2', '\x2', '\x237', - '\xAC', '\x3', '\x2', '\x2', '\x2', '\x238', '\x239', '\t', '\x19', '\x2', - '\x2', '\x239', '\xAE', '\x3', '\x2', '\x2', '\x2', '\x23A', '\x23B', - '\t', '\x1A', '\x2', '\x2', '\x23B', '\xB0', '\x3', '\x2', '\x2', '\x2', - '\x23C', '\x23D', '\t', '\x1B', '\x2', '\x2', '\x23D', '\xB2', '\x3', - '\x2', '\x2', '\x2', '\x23E', '\x23F', '\t', '\x1C', '\x2', '\x2', '\x23F', - '\xB4', '\x3', '\x2', '\x2', '\x2', '\x240', '\x241', '\t', '\x1D', '\x2', - '\x2', '\x241', '\xB6', '\x3', '\x2', '\x2', '\x2', '\x242', '\x243', - '\t', '\x1E', '\x2', '\x2', '\x243', '\xB8', '\x3', '\x2', '\x2', '\x2', - '\x244', '\x245', '\t', '\x1F', '\x2', '\x2', '\x245', '\xBA', '\x3', - '\x2', '\x2', '\x2', '\x246', '\x247', '\t', ' ', '\x2', '\x2', '\x247', - '\xBC', '\x3', '\x2', '\x2', '\x2', '\x248', '\x249', '\t', '!', '\x2', - '\x2', '\x249', '\xBE', '\x3', '\x2', '\x2', '\x2', '\x24A', '\x24B', - '\t', '\"', '\x2', '\x2', '\x24B', '\xC0', '\x3', '\x2', '\x2', '\x2', - '\x24C', '\x24D', '\t', '#', '\x2', '\x2', '\x24D', '\xC2', '\x3', '\x2', - '\x2', '\x2', '\x1A', '\x2', '\x1AF', '\x1B4', '\x1B9', '\x1BF', '\x1C2', - '\x1C6', '\x1CB', '\x1CD', '\x1D0', '\x1D6', '\x1DA', '\x1DF', '\x1E1', - '\x1E3', '\x1E8', '\x1EA', '\x1F1', '\x1F3', '\x1F7', '\x1FC', '\x20E', - '\x210', '\x213', '\x3', '\b', '\x2', '\x2', + '\x4', '\x62', '\t', '\x62', '\x4', '\x63', '\t', '\x63', '\x3', '\x2', + '\x3', '\x2', '\x3', '\x3', '\x3', '\x3', '\x3', '\x4', '\x3', '\x4', + '\x3', '\x5', '\x3', '\x5', '\x3', '\x6', '\x3', '\x6', '\x3', '\a', '\x3', + '\a', '\x3', '\b', '\x3', '\b', '\x3', '\t', '\x3', '\t', '\x3', '\n', + '\x3', '\n', '\x3', '\v', '\x3', '\v', '\x3', '\v', '\x3', '\f', '\x3', + '\f', '\x3', '\r', '\x3', '\r', '\x3', '\xE', '\x3', '\xE', '\x3', '\xF', + '\x3', '\xF', '\x3', '\x10', '\x3', '\x10', '\x3', '\x11', '\x3', '\x11', + '\x3', '\x12', '\x3', '\x12', '\x3', '\x12', '\x3', '\x13', '\x3', '\x13', + '\x3', '\x13', '\x3', '\x14', '\x3', '\x14', '\x3', '\x15', '\x3', '\x15', + '\x3', '\x15', '\x3', '\x16', '\x3', '\x16', '\x3', '\x17', '\x3', '\x17', + '\x3', '\x18', '\x3', '\x18', '\x3', '\x19', '\x3', '\x19', '\x3', '\x19', + '\x3', '\x1A', '\x3', '\x1A', '\x3', '\x1B', '\x3', '\x1B', '\x3', '\x1C', + '\x3', '\x1C', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', '\x3', '\x1D', + '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1E', '\x3', '\x1F', + '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', '\x3', '\x1F', + '\x3', ' ', '\x3', ' ', '\x3', ' ', '\x3', '!', '\x3', '!', '\x3', '!', + '\x3', '!', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', + '\"', '\x3', '\"', '\x3', '\"', '\x3', '\"', '\x3', '#', '\x3', '#', '\x3', + '#', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', '$', '\x3', + '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', '%', '\x3', + '%', '\x3', '%', '\x3', '%', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', + '&', '\x3', '&', '\x3', '&', '\x3', '&', '\x3', '\'', '\x3', '\'', '\x3', + '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '\'', '\x3', '(', + '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', ')', + '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', '*', + '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '*', '\x3', '+', '\x3', '+', + '\x3', '+', '\x3', '+', '\x3', '+', '\x3', '+', '\x3', ',', '\x3', ',', + '\x3', ',', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', '\x3', '-', + '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '.', '\x3', '/', + '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '/', '\x3', '\x30', '\x3', + '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x30', '\x3', '\x31', '\x3', + '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', '\x31', '\x3', + '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x32', '\x3', '\x33', '\x3', + '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x33', '\x3', '\x34', '\x3', + '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', '\x34', '\x3', + '\x34', '\x3', '\x35', '\x3', '\x35', '\x3', '\x35', '\x3', '\x36', '\x3', + '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', '\x36', '\x3', + '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', '\x37', '\x3', + '\x37', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', + '\x38', '\x3', '\x38', '\x3', '\x38', '\x3', '\x39', '\x3', '\x39', '\x3', + '\x39', '\x3', '\x39', '\x3', ':', '\x3', ':', '\x3', ':', '\x3', ':', + '\x3', ':', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', ';', '\x3', '<', + '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '<', + '\x3', '<', '\x3', '<', '\x3', '<', '\x3', '=', '\x3', '=', '\x3', '=', + '\x3', '=', '\x3', '=', '\x3', '=', '\x3', '>', '\x3', '>', '\x3', '>', + '\x3', '>', '\x3', '>', '\x3', '>', '\x3', '?', '\x6', '?', '\x1BD', '\n', + '?', '\r', '?', '\xE', '?', '\x1BE', '\x3', '?', '\x3', '?', '\x3', '@', + '\x5', '@', '\x1C4', '\n', '@', '\x3', '@', '\x6', '@', '\x1C7', '\n', + '@', '\r', '@', '\xE', '@', '\x1C8', '\x3', '@', '\x3', '@', '\a', '@', + '\x1CD', '\n', '@', '\f', '@', '\xE', '@', '\x1D0', '\v', '@', '\x5', + '@', '\x1D2', '\n', '@', '\x3', '@', '\x3', '@', '\x5', '@', '\x1D6', + '\n', '@', '\x3', '@', '\x6', '@', '\x1D9', '\n', '@', '\r', '@', '\xE', + '@', '\x1DA', '\x5', '@', '\x1DD', '\n', '@', '\x3', '@', '\x5', '@', + '\x1E0', '\n', '@', '\x3', '@', '\x3', '@', '\x6', '@', '\x1E4', '\n', + '@', '\r', '@', '\xE', '@', '\x1E5', '\x3', '@', '\x3', '@', '\x5', '@', + '\x1EA', '\n', '@', '\x3', '@', '\x6', '@', '\x1ED', '\n', '@', '\r', + '@', '\xE', '@', '\x1EE', '\x5', '@', '\x1F1', '\n', '@', '\x5', '@', + '\x1F3', '\n', '@', '\x3', '\x41', '\x3', '\x41', '\x3', '\x41', '\a', + '\x41', '\x1F8', '\n', '\x41', '\f', '\x41', '\xE', '\x41', '\x1FB', '\v', + '\x41', '\x3', '\x41', '\x3', '\x41', '\x3', '\x41', '\x3', '\x41', '\a', + '\x41', '\x201', '\n', '\x41', '\f', '\x41', '\xE', '\x41', '\x204', '\v', + '\x41', '\x3', '\x41', '\x5', '\x41', '\x207', '\n', '\x41', '\x3', '\x42', + '\x3', '\x42', '\x3', '\x42', '\x5', '\x42', '\x20C', '\n', '\x42', '\x3', + '\x43', '\x3', '\x43', '\x3', '\x43', '\x3', '\x43', '\x3', '\x43', '\x3', + '\x43', '\x3', '\x44', '\x3', '\x44', '\x3', '\x45', '\x3', '\x45', '\x3', + '\x46', '\x3', '\x46', '\x3', 'G', '\x3', 'G', '\x3', 'G', '\x3', 'G', + '\a', 'G', '\x21E', '\n', 'G', '\f', 'G', '\xE', 'G', '\x221', '\v', 'G', + '\x5', 'G', '\x223', '\n', 'G', '\x3', 'H', '\x3', 'H', '\x3', 'H', '\x3', + 'I', '\x3', 'I', '\x3', 'J', '\x3', 'J', '\x3', 'K', '\x3', 'K', '\x3', + 'L', '\x3', 'L', '\x3', 'M', '\x3', 'M', '\x3', 'N', '\x3', 'N', '\x3', + 'O', '\x3', 'O', '\x3', 'P', '\x3', 'P', '\x3', 'Q', '\x3', 'Q', '\x3', + 'R', '\x3', 'R', '\x3', 'S', '\x3', 'S', '\x3', 'T', '\x3', 'T', '\x3', + 'U', '\x3', 'U', '\x3', 'V', '\x3', 'V', '\x3', 'W', '\x3', 'W', '\x3', + 'X', '\x3', 'X', '\x3', 'Y', '\x3', 'Y', '\x3', 'Z', '\x3', 'Z', '\x3', + '[', '\x3', '[', '\x3', '\\', '\x3', '\\', '\x3', ']', '\x3', ']', '\x3', + '^', '\x3', '^', '\x3', '_', '\x3', '_', '\x3', '`', '\x3', '`', '\x3', + '\x61', '\x3', '\x61', '\x3', '\x62', '\x3', '\x62', '\x3', '\x63', '\x3', + '\x63', '\x2', '\x2', '\x64', '\x3', '\x3', '\x5', '\x4', '\a', '\x5', + '\t', '\x6', '\v', '\a', '\r', '\b', '\xF', '\t', '\x11', '\n', '\x13', + '\v', '\x15', '\f', '\x17', '\r', '\x19', '\xE', '\x1B', '\xF', '\x1D', + '\x10', '\x1F', '\x11', '!', '\x12', '#', '\x13', '%', '\x14', '\'', '\x15', + ')', '\x16', '+', '\x17', '-', '\x18', '/', '\x19', '\x31', '\x1A', '\x33', + '\x1B', '\x35', '\x1C', '\x37', '\x1D', '\x39', '\x1E', ';', '\x1F', '=', + ' ', '?', '!', '\x41', '\"', '\x43', '#', '\x45', '$', 'G', '%', 'I', + '&', 'K', '\'', 'M', '(', 'O', ')', 'Q', '*', 'S', '+', 'U', ',', 'W', + '-', 'Y', '.', '[', '/', ']', '\x30', '_', '\x31', '\x61', '\x32', '\x63', + '\x33', '\x65', '\x34', 'g', '\x35', 'i', '\x36', 'k', '\x37', 'm', '\x38', + 'o', '\x39', 'q', ':', 's', ';', 'u', '<', 'w', '=', 'y', '>', '{', '?', + '}', '@', '\x7F', '\x41', '\x81', '\x42', '\x83', '\x2', '\x85', '\x2', + '\x87', '\x2', '\x89', '\x2', '\x8B', '\x2', '\x8D', '\x43', '\x8F', '\x44', + '\x91', '\x2', '\x93', '\x2', '\x95', '\x2', '\x97', '\x2', '\x99', '\x2', + '\x9B', '\x2', '\x9D', '\x2', '\x9F', '\x2', '\xA1', '\x2', '\xA3', '\x2', + '\xA5', '\x2', '\xA7', '\x2', '\xA9', '\x2', '\xAB', '\x2', '\xAD', '\x2', + '\xAF', '\x2', '\xB1', '\x2', '\xB3', '\x2', '\xB5', '\x2', '\xB7', '\x2', + '\xB9', '\x2', '\xBB', '\x2', '\xBD', '\x2', '\xBF', '\x2', '\xC1', '\x2', + '\xC3', '\x2', '\xC5', '\x2', '\x3', '\x2', '$', '\x5', '\x2', '\v', '\f', + '\xF', '\xF', '\"', '\"', '\x4', '\x2', '-', '-', '/', '/', '\n', '\x2', + '$', '$', '\x31', '\x31', '^', '^', '\x64', '\x64', 'h', 'h', 'p', 'p', + 't', 't', 'v', 'v', '\x5', '\x2', '\x32', ';', '\x43', 'H', '\x63', 'h', + '\x5', '\x2', '\x2', '!', ')', ')', '^', '^', '\x5', '\x2', '\x2', '!', + '$', '$', '^', '^', '\x5', '\x2', '\x43', '\\', '\x61', '\x61', '\x63', + '|', '\x3', '\x2', '\x32', ';', '\x4', '\x2', '\x43', '\x43', '\x63', + '\x63', '\x4', '\x2', '\x44', '\x44', '\x64', '\x64', '\x4', '\x2', '\x45', + '\x45', '\x65', '\x65', '\x4', '\x2', '\x46', '\x46', '\x66', '\x66', + '\x4', '\x2', 'G', 'G', 'g', 'g', '\x4', '\x2', 'H', 'H', 'h', 'h', '\x4', + '\x2', 'I', 'I', 'i', 'i', '\x4', '\x2', 'J', 'J', 'j', 'j', '\x4', '\x2', + 'K', 'K', 'k', 'k', '\x4', '\x2', 'L', 'L', 'l', 'l', '\x4', '\x2', 'M', + 'M', 'm', 'm', '\x4', '\x2', 'N', 'N', 'n', 'n', '\x4', '\x2', 'O', 'O', + 'o', 'o', '\x4', '\x2', 'P', 'P', 'p', 'p', '\x4', '\x2', 'Q', 'Q', 'q', + 'q', '\x4', '\x2', 'R', 'R', 'r', 'r', '\x4', '\x2', 'S', 'S', 's', 's', + '\x4', '\x2', 'T', 'T', 't', 't', '\x4', '\x2', 'U', 'U', 'u', 'u', '\x4', + '\x2', 'V', 'V', 'v', 'v', '\x4', '\x2', 'W', 'W', 'w', 'w', '\x4', '\x2', + 'X', 'X', 'x', 'x', '\x4', '\x2', 'Y', 'Y', 'y', 'y', '\x4', '\x2', 'Z', + 'Z', 'z', 'z', '\x4', '\x2', '[', '[', '{', '{', '\x4', '\x2', '\\', '\\', + '|', '|', '\x2', '\x253', '\x2', '\x3', '\x3', '\x2', '\x2', '\x2', '\x2', + '\x5', '\x3', '\x2', '\x2', '\x2', '\x2', '\a', '\x3', '\x2', '\x2', '\x2', + '\x2', '\t', '\x3', '\x2', '\x2', '\x2', '\x2', '\v', '\x3', '\x2', '\x2', + '\x2', '\x2', '\r', '\x3', '\x2', '\x2', '\x2', '\x2', '\xF', '\x3', '\x2', + '\x2', '\x2', '\x2', '\x11', '\x3', '\x2', '\x2', '\x2', '\x2', '\x13', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x15', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x17', '\x3', '\x2', '\x2', '\x2', '\x2', '\x19', '\x3', '\x2', + '\x2', '\x2', '\x2', '\x1B', '\x3', '\x2', '\x2', '\x2', '\x2', '\x1D', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x1F', '\x3', '\x2', '\x2', '\x2', + '\x2', '!', '\x3', '\x2', '\x2', '\x2', '\x2', '#', '\x3', '\x2', '\x2', + '\x2', '\x2', '%', '\x3', '\x2', '\x2', '\x2', '\x2', '\'', '\x3', '\x2', + '\x2', '\x2', '\x2', ')', '\x3', '\x2', '\x2', '\x2', '\x2', '+', '\x3', + '\x2', '\x2', '\x2', '\x2', '-', '\x3', '\x2', '\x2', '\x2', '\x2', '/', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x31', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x33', '\x3', '\x2', '\x2', '\x2', '\x2', '\x35', '\x3', '\x2', + '\x2', '\x2', '\x2', '\x37', '\x3', '\x2', '\x2', '\x2', '\x2', '\x39', + '\x3', '\x2', '\x2', '\x2', '\x2', ';', '\x3', '\x2', '\x2', '\x2', '\x2', + '=', '\x3', '\x2', '\x2', '\x2', '\x2', '?', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x41', '\x3', '\x2', '\x2', '\x2', '\x2', '\x43', '\x3', '\x2', + '\x2', '\x2', '\x2', '\x45', '\x3', '\x2', '\x2', '\x2', '\x2', 'G', '\x3', + '\x2', '\x2', '\x2', '\x2', 'I', '\x3', '\x2', '\x2', '\x2', '\x2', 'K', + '\x3', '\x2', '\x2', '\x2', '\x2', 'M', '\x3', '\x2', '\x2', '\x2', '\x2', + 'O', '\x3', '\x2', '\x2', '\x2', '\x2', 'Q', '\x3', '\x2', '\x2', '\x2', + '\x2', 'S', '\x3', '\x2', '\x2', '\x2', '\x2', 'U', '\x3', '\x2', '\x2', + '\x2', '\x2', 'W', '\x3', '\x2', '\x2', '\x2', '\x2', 'Y', '\x3', '\x2', + '\x2', '\x2', '\x2', '[', '\x3', '\x2', '\x2', '\x2', '\x2', ']', '\x3', + '\x2', '\x2', '\x2', '\x2', '_', '\x3', '\x2', '\x2', '\x2', '\x2', '\x61', + '\x3', '\x2', '\x2', '\x2', '\x2', '\x63', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x65', '\x3', '\x2', '\x2', '\x2', '\x2', 'g', '\x3', '\x2', '\x2', + '\x2', '\x2', 'i', '\x3', '\x2', '\x2', '\x2', '\x2', 'k', '\x3', '\x2', + '\x2', '\x2', '\x2', 'm', '\x3', '\x2', '\x2', '\x2', '\x2', 'o', '\x3', + '\x2', '\x2', '\x2', '\x2', 'q', '\x3', '\x2', '\x2', '\x2', '\x2', 's', + '\x3', '\x2', '\x2', '\x2', '\x2', 'u', '\x3', '\x2', '\x2', '\x2', '\x2', + 'w', '\x3', '\x2', '\x2', '\x2', '\x2', 'y', '\x3', '\x2', '\x2', '\x2', + '\x2', '{', '\x3', '\x2', '\x2', '\x2', '\x2', '}', '\x3', '\x2', '\x2', + '\x2', '\x2', '\x7F', '\x3', '\x2', '\x2', '\x2', '\x2', '\x81', '\x3', + '\x2', '\x2', '\x2', '\x2', '\x8D', '\x3', '\x2', '\x2', '\x2', '\x2', + '\x8F', '\x3', '\x2', '\x2', '\x2', '\x3', '\xC7', '\x3', '\x2', '\x2', + '\x2', '\x5', '\xC9', '\x3', '\x2', '\x2', '\x2', '\a', '\xCB', '\x3', + '\x2', '\x2', '\x2', '\t', '\xCD', '\x3', '\x2', '\x2', '\x2', '\v', '\xCF', + '\x3', '\x2', '\x2', '\x2', '\r', '\xD1', '\x3', '\x2', '\x2', '\x2', + '\xF', '\xD3', '\x3', '\x2', '\x2', '\x2', '\x11', '\xD5', '\x3', '\x2', + '\x2', '\x2', '\x13', '\xD7', '\x3', '\x2', '\x2', '\x2', '\x15', '\xD9', + '\x3', '\x2', '\x2', '\x2', '\x17', '\xDC', '\x3', '\x2', '\x2', '\x2', + '\x19', '\xDE', '\x3', '\x2', '\x2', '\x2', '\x1B', '\xE0', '\x3', '\x2', + '\x2', '\x2', '\x1D', '\xE2', '\x3', '\x2', '\x2', '\x2', '\x1F', '\xE4', + '\x3', '\x2', '\x2', '\x2', '!', '\xE6', '\x3', '\x2', '\x2', '\x2', '#', + '\xE8', '\x3', '\x2', '\x2', '\x2', '%', '\xEB', '\x3', '\x2', '\x2', + '\x2', '\'', '\xEE', '\x3', '\x2', '\x2', '\x2', ')', '\xF0', '\x3', '\x2', + '\x2', '\x2', '+', '\xF3', '\x3', '\x2', '\x2', '\x2', '-', '\xF5', '\x3', + '\x2', '\x2', '\x2', '/', '\xF7', '\x3', '\x2', '\x2', '\x2', '\x31', + '\xF9', '\x3', '\x2', '\x2', '\x2', '\x33', '\xFC', '\x3', '\x2', '\x2', + '\x2', '\x35', '\xFE', '\x3', '\x2', '\x2', '\x2', '\x37', '\x100', '\x3', + '\x2', '\x2', '\x2', '\x39', '\x102', '\x3', '\x2', '\x2', '\x2', ';', + '\x106', '\x3', '\x2', '\x2', '\x2', '=', '\x10A', '\x3', '\x2', '\x2', + '\x2', '?', '\x110', '\x3', '\x2', '\x2', '\x2', '\x41', '\x113', '\x3', + '\x2', '\x2', '\x2', '\x43', '\x117', '\x3', '\x2', '\x2', '\x2', '\x45', + '\x11F', '\x3', '\x2', '\x2', '\x2', 'G', '\x122', '\x3', '\x2', '\x2', + '\x2', 'I', '\x127', '\x3', '\x2', '\x2', '\x2', 'K', '\x130', '\x3', + '\x2', '\x2', '\x2', 'M', '\x137', '\x3', '\x2', '\x2', '\x2', 'O', '\x13E', + '\x3', '\x2', '\x2', '\x2', 'Q', '\x144', '\x3', '\x2', '\x2', '\x2', + 'S', '\x14A', '\x3', '\x2', '\x2', '\x2', 'U', '\x14F', '\x3', '\x2', + '\x2', '\x2', 'W', '\x155', '\x3', '\x2', '\x2', '\x2', 'Y', '\x158', + '\x3', '\x2', '\x2', '\x2', '[', '\x15D', '\x3', '\x2', '\x2', '\x2', + ']', '\x162', '\x3', '\x2', '\x2', '\x2', '_', '\x167', '\x3', '\x2', + '\x2', '\x2', '\x61', '\x16C', '\x3', '\x2', '\x2', '\x2', '\x63', '\x172', + '\x3', '\x2', '\x2', '\x2', '\x65', '\x176', '\x3', '\x2', '\x2', '\x2', + 'g', '\x17B', '\x3', '\x2', '\x2', '\x2', 'i', '\x182', '\x3', '\x2', + '\x2', '\x2', 'k', '\x185', '\x3', '\x2', '\x2', '\x2', 'm', '\x18B', + '\x3', '\x2', '\x2', '\x2', 'o', '\x191', '\x3', '\x2', '\x2', '\x2', + 'q', '\x198', '\x3', '\x2', '\x2', '\x2', 's', '\x19C', '\x3', '\x2', + '\x2', '\x2', 'u', '\x1A1', '\x3', '\x2', '\x2', '\x2', 'w', '\x1A5', + '\x3', '\x2', '\x2', '\x2', 'y', '\x1AF', '\x3', '\x2', '\x2', '\x2', + '{', '\x1B5', '\x3', '\x2', '\x2', '\x2', '}', '\x1BC', '\x3', '\x2', + '\x2', '\x2', '\x7F', '\x1F2', '\x3', '\x2', '\x2', '\x2', '\x81', '\x206', + '\x3', '\x2', '\x2', '\x2', '\x83', '\x208', '\x3', '\x2', '\x2', '\x2', + '\x85', '\x20D', '\x3', '\x2', '\x2', '\x2', '\x87', '\x213', '\x3', '\x2', + '\x2', '\x2', '\x89', '\x215', '\x3', '\x2', '\x2', '\x2', '\x8B', '\x217', + '\x3', '\x2', '\x2', '\x2', '\x8D', '\x222', '\x3', '\x2', '\x2', '\x2', + '\x8F', '\x224', '\x3', '\x2', '\x2', '\x2', '\x91', '\x227', '\x3', '\x2', + '\x2', '\x2', '\x93', '\x229', '\x3', '\x2', '\x2', '\x2', '\x95', '\x22B', + '\x3', '\x2', '\x2', '\x2', '\x97', '\x22D', '\x3', '\x2', '\x2', '\x2', + '\x99', '\x22F', '\x3', '\x2', '\x2', '\x2', '\x9B', '\x231', '\x3', '\x2', + '\x2', '\x2', '\x9D', '\x233', '\x3', '\x2', '\x2', '\x2', '\x9F', '\x235', + '\x3', '\x2', '\x2', '\x2', '\xA1', '\x237', '\x3', '\x2', '\x2', '\x2', + '\xA3', '\x239', '\x3', '\x2', '\x2', '\x2', '\xA5', '\x23B', '\x3', '\x2', + '\x2', '\x2', '\xA7', '\x23D', '\x3', '\x2', '\x2', '\x2', '\xA9', '\x23F', + '\x3', '\x2', '\x2', '\x2', '\xAB', '\x241', '\x3', '\x2', '\x2', '\x2', + '\xAD', '\x243', '\x3', '\x2', '\x2', '\x2', '\xAF', '\x245', '\x3', '\x2', + '\x2', '\x2', '\xB1', '\x247', '\x3', '\x2', '\x2', '\x2', '\xB3', '\x249', + '\x3', '\x2', '\x2', '\x2', '\xB5', '\x24B', '\x3', '\x2', '\x2', '\x2', + '\xB7', '\x24D', '\x3', '\x2', '\x2', '\x2', '\xB9', '\x24F', '\x3', '\x2', + '\x2', '\x2', '\xBB', '\x251', '\x3', '\x2', '\x2', '\x2', '\xBD', '\x253', + '\x3', '\x2', '\x2', '\x2', '\xBF', '\x255', '\x3', '\x2', '\x2', '\x2', + '\xC1', '\x257', '\x3', '\x2', '\x2', '\x2', '\xC3', '\x259', '\x3', '\x2', + '\x2', '\x2', '\xC5', '\x25B', '\x3', '\x2', '\x2', '\x2', '\xC7', '\xC8', + '\a', ',', '\x2', '\x2', '\xC8', '\x4', '\x3', '\x2', '\x2', '\x2', '\xC9', + '\xCA', '\a', '.', '\x2', '\x2', '\xCA', '\x6', '\x3', '\x2', '\x2', '\x2', + '\xCB', '\xCC', '\a', '*', '\x2', '\x2', '\xCC', '\b', '\x3', '\x2', '\x2', + '\x2', '\xCD', '\xCE', '\a', '+', '\x2', '\x2', '\xCE', '\n', '\x3', '\x2', + '\x2', '\x2', '\xCF', '\xD0', '\a', '\x30', '\x2', '\x2', '\xD0', '\f', + '\x3', '\x2', '\x2', '\x2', '\xD1', '\xD2', '\a', ']', '\x2', '\x2', '\xD2', + '\xE', '\x3', '\x2', '\x2', '\x2', '\xD3', '\xD4', '\a', '_', '\x2', '\x2', + '\xD4', '\x10', '\x3', '\x2', '\x2', '\x2', '\xD5', '\xD6', '\a', '\x41', + '\x2', '\x2', '\xD6', '\x12', '\x3', '\x2', '\x2', '\x2', '\xD7', '\xD8', + '\a', '<', '\x2', '\x2', '\xD8', '\x14', '\x3', '\x2', '\x2', '\x2', '\xD9', + '\xDA', '\a', '\x41', '\x2', '\x2', '\xDA', '\xDB', '\a', '\x41', '\x2', + '\x2', '\xDB', '\x16', '\x3', '\x2', '\x2', '\x2', '\xDC', '\xDD', '\a', + '\x31', '\x2', '\x2', '\xDD', '\x18', '\x3', '\x2', '\x2', '\x2', '\xDE', + '\xDF', '\a', '\'', '\x2', '\x2', '\xDF', '\x1A', '\x3', '\x2', '\x2', + '\x2', '\xE0', '\xE1', '\a', '-', '\x2', '\x2', '\xE1', '\x1C', '\x3', + '\x2', '\x2', '\x2', '\xE2', '\xE3', '\a', '/', '\x2', '\x2', '\xE3', + '\x1E', '\x3', '\x2', '\x2', '\x2', '\xE4', '\xE5', '\a', '>', '\x2', + '\x2', '\xE5', ' ', '\x3', '\x2', '\x2', '\x2', '\xE6', '\xE7', '\a', + '@', '\x2', '\x2', '\xE7', '\"', '\x3', '\x2', '\x2', '\x2', '\xE8', '\xE9', + '\a', '@', '\x2', '\x2', '\xE9', '\xEA', '\a', '?', '\x2', '\x2', '\xEA', + '$', '\x3', '\x2', '\x2', '\x2', '\xEB', '\xEC', '\a', '>', '\x2', '\x2', + '\xEC', '\xED', '\a', '?', '\x2', '\x2', '\xED', '&', '\x3', '\x2', '\x2', + '\x2', '\xEE', '\xEF', '\a', '?', '\x2', '\x2', '\xEF', '(', '\x3', '\x2', + '\x2', '\x2', '\xF0', '\xF1', '\a', '#', '\x2', '\x2', '\xF1', '\xF2', + '\a', '?', '\x2', '\x2', '\xF2', '*', '\x3', '\x2', '\x2', '\x2', '\xF3', + '\xF4', '\a', '(', '\x2', '\x2', '\xF4', ',', '\x3', '\x2', '\x2', '\x2', + '\xF5', '\xF6', '\a', '`', '\x2', '\x2', '\xF6', '.', '\x3', '\x2', '\x2', + '\x2', '\xF7', '\xF8', '\a', '~', '\x2', '\x2', '\xF8', '\x30', '\x3', + '\x2', '\x2', '\x2', '\xF9', '\xFA', '\a', '~', '\x2', '\x2', '\xFA', + '\xFB', '\a', '~', '\x2', '\x2', '\xFB', '\x32', '\x3', '\x2', '\x2', + '\x2', '\xFC', '\xFD', '\a', '\x80', '\x2', '\x2', '\xFD', '\x34', '\x3', + '\x2', '\x2', '\x2', '\xFE', '\xFF', '\a', '}', '\x2', '\x2', '\xFF', + '\x36', '\x3', '\x2', '\x2', '\x2', '\x100', '\x101', '\a', '\x7F', '\x2', + '\x2', '\x101', '\x38', '\x3', '\x2', '\x2', '\x2', '\x102', '\x103', + '\x5', '\x93', 'J', '\x2', '\x103', '\x104', '\x5', '\xA9', 'U', '\x2', + '\x104', '\x105', '\x5', '\xA9', 'U', '\x2', '\x105', ':', '\x3', '\x2', + '\x2', '\x2', '\x106', '\x107', '\x5', '\x93', 'J', '\x2', '\x107', '\x108', + '\x5', '\xAD', 'W', '\x2', '\x108', '\x109', '\x5', '\x99', 'M', '\x2', + '\x109', '<', '\x3', '\x2', '\x2', '\x2', '\x10A', '\x10B', '\x5', '\x93', + 'J', '\x2', '\x10B', '\x10C', '\x5', '\xB5', '[', '\x2', '\x10C', '\x10D', + '\x5', '\xB5', '[', '\x2', '\x10D', '\x10E', '\x5', '\x93', 'J', '\x2', + '\x10E', '\x10F', '\x5', '\xC3', '\x62', '\x2', '\x10F', '>', '\x3', '\x2', + '\x2', '\x2', '\x110', '\x111', '\x5', '\x93', 'J', '\x2', '\x111', '\x112', + '\x5', '\xB7', '\\', '\x2', '\x112', '@', '\x3', '\x2', '\x2', '\x2', + '\x113', '\x114', '\x5', '\x93', 'J', '\x2', '\x114', '\x115', '\x5', + '\xB7', '\\', '\x2', '\x115', '\x116', '\x5', '\x97', 'L', '\x2', '\x116', + '\x42', '\x3', '\x2', '\x2', '\x2', '\x117', '\x118', '\x5', '\x95', 'K', + '\x2', '\x118', '\x119', '\x5', '\x9B', 'N', '\x2', '\x119', '\x11A', + '\x5', '\xB9', ']', '\x2', '\x11A', '\x11B', '\x5', '\xBF', '`', '\x2', + '\x11B', '\x11C', '\x5', '\x9B', 'N', '\x2', '\x11C', '\x11D', '\x5', + '\x9B', 'N', '\x2', '\x11D', '\x11E', '\x5', '\xAD', 'W', '\x2', '\x11E', + '\x44', '\x3', '\x2', '\x2', '\x2', '\x11F', '\x120', '\x5', '\x95', 'K', + '\x2', '\x120', '\x121', '\x5', '\xC3', '\x62', '\x2', '\x121', '\x46', + '\x3', '\x2', '\x2', '\x2', '\x122', '\x123', '\x5', '\x99', 'M', '\x2', + '\x123', '\x124', '\x5', '\x9B', 'N', '\x2', '\x124', '\x125', '\x5', + '\xB7', '\\', '\x2', '\x125', '\x126', '\x5', '\x97', 'L', '\x2', '\x126', + 'H', '\x3', '\x2', '\x2', '\x2', '\x127', '\x128', '\x5', '\x99', 'M', + '\x2', '\x128', '\x129', '\x5', '\xA3', 'R', '\x2', '\x129', '\x12A', + '\x5', '\xB7', '\\', '\x2', '\x12A', '\x12B', '\x5', '\xB9', ']', '\x2', + '\x12B', '\x12C', '\x5', '\xA3', 'R', '\x2', '\x12C', '\x12D', '\x5', + '\xAD', 'W', '\x2', '\x12D', '\x12E', '\x5', '\x97', 'L', '\x2', '\x12E', + '\x12F', '\x5', '\xB9', ']', '\x2', '\x12F', 'J', '\x3', '\x2', '\x2', + '\x2', '\x130', '\x131', '\x5', '\x9B', 'N', '\x2', '\x131', '\x132', + '\x5', '\xB7', '\\', '\x2', '\x132', '\x133', '\x5', '\x97', 'L', '\x2', + '\x133', '\x134', '\x5', '\x93', 'J', '\x2', '\x134', '\x135', '\x5', + '\xB1', 'Y', '\x2', '\x135', '\x136', '\x5', '\x9B', 'N', '\x2', '\x136', + 'L', '\x3', '\x2', '\x2', '\x2', '\x137', '\x138', '\x5', '\x9B', 'N', + '\x2', '\x138', '\x139', '\x5', '\xC1', '\x61', '\x2', '\x139', '\x13A', + '\x5', '\xA3', 'R', '\x2', '\x13A', '\x13B', '\x5', '\xB7', '\\', '\x2', + '\x13B', '\x13C', '\x5', '\xB9', ']', '\x2', '\x13C', '\x13D', '\x5', + '\xB7', '\\', '\x2', '\x13D', 'N', '\x3', '\x2', '\x2', '\x2', '\x13E', + '\x13F', '\x5', '\x9D', 'O', '\x2', '\x13F', '\x140', '\x5', '\xA3', 'R', + '\x2', '\x140', '\x141', '\x5', '\xB5', '[', '\x2', '\x141', '\x142', + '\x5', '\xB7', '\\', '\x2', '\x142', '\x143', '\x5', '\xB9', ']', '\x2', + '\x143', 'P', '\x3', '\x2', '\x2', '\x2', '\x144', '\x145', '\a', 'h', + '\x2', '\x2', '\x145', '\x146', '\a', '\x63', '\x2', '\x2', '\x146', '\x147', + '\a', 'n', '\x2', '\x2', '\x147', '\x148', '\a', 'u', '\x2', '\x2', '\x148', + '\x149', '\a', 'g', '\x2', '\x2', '\x149', 'R', '\x3', '\x2', '\x2', '\x2', + '\x14A', '\x14B', '\x5', '\x9D', 'O', '\x2', '\x14B', '\x14C', '\x5', + '\xB5', '[', '\x2', '\x14C', '\x14D', '\x5', '\xAF', 'X', '\x2', '\x14D', + '\x14E', '\x5', '\xAB', 'V', '\x2', '\x14E', 'T', '\x3', '\x2', '\x2', + '\x2', '\x14F', '\x150', '\x5', '\x9F', 'P', '\x2', '\x150', '\x151', + '\x5', '\xB5', '[', '\x2', '\x151', '\x152', '\x5', '\xAF', 'X', '\x2', + '\x152', '\x153', '\x5', '\xBB', '^', '\x2', '\x153', '\x154', '\x5', + '\xB1', 'Y', '\x2', '\x154', 'V', '\x3', '\x2', '\x2', '\x2', '\x155', + '\x156', '\x5', '\xA3', 'R', '\x2', '\x156', '\x157', '\x5', '\xAD', 'W', + '\x2', '\x157', 'X', '\x3', '\x2', '\x2', '\x2', '\x158', '\x159', '\x5', + '\xA5', 'S', '\x2', '\x159', '\x15A', '\x5', '\xAF', 'X', '\x2', '\x15A', + '\x15B', '\x5', '\xA3', 'R', '\x2', '\x15B', '\x15C', '\x5', '\xAD', 'W', + '\x2', '\x15C', 'Z', '\x3', '\x2', '\x2', '\x2', '\x15D', '\x15E', '\x5', + '\xA9', 'U', '\x2', '\x15E', '\x15F', '\x5', '\x93', 'J', '\x2', '\x15F', + '\x160', '\x5', '\xB7', '\\', '\x2', '\x160', '\x161', '\x5', '\xB9', + ']', '\x2', '\x161', '\\', '\x3', '\x2', '\x2', '\x2', '\x162', '\x163', + '\x5', '\xA9', 'U', '\x2', '\x163', '\x164', '\x5', '\x9B', 'N', '\x2', + '\x164', '\x165', '\x5', '\x9D', 'O', '\x2', '\x165', '\x166', '\x5', + '\xB9', ']', '\x2', '\x166', '^', '\x3', '\x2', '\x2', '\x2', '\x167', + '\x168', '\x5', '\xA9', 'U', '\x2', '\x168', '\x169', '\x5', '\xA3', 'R', + '\x2', '\x169', '\x16A', '\x5', '\xA7', 'T', '\x2', '\x16A', '\x16B', + '\x5', '\x9B', 'N', '\x2', '\x16B', '`', '\x3', '\x2', '\x2', '\x2', '\x16C', + '\x16D', '\x5', '\xA9', 'U', '\x2', '\x16D', '\x16E', '\x5', '\xA3', 'R', + '\x2', '\x16E', '\x16F', '\x5', '\xAB', 'V', '\x2', '\x16F', '\x170', + '\x5', '\xA3', 'R', '\x2', '\x170', '\x171', '\x5', '\xB9', ']', '\x2', + '\x171', '\x62', '\x3', '\x2', '\x2', '\x2', '\x172', '\x173', '\x5', + '\xAD', 'W', '\x2', '\x173', '\x174', '\x5', '\xAF', 'X', '\x2', '\x174', + '\x175', '\x5', '\xB9', ']', '\x2', '\x175', '\x64', '\x3', '\x2', '\x2', + '\x2', '\x176', '\x177', '\a', 'p', '\x2', '\x2', '\x177', '\x178', '\a', + 'w', '\x2', '\x2', '\x178', '\x179', '\a', 'n', '\x2', '\x2', '\x179', + '\x17A', '\a', 'n', '\x2', '\x2', '\x17A', '\x66', '\x3', '\x2', '\x2', + '\x2', '\x17B', '\x17C', '\x5', '\xAF', 'X', '\x2', '\x17C', '\x17D', + '\x5', '\x9D', 'O', '\x2', '\x17D', '\x17E', '\x5', '\x9D', 'O', '\x2', + '\x17E', '\x17F', '\x5', '\xB7', '\\', '\x2', '\x17F', '\x180', '\x5', + '\x9B', 'N', '\x2', '\x180', '\x181', '\x5', '\xB9', ']', '\x2', '\x181', + 'h', '\x3', '\x2', '\x2', '\x2', '\x182', '\x183', '\x5', '\xAF', 'X', + '\x2', '\x183', '\x184', '\x5', '\xB5', '[', '\x2', '\x184', 'j', '\x3', + '\x2', '\x2', '\x2', '\x185', '\x186', '\x5', '\xAF', 'X', '\x2', '\x186', + '\x187', '\x5', '\xB5', '[', '\x2', '\x187', '\x188', '\x5', '\x99', 'M', + '\x2', '\x188', '\x189', '\x5', '\x9B', 'N', '\x2', '\x189', '\x18A', + '\x5', '\xB5', '[', '\x2', '\x18A', 'l', '\x3', '\x2', '\x2', '\x2', '\x18B', + '\x18C', '\x5', '\xB5', '[', '\x2', '\x18C', '\x18D', '\x5', '\xA3', 'R', + '\x2', '\x18D', '\x18E', '\x5', '\x9F', 'P', '\x2', '\x18E', '\x18F', + '\x5', '\xA1', 'Q', '\x2', '\x18F', '\x190', '\x5', '\xB9', ']', '\x2', + '\x190', 'n', '\x3', '\x2', '\x2', '\x2', '\x191', '\x192', '\x5', '\xB7', + '\\', '\x2', '\x192', '\x193', '\x5', '\x9B', 'N', '\x2', '\x193', '\x194', + '\x5', '\xA9', 'U', '\x2', '\x194', '\x195', '\x5', '\x9B', 'N', '\x2', + '\x195', '\x196', '\x5', '\x97', 'L', '\x2', '\x196', '\x197', '\x5', + '\xB9', ']', '\x2', '\x197', 'p', '\x3', '\x2', '\x2', '\x2', '\x198', + '\x199', '\x5', '\xB9', ']', '\x2', '\x199', '\x19A', '\x5', '\xAF', 'X', + '\x2', '\x19A', '\x19B', '\x5', '\xB1', 'Y', '\x2', '\x19B', 'r', '\x3', + '\x2', '\x2', '\x2', '\x19C', '\x19D', '\a', 'v', '\x2', '\x2', '\x19D', + '\x19E', '\a', 't', '\x2', '\x2', '\x19E', '\x19F', '\a', 'w', '\x2', + '\x2', '\x19F', '\x1A0', '\a', 'g', '\x2', '\x2', '\x1A0', 't', '\x3', + '\x2', '\x2', '\x2', '\x1A1', '\x1A2', '\a', 'w', '\x2', '\x2', '\x1A2', + '\x1A3', '\a', '\x66', '\x2', '\x2', '\x1A3', '\x1A4', '\a', 'h', '\x2', + '\x2', '\x1A4', 'v', '\x3', '\x2', '\x2', '\x2', '\x1A5', '\x1A6', '\a', + 'w', '\x2', '\x2', '\x1A6', '\x1A7', '\a', 'p', '\x2', '\x2', '\x1A7', + '\x1A8', '\a', '\x66', '\x2', '\x2', '\x1A8', '\x1A9', '\a', 'g', '\x2', + '\x2', '\x1A9', '\x1AA', '\a', 'h', '\x2', '\x2', '\x1AA', '\x1AB', '\a', + 'k', '\x2', '\x2', '\x1AB', '\x1AC', '\a', 'p', '\x2', '\x2', '\x1AC', + '\x1AD', '\a', 'g', '\x2', '\x2', '\x1AD', '\x1AE', '\a', '\x66', '\x2', + '\x2', '\x1AE', 'x', '\x3', '\x2', '\x2', '\x2', '\x1AF', '\x1B0', '\x5', + '\xBD', '_', '\x2', '\x1B0', '\x1B1', '\x5', '\x93', 'J', '\x2', '\x1B1', + '\x1B2', '\x5', '\xA9', 'U', '\x2', '\x1B2', '\x1B3', '\x5', '\xBB', '^', + '\x2', '\x1B3', '\x1B4', '\x5', '\x9B', 'N', '\x2', '\x1B4', 'z', '\x3', + '\x2', '\x2', '\x2', '\x1B5', '\x1B6', '\x5', '\xBF', '`', '\x2', '\x1B6', + '\x1B7', '\x5', '\xA1', 'Q', '\x2', '\x1B7', '\x1B8', '\x5', '\x9B', 'N', + '\x2', '\x1B8', '\x1B9', '\x5', '\xB5', '[', '\x2', '\x1B9', '\x1BA', + '\x5', '\x9B', 'N', '\x2', '\x1BA', '|', '\x3', '\x2', '\x2', '\x2', '\x1BB', + '\x1BD', '\t', '\x2', '\x2', '\x2', '\x1BC', '\x1BB', '\x3', '\x2', '\x2', + '\x2', '\x1BD', '\x1BE', '\x3', '\x2', '\x2', '\x2', '\x1BE', '\x1BC', + '\x3', '\x2', '\x2', '\x2', '\x1BE', '\x1BF', '\x3', '\x2', '\x2', '\x2', + '\x1BF', '\x1C0', '\x3', '\x2', '\x2', '\x2', '\x1C0', '\x1C1', '\b', + '?', '\x2', '\x2', '\x1C1', '~', '\x3', '\x2', '\x2', '\x2', '\x1C2', + '\x1C4', '\t', '\x3', '\x2', '\x2', '\x1C3', '\x1C2', '\x3', '\x2', '\x2', + '\x2', '\x1C3', '\x1C4', '\x3', '\x2', '\x2', '\x2', '\x1C4', '\x1C6', + '\x3', '\x2', '\x2', '\x2', '\x1C5', '\x1C7', '\x5', '\x91', 'I', '\x2', + '\x1C6', '\x1C5', '\x3', '\x2', '\x2', '\x2', '\x1C7', '\x1C8', '\x3', + '\x2', '\x2', '\x2', '\x1C8', '\x1C6', '\x3', '\x2', '\x2', '\x2', '\x1C8', + '\x1C9', '\x3', '\x2', '\x2', '\x2', '\x1C9', '\x1D1', '\x3', '\x2', '\x2', + '\x2', '\x1CA', '\x1CE', '\a', '\x30', '\x2', '\x2', '\x1CB', '\x1CD', + '\x5', '\x91', 'I', '\x2', '\x1CC', '\x1CB', '\x3', '\x2', '\x2', '\x2', + '\x1CD', '\x1D0', '\x3', '\x2', '\x2', '\x2', '\x1CE', '\x1CC', '\x3', + '\x2', '\x2', '\x2', '\x1CE', '\x1CF', '\x3', '\x2', '\x2', '\x2', '\x1CF', + '\x1D2', '\x3', '\x2', '\x2', '\x2', '\x1D0', '\x1CE', '\x3', '\x2', '\x2', + '\x2', '\x1D1', '\x1CA', '\x3', '\x2', '\x2', '\x2', '\x1D1', '\x1D2', + '\x3', '\x2', '\x2', '\x2', '\x1D2', '\x1DC', '\x3', '\x2', '\x2', '\x2', + '\x1D3', '\x1D5', '\x5', '\x9B', 'N', '\x2', '\x1D4', '\x1D6', '\t', '\x3', + '\x2', '\x2', '\x1D5', '\x1D4', '\x3', '\x2', '\x2', '\x2', '\x1D5', '\x1D6', + '\x3', '\x2', '\x2', '\x2', '\x1D6', '\x1D8', '\x3', '\x2', '\x2', '\x2', + '\x1D7', '\x1D9', '\x5', '\x91', 'I', '\x2', '\x1D8', '\x1D7', '\x3', + '\x2', '\x2', '\x2', '\x1D9', '\x1DA', '\x3', '\x2', '\x2', '\x2', '\x1DA', + '\x1D8', '\x3', '\x2', '\x2', '\x2', '\x1DA', '\x1DB', '\x3', '\x2', '\x2', + '\x2', '\x1DB', '\x1DD', '\x3', '\x2', '\x2', '\x2', '\x1DC', '\x1D3', + '\x3', '\x2', '\x2', '\x2', '\x1DC', '\x1DD', '\x3', '\x2', '\x2', '\x2', + '\x1DD', '\x1F3', '\x3', '\x2', '\x2', '\x2', '\x1DE', '\x1E0', '\t', + '\x3', '\x2', '\x2', '\x1DF', '\x1DE', '\x3', '\x2', '\x2', '\x2', '\x1DF', + '\x1E0', '\x3', '\x2', '\x2', '\x2', '\x1E0', '\x1E1', '\x3', '\x2', '\x2', + '\x2', '\x1E1', '\x1E3', '\a', '\x30', '\x2', '\x2', '\x1E2', '\x1E4', + '\x5', '\x91', 'I', '\x2', '\x1E3', '\x1E2', '\x3', '\x2', '\x2', '\x2', + '\x1E4', '\x1E5', '\x3', '\x2', '\x2', '\x2', '\x1E5', '\x1E3', '\x3', + '\x2', '\x2', '\x2', '\x1E5', '\x1E6', '\x3', '\x2', '\x2', '\x2', '\x1E6', + '\x1F0', '\x3', '\x2', '\x2', '\x2', '\x1E7', '\x1E9', '\x5', '\x9B', + 'N', '\x2', '\x1E8', '\x1EA', '\t', '\x3', '\x2', '\x2', '\x1E9', '\x1E8', + '\x3', '\x2', '\x2', '\x2', '\x1E9', '\x1EA', '\x3', '\x2', '\x2', '\x2', + '\x1EA', '\x1EC', '\x3', '\x2', '\x2', '\x2', '\x1EB', '\x1ED', '\x5', + '\x91', 'I', '\x2', '\x1EC', '\x1EB', '\x3', '\x2', '\x2', '\x2', '\x1ED', + '\x1EE', '\x3', '\x2', '\x2', '\x2', '\x1EE', '\x1EC', '\x3', '\x2', '\x2', + '\x2', '\x1EE', '\x1EF', '\x3', '\x2', '\x2', '\x2', '\x1EF', '\x1F1', + '\x3', '\x2', '\x2', '\x2', '\x1F0', '\x1E7', '\x3', '\x2', '\x2', '\x2', + '\x1F0', '\x1F1', '\x3', '\x2', '\x2', '\x2', '\x1F1', '\x1F3', '\x3', + '\x2', '\x2', '\x2', '\x1F2', '\x1C3', '\x3', '\x2', '\x2', '\x2', '\x1F2', + '\x1DF', '\x3', '\x2', '\x2', '\x2', '\x1F3', '\x80', '\x3', '\x2', '\x2', + '\x2', '\x1F4', '\x1F9', '\a', '$', '\x2', '\x2', '\x1F5', '\x1F8', '\x5', + '\x83', '\x42', '\x2', '\x1F6', '\x1F8', '\x5', '\x8B', '\x46', '\x2', + '\x1F7', '\x1F5', '\x3', '\x2', '\x2', '\x2', '\x1F7', '\x1F6', '\x3', + '\x2', '\x2', '\x2', '\x1F8', '\x1FB', '\x3', '\x2', '\x2', '\x2', '\x1F9', + '\x1F7', '\x3', '\x2', '\x2', '\x2', '\x1F9', '\x1FA', '\x3', '\x2', '\x2', + '\x2', '\x1FA', '\x1FC', '\x3', '\x2', '\x2', '\x2', '\x1FB', '\x1F9', + '\x3', '\x2', '\x2', '\x2', '\x1FC', '\x207', '\a', '$', '\x2', '\x2', + '\x1FD', '\x202', '\a', ')', '\x2', '\x2', '\x1FE', '\x201', '\x5', '\x83', + '\x42', '\x2', '\x1FF', '\x201', '\x5', '\x89', '\x45', '\x2', '\x200', + '\x1FE', '\x3', '\x2', '\x2', '\x2', '\x200', '\x1FF', '\x3', '\x2', '\x2', + '\x2', '\x201', '\x204', '\x3', '\x2', '\x2', '\x2', '\x202', '\x200', + '\x3', '\x2', '\x2', '\x2', '\x202', '\x203', '\x3', '\x2', '\x2', '\x2', + '\x203', '\x205', '\x3', '\x2', '\x2', '\x2', '\x204', '\x202', '\x3', + '\x2', '\x2', '\x2', '\x205', '\x207', '\a', ')', '\x2', '\x2', '\x206', + '\x1F4', '\x3', '\x2', '\x2', '\x2', '\x206', '\x1FD', '\x3', '\x2', '\x2', + '\x2', '\x207', '\x82', '\x3', '\x2', '\x2', '\x2', '\x208', '\x20B', + '\a', '^', '\x2', '\x2', '\x209', '\x20C', '\t', '\x4', '\x2', '\x2', + '\x20A', '\x20C', '\x5', '\x85', '\x43', '\x2', '\x20B', '\x209', '\x3', + '\x2', '\x2', '\x2', '\x20B', '\x20A', '\x3', '\x2', '\x2', '\x2', '\x20C', + '\x84', '\x3', '\x2', '\x2', '\x2', '\x20D', '\x20E', '\a', 'w', '\x2', + '\x2', '\x20E', '\x20F', '\x5', '\x87', '\x44', '\x2', '\x20F', '\x210', + '\x5', '\x87', '\x44', '\x2', '\x210', '\x211', '\x5', '\x87', '\x44', + '\x2', '\x211', '\x212', '\x5', '\x87', '\x44', '\x2', '\x212', '\x86', + '\x3', '\x2', '\x2', '\x2', '\x213', '\x214', '\t', '\x5', '\x2', '\x2', + '\x214', '\x88', '\x3', '\x2', '\x2', '\x2', '\x215', '\x216', '\n', '\x6', + '\x2', '\x2', '\x216', '\x8A', '\x3', '\x2', '\x2', '\x2', '\x217', '\x218', + '\n', '\a', '\x2', '\x2', '\x218', '\x8C', '\x3', '\x2', '\x2', '\x2', + '\x219', '\x223', '\x3', '\x2', '\x2', '\x2', '\x21A', '\x21F', '\t', + '\b', '\x2', '\x2', '\x21B', '\x21E', '\t', '\b', '\x2', '\x2', '\x21C', + '\x21E', '\x5', '\x91', 'I', '\x2', '\x21D', '\x21B', '\x3', '\x2', '\x2', + '\x2', '\x21D', '\x21C', '\x3', '\x2', '\x2', '\x2', '\x21E', '\x221', + '\x3', '\x2', '\x2', '\x2', '\x21F', '\x21D', '\x3', '\x2', '\x2', '\x2', + '\x21F', '\x220', '\x3', '\x2', '\x2', '\x2', '\x220', '\x223', '\x3', + '\x2', '\x2', '\x2', '\x221', '\x21F', '\x3', '\x2', '\x2', '\x2', '\x222', + '\x219', '\x3', '\x2', '\x2', '\x2', '\x222', '\x21A', '\x3', '\x2', '\x2', + '\x2', '\x223', '\x8E', '\x3', '\x2', '\x2', '\x2', '\x224', '\x225', + '\a', '\x42', '\x2', '\x2', '\x225', '\x226', '\x5', '\x8D', 'G', '\x2', + '\x226', '\x90', '\x3', '\x2', '\x2', '\x2', '\x227', '\x228', '\t', '\t', + '\x2', '\x2', '\x228', '\x92', '\x3', '\x2', '\x2', '\x2', '\x229', '\x22A', + '\t', '\n', '\x2', '\x2', '\x22A', '\x94', '\x3', '\x2', '\x2', '\x2', + '\x22B', '\x22C', '\t', '\v', '\x2', '\x2', '\x22C', '\x96', '\x3', '\x2', + '\x2', '\x2', '\x22D', '\x22E', '\t', '\f', '\x2', '\x2', '\x22E', '\x98', + '\x3', '\x2', '\x2', '\x2', '\x22F', '\x230', '\t', '\r', '\x2', '\x2', + '\x230', '\x9A', '\x3', '\x2', '\x2', '\x2', '\x231', '\x232', '\t', '\xE', + '\x2', '\x2', '\x232', '\x9C', '\x3', '\x2', '\x2', '\x2', '\x233', '\x234', + '\t', '\xF', '\x2', '\x2', '\x234', '\x9E', '\x3', '\x2', '\x2', '\x2', + '\x235', '\x236', '\t', '\x10', '\x2', '\x2', '\x236', '\xA0', '\x3', + '\x2', '\x2', '\x2', '\x237', '\x238', '\t', '\x11', '\x2', '\x2', '\x238', + '\xA2', '\x3', '\x2', '\x2', '\x2', '\x239', '\x23A', '\t', '\x12', '\x2', + '\x2', '\x23A', '\xA4', '\x3', '\x2', '\x2', '\x2', '\x23B', '\x23C', + '\t', '\x13', '\x2', '\x2', '\x23C', '\xA6', '\x3', '\x2', '\x2', '\x2', + '\x23D', '\x23E', '\t', '\x14', '\x2', '\x2', '\x23E', '\xA8', '\x3', + '\x2', '\x2', '\x2', '\x23F', '\x240', '\t', '\x15', '\x2', '\x2', '\x240', + '\xAA', '\x3', '\x2', '\x2', '\x2', '\x241', '\x242', '\t', '\x16', '\x2', + '\x2', '\x242', '\xAC', '\x3', '\x2', '\x2', '\x2', '\x243', '\x244', + '\t', '\x17', '\x2', '\x2', '\x244', '\xAE', '\x3', '\x2', '\x2', '\x2', + '\x245', '\x246', '\t', '\x18', '\x2', '\x2', '\x246', '\xB0', '\x3', + '\x2', '\x2', '\x2', '\x247', '\x248', '\t', '\x19', '\x2', '\x2', '\x248', + '\xB2', '\x3', '\x2', '\x2', '\x2', '\x249', '\x24A', '\t', '\x1A', '\x2', + '\x2', '\x24A', '\xB4', '\x3', '\x2', '\x2', '\x2', '\x24B', '\x24C', + '\t', '\x1B', '\x2', '\x2', '\x24C', '\xB6', '\x3', '\x2', '\x2', '\x2', + '\x24D', '\x24E', '\t', '\x1C', '\x2', '\x2', '\x24E', '\xB8', '\x3', + '\x2', '\x2', '\x2', '\x24F', '\x250', '\t', '\x1D', '\x2', '\x2', '\x250', + '\xBA', '\x3', '\x2', '\x2', '\x2', '\x251', '\x252', '\t', '\x1E', '\x2', + '\x2', '\x252', '\xBC', '\x3', '\x2', '\x2', '\x2', '\x253', '\x254', + '\t', '\x1F', '\x2', '\x2', '\x254', '\xBE', '\x3', '\x2', '\x2', '\x2', + '\x255', '\x256', '\t', ' ', '\x2', '\x2', '\x256', '\xC0', '\x3', '\x2', + '\x2', '\x2', '\x257', '\x258', '\t', '!', '\x2', '\x2', '\x258', '\xC2', + '\x3', '\x2', '\x2', '\x2', '\x259', '\x25A', '\t', '\"', '\x2', '\x2', + '\x25A', '\xC4', '\x3', '\x2', '\x2', '\x2', '\x25B', '\x25C', '\t', '#', + '\x2', '\x2', '\x25C', '\xC6', '\x3', '\x2', '\x2', '\x2', '\x1A', '\x2', + '\x1BE', '\x1C3', '\x1C8', '\x1CE', '\x1D1', '\x1D5', '\x1DA', '\x1DC', + '\x1DF', '\x1E5', '\x1E9', '\x1EE', '\x1F0', '\x1F2', '\x1F7', '\x1F9', + '\x200', '\x202', '\x206', '\x20B', '\x21D', '\x21F', '\x222', '\x3', + '\b', '\x2', '\x2', }; public static readonly ATN _ATN = diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs index 53293f9382..e68b8e18f5 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/sqlParser.cs @@ -40,11 +40,11 @@ public const int T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, T__24=25, T__25=26, T__26=27, K_ALL=28, K_AND=29, K_ARRAY=30, K_AS=31, K_ASC=32, K_BETWEEN=33, K_BY=34, K_DESC=35, K_DISTINCT=36, K_ESCAPE=37, - K_EXISTS=38, K_FALSE=39, K_FROM=40, K_GROUP=41, K_IN=42, K_JOIN=43, K_LEFT=44, - K_LIKE=45, K_LIMIT=46, K_NOT=47, K_NULL=48, K_OFFSET=49, K_OR=50, K_ORDER=51, - K_RIGHT=52, K_SELECT=53, K_TOP=54, K_TRUE=55, K_UDF=56, K_UNDEFINED=57, - K_VALUE=58, K_WHERE=59, WS=60, NUMERIC_LITERAL=61, STRING_LITERAL=62, - LEX_IDENTIFIER=63, PARAMETER=64; + K_EXISTS=38, K_FIRST=39, K_FALSE=40, K_FROM=41, K_GROUP=42, K_IN=43, K_JOIN=44, + K_LAST=45, K_LEFT=46, K_LIKE=47, K_LIMIT=48, K_NOT=49, K_NULL=50, K_OFFSET=51, + K_OR=52, K_ORDER=53, K_RIGHT=54, K_SELECT=55, K_TOP=56, K_TRUE=57, K_UDF=58, + K_UNDEFINED=59, K_VALUE=60, K_WHERE=61, WS=62, NUMERIC_LITERAL=63, STRING_LITERAL=64, + LEX_IDENTIFIER=65, PARAMETER=66; public const int RULE_program = 0, RULE_sql_query = 1, RULE_select_clause = 2, RULE_top_spec = 3, RULE_selection = 4, RULE_select_star_spec = 5, RULE_select_value_spec = 6, @@ -81,19 +81,20 @@ public const int null, "'*'", "','", "'('", "')'", "'.'", "'['", "']'", "'?'", "':'", "'??'", "'/'", "'%'", "'+'", "'-'", "'<'", "'>'", "'>='", "'<='", "'='", "'!='", "'&'", "'^'", "'|'", "'||'", "'~'", "'{'", "'}'", null, null, null, null, - null, null, null, null, null, null, null, "'false'", null, null, null, - null, null, null, null, null, "'null'", null, null, null, null, null, - null, "'true'", "'udf'", "'undefined'" + null, null, null, null, null, null, null, null, "'false'", null, null, + null, null, null, null, null, null, null, "'null'", null, null, null, + null, null, null, "'true'", "'udf'", "'undefined'" }; private static readonly string[] _SymbolicNames = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "K_ALL", "K_AND", "K_ARRAY", "K_AS", "K_ASC", - "K_BETWEEN", "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FALSE", - "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LEFT", "K_LIKE", "K_LIMIT", - "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", "K_RIGHT", "K_SELECT", - "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", "K_WHERE", "WS", - "NUMERIC_LITERAL", "STRING_LITERAL", "LEX_IDENTIFIER", "PARAMETER" + "K_BETWEEN", "K_BY", "K_DESC", "K_DISTINCT", "K_ESCAPE", "K_EXISTS", "K_FIRST", + "K_FALSE", "K_FROM", "K_GROUP", "K_IN", "K_JOIN", "K_LAST", "K_LEFT", + "K_LIKE", "K_LIMIT", "K_NOT", "K_NULL", "K_OFFSET", "K_OR", "K_ORDER", + "K_RIGHT", "K_SELECT", "K_TOP", "K_TRUE", "K_UDF", "K_UNDEFINED", "K_VALUE", + "K_WHERE", "WS", "NUMERIC_LITERAL", "STRING_LITERAL", "LEX_IDENTIFIER", + "PARAMETER" }; public static readonly IVocabulary DefaultVocabulary = new Vocabulary(_LiteralNames, _SymbolicNames); @@ -463,7 +464,9 @@ public SelectionContext selection() { case K_ALL: case K_ARRAY: case K_EXISTS: + case K_FIRST: case K_FALSE: + case K_LAST: case K_LEFT: case K_NOT: case K_NULL: @@ -994,6 +997,8 @@ public CollectionContext collection() { ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case K_ALL: + case K_FIRST: + case K_LAST: case LEX_IDENTIFIER: _localctx = new InputPathCollectionContext(_localctx); EnterOuterAlt(_localctx, 1); @@ -2808,7 +2813,9 @@ public Unary_scalar_expressionContext unary_scalar_expression() { case K_ALL: case K_ARRAY: case K_EXISTS: + case K_FIRST: case K_FALSE: + case K_LAST: case K_LEFT: case K_NULL: case K_RIGHT: @@ -2971,6 +2978,26 @@ public override TResult Accept(IParseTreeVisitor visitor) { else return visitor.VisitChildren(this); } } + public partial class FirstScalarExpressionContext : Primary_expressionContext { + public ITerminalNode K_FIRST() { return GetToken(sqlParser.K_FIRST, 0); } + public Sql_queryContext sql_query() { + return GetRuleContext(0); + } + public FirstScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterFirstScalarExpression(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitFirstScalarExpression(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitFirstScalarExpression(this); + else return visitor.VisitChildren(this); + } + } public partial class ArrayCreateScalarExpressionContext : Primary_expressionContext { public Scalar_expression_listContext scalar_expression_list() { return GetRuleContext(0); @@ -3145,6 +3172,26 @@ public override TResult Accept(IParseTreeVisitor visitor) { else return visitor.VisitChildren(this); } } + public partial class LastScalarExpressionContext : Primary_expressionContext { + public ITerminalNode K_LAST() { return GetToken(sqlParser.K_LAST, 0); } + public Sql_queryContext sql_query() { + return GetRuleContext(0); + } + public LastScalarExpressionContext(Primary_expressionContext context) { CopyFrom(context); } + public override void EnterRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.EnterLastScalarExpression(this); + } + public override void ExitRule(IParseTreeListener listener) { + IsqlListener typedListener = listener as IsqlListener; + if (typedListener != null) typedListener.ExitLastScalarExpression(this); + } + public override TResult Accept(IParseTreeVisitor visitor) { + IsqlVisitor typedVisitor = visitor as IsqlVisitor; + if (typedVisitor != null) return typedVisitor.VisitLastScalarExpression(this); + else return visitor.VisitChildren(this); + } + } public partial class PropertyRefScalarExpressionRecursiveContext : Primary_expressionContext { public Primary_expressionContext primary_expression() { return GetRuleContext(0); @@ -3185,7 +3232,7 @@ private Primary_expressionContext primary_expression(int _p) { int _alt; EnterOuterAlt(_localctx, 1); { - State = 397; + State = 407; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,35,Context) ) { case 1: @@ -3222,7 +3269,7 @@ private Primary_expressionContext primary_expression(int _p) { State = 365; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FIRST - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LAST - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { { State = 364; scalar_expression_list(); } @@ -3303,16 +3350,38 @@ private Primary_expressionContext primary_expression(int _p) { } break; case 11: + { + _localctx = new FirstScalarExpressionContext(_localctx); + Context = _localctx; + _prevctx = _localctx; + State = 396; Match(K_FIRST); + State = 397; Match(T__2); + State = 398; sql_query(); + State = 399; Match(T__3); + } + break; + case 12: + { + _localctx = new LastScalarExpressionContext(_localctx); + Context = _localctx; + _prevctx = _localctx; + State = 401; Match(K_LAST); + State = 402; Match(T__2); + State = 403; sql_query(); + State = 404; Match(T__3); + } + break; + case 13: { _localctx = new FunctionCallScalarExpressionContext(_localctx); Context = _localctx; _prevctx = _localctx; - State = 396; function_call_scalar_expression(); + State = 406; function_call_scalar_expression(); } break; } Context.Stop = TokenStream.LT(-1); - State = 409; + State = 419; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,37,Context); while ( _alt!=2 && _alt!=global::Antlr4.Runtime.Atn.ATN.INVALID_ALT_NUMBER ) { @@ -3321,34 +3390,34 @@ private Primary_expressionContext primary_expression(int _p) { TriggerExitRuleEvent(); _prevctx = _localctx; { - State = 407; + State = 417; ErrorHandler.Sync(this); switch ( Interpreter.AdaptivePredict(TokenStream,36,Context) ) { case 1: { _localctx = new PropertyRefScalarExpressionRecursiveContext(new Primary_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_primary_expression); - State = 399; - if (!(Precpred(Context, 6))) throw new FailedPredicateException(this, "Precpred(Context, 6)"); - State = 400; Match(T__4); - State = 401; identifier(); + State = 409; + if (!(Precpred(Context, 8))) throw new FailedPredicateException(this, "Precpred(Context, 8)"); + State = 410; Match(T__4); + State = 411; identifier(); } break; case 2: { _localctx = new MemberIndexerScalarExpressionContext(new Primary_expressionContext(_parentctx, _parentState)); PushNewRecursionContext(_localctx, _startState, RULE_primary_expression); - State = 402; - if (!(Precpred(Context, 5))) throw new FailedPredicateException(this, "Precpred(Context, 5)"); - State = 403; Match(T__5); - State = 404; scalar_expression(0); - State = 405; Match(T__6); + State = 412; + if (!(Precpred(Context, 7))) throw new FailedPredicateException(this, "Precpred(Context, 7)"); + State = 413; Match(T__5); + State = 414; scalar_expression(0); + State = 415; Match(T__6); } break; } } } - State = 411; + State = 421; ErrorHandler.Sync(this); _alt = Interpreter.AdaptivePredict(TokenStream,37,Context); } @@ -3401,70 +3470,72 @@ public Function_call_scalar_expressionContext function_call_scalar_expression() EnterRule(_localctx, 78, RULE_function_call_scalar_expression); int _la; try { - State = 435; + State = 445; ErrorHandler.Sync(this); switch (TokenStream.LA(1)) { case K_ALL: + case K_FIRST: + case K_LAST: case K_UDF: case LEX_IDENTIFIER: EnterOuterAlt(_localctx, 1); { - State = 414; + State = 424; ErrorHandler.Sync(this); _la = TokenStream.LA(1); if (_la==K_UDF) { { - State = 412; Match(K_UDF); - State = 413; Match(T__4); + State = 422; Match(K_UDF); + State = 423; Match(T__4); } } - State = 416; identifier(); - State = 417; Match(T__2); - State = 419; + State = 426; identifier(); + State = 427; Match(T__2); + State = 429; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FIRST - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LAST - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { { - State = 418; scalar_expression_list(); + State = 428; scalar_expression_list(); } } - State = 421; Match(T__3); + State = 431; Match(T__3); } break; case K_LEFT: EnterOuterAlt(_localctx, 2); { - State = 423; Match(K_LEFT); - State = 424; Match(T__2); - State = 426; + State = 433; Match(K_LEFT); + State = 434; Match(T__2); + State = 436; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FIRST - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LAST - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { { - State = 425; scalar_expression_list(); + State = 435; scalar_expression_list(); } } - State = 428; Match(T__3); + State = 438; Match(T__3); } break; case K_RIGHT: EnterOuterAlt(_localctx, 3); { - State = 429; Match(K_RIGHT); - State = 430; Match(T__2); - State = 432; + State = 439; Match(K_RIGHT); + State = 440; Match(T__2); + State = 442; ErrorHandler.Sync(this); _la = TokenStream.LA(1); - if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { + if (((((_la - 3)) & ~0x3f) == 0 && ((1L << (_la - 3)) & ((1L << (T__2 - 3)) | (1L << (T__5 - 3)) | (1L << (T__12 - 3)) | (1L << (T__13 - 3)) | (1L << (T__24 - 3)) | (1L << (T__25 - 3)) | (1L << (K_ALL - 3)) | (1L << (K_ARRAY - 3)) | (1L << (K_EXISTS - 3)) | (1L << (K_FIRST - 3)) | (1L << (K_FALSE - 3)) | (1L << (K_LAST - 3)) | (1L << (K_LEFT - 3)) | (1L << (K_NOT - 3)) | (1L << (K_NULL - 3)) | (1L << (K_RIGHT - 3)) | (1L << (K_TRUE - 3)) | (1L << (K_UDF - 3)) | (1L << (K_UNDEFINED - 3)) | (1L << (NUMERIC_LITERAL - 3)) | (1L << (STRING_LITERAL - 3)) | (1L << (LEX_IDENTIFIER - 3)) | (1L << (PARAMETER - 3)))) != 0)) { { - State = 431; scalar_expression_list(); + State = 441; scalar_expression_list(); } } - State = 434; Match(T__3); + State = 444; Match(T__3); } break; default: @@ -3517,18 +3588,18 @@ public Scalar_expression_listContext scalar_expression_list() { try { EnterOuterAlt(_localctx, 1); { - State = 437; scalar_expression(0); - State = 442; + State = 447; scalar_expression(0); + State = 452; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==T__1) { { { - State = 438; Match(T__1); - State = 439; scalar_expression(0); + State = 448; Match(T__1); + State = 449; scalar_expression(0); } } - State = 444; + State = 454; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -3580,18 +3651,18 @@ public Object_property_listContext object_property_list() { try { EnterOuterAlt(_localctx, 1); { - State = 445; object_property(); - State = 450; + State = 455; object_property(); + State = 460; ErrorHandler.Sync(this); _la = TokenStream.LA(1); while (_la==T__1) { { { - State = 446; Match(T__1); - State = 447; object_property(); + State = 456; Match(T__1); + State = 457; object_property(); } } - State = 452; + State = 462; ErrorHandler.Sync(this); _la = TokenStream.LA(1); } @@ -3640,9 +3711,9 @@ public Object_propertyContext object_property() { try { EnterOuterAlt(_localctx, 1); { - State = 453; Match(STRING_LITERAL); - State = 454; Match(T__8); - State = 455; scalar_expression(0); + State = 463; Match(STRING_LITERAL); + State = 464; Match(T__8); + State = 465; scalar_expression(0); } } catch (RecognitionException re) { @@ -3659,6 +3730,8 @@ public Object_propertyContext object_property() { public partial class IdentifierContext : ParserRuleContext { public ITerminalNode LEX_IDENTIFIER() { return GetToken(sqlParser.LEX_IDENTIFIER, 0); } public ITerminalNode K_ALL() { return GetToken(sqlParser.K_ALL, 0); } + public ITerminalNode K_FIRST() { return GetToken(sqlParser.K_FIRST, 0); } + public ITerminalNode K_LAST() { return GetToken(sqlParser.K_LAST, 0); } public IdentifierContext(ParserRuleContext parent, int invokingState) : base(parent, invokingState) { @@ -3687,9 +3760,9 @@ public IdentifierContext identifier() { try { EnterOuterAlt(_localctx, 1); { - State = 457; + State = 467; _la = TokenStream.LA(1); - if ( !(_la==K_ALL || _la==LEX_IDENTIFIER) ) { + if ( !(((((_la - 28)) & ~0x3f) == 0 && ((1L << (_la - 28)) & ((1L << (K_ALL - 28)) | (1L << (K_FIRST - 28)) | (1L << (K_LAST - 28)) | (1L << (LEX_IDENTIFIER - 28)))) != 0)) ) { ErrorHandler.RecoverInline(this); } else { @@ -3744,9 +3817,9 @@ public LiteralContext literal() { try { EnterOuterAlt(_localctx, 1); { - State = 459; + State = 469; _la = TokenStream.LA(1); - if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << K_FALSE) | (1L << K_NULL) | (1L << K_TRUE) | (1L << K_UNDEFINED) | (1L << NUMERIC_LITERAL) | (1L << STRING_LITERAL))) != 0)) ) { + if ( !(((((_la - 40)) & ~0x3f) == 0 && ((1L << (_la - 40)) & ((1L << (K_FALSE - 40)) | (1L << (K_NULL - 40)) | (1L << (K_TRUE - 40)) | (1L << (K_UNDEFINED - 40)) | (1L << (NUMERIC_LITERAL - 40)) | (1L << (STRING_LITERAL - 40)))) != 0)) ) { ErrorHandler.RecoverInline(this); } else { @@ -3820,15 +3893,15 @@ private bool binary_scalar_expression_sempred(Binary_scalar_expressionContext _l } private bool primary_expression_sempred(Primary_expressionContext _localctx, int predIndex) { switch (predIndex) { - case 16: return Precpred(Context, 6); - case 17: return Precpred(Context, 5); + case 16: return Precpred(Context, 8); + case 17: return Precpred(Context, 7); } return true; } private static char[] _serializedATN = { '\x3', '\x608B', '\xA72A', '\x8133', '\xB9ED', '\x417C', '\x3BE7', '\x7786', - '\x5964', '\x3', '\x42', '\x1D0', '\x4', '\x2', '\t', '\x2', '\x4', '\x3', + '\x5964', '\x3', '\x44', '\x1DA', '\x4', '\x2', '\t', '\x2', '\x4', '\x3', '\t', '\x3', '\x4', '\x4', '\t', '\x4', '\x4', '\x5', '\t', '\x5', '\x4', '\x6', '\t', '\x6', '\x4', '\a', '\t', '\a', '\x4', '\b', '\t', '\b', '\x4', '\t', '\t', '\t', '\x4', '\n', '\t', '\n', '\x4', '\v', '\t', '\v', @@ -3906,29 +3979,31 @@ private bool primary_expression_sempred(Primary_expressionContext _localctx, int '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', - '\x3', '(', '\x3', '(', '\x5', '(', '\x190', '\n', '(', '\x3', '(', '\x3', - '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', - '(', '\a', '(', '\x19A', '\n', '(', '\f', '(', '\xE', '(', '\x19D', '\v', - '(', '\x3', ')', '\x3', ')', '\x5', ')', '\x1A1', '\n', ')', '\x3', ')', - '\x3', ')', '\x3', ')', '\x5', ')', '\x1A6', '\n', ')', '\x3', ')', '\x3', - ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x5', ')', '\x1AD', '\n', ')', - '\x3', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x5', ')', '\x1B3', '\n', - ')', '\x3', ')', '\x5', ')', '\x1B6', '\n', ')', '\x3', '*', '\x3', '*', - '\x3', '*', '\a', '*', '\x1BB', '\n', '*', '\f', '*', '\xE', '*', '\x1BE', - '\v', '*', '\x3', '+', '\x3', '+', '\x3', '+', '\a', '+', '\x1C3', '\n', - '+', '\f', '+', '\xE', '+', '\x1C6', '\v', '+', '\x3', ',', '\x3', ',', - '\x3', ',', '\x3', ',', '\x3', '-', '\x3', '-', '\x3', '.', '\x3', '.', - '\x3', '.', '\x2', '\b', '\x16', '\x1A', '.', '\x30', '\x38', 'N', '/', - '\x2', '\x4', '\x6', '\b', '\n', '\f', '\xE', '\x10', '\x12', '\x14', - '\x16', '\x18', '\x1A', '\x1C', '\x1E', ' ', '\"', '$', '&', '(', '*', - ',', '.', '\x30', '\x32', '\x34', '\x36', '\x38', ':', '<', '>', '@', - '\x42', '\x44', '\x46', 'H', 'J', 'L', 'N', 'P', 'R', 'T', 'V', 'X', 'Z', - '\x2', '\v', '\x4', '\x2', '?', '?', '\x42', '\x42', '\x4', '\x2', '\"', - '\"', '%', '%', '\x4', '\x2', '\x3', '\x3', '\r', '\xE', '\x3', '\x2', - '\xF', '\x10', '\x3', '\x2', '\x11', '\x14', '\x3', '\x2', '\x15', '\x16', - '\x5', '\x2', '\xF', '\x10', '\x1B', '\x1B', '\x31', '\x31', '\x4', '\x2', - '\x1E', '\x1E', '\x41', '\x41', '\a', '\x2', ')', ')', '\x32', '\x32', - '\x39', '\x39', ';', ';', '?', '@', '\x2', '\x1E2', '\x2', '\\', '\x3', + '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', + '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', + '\x5', '(', '\x19A', '\n', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', + '(', '\x3', '(', '\x3', '(', '\x3', '(', '\x3', '(', '\a', '(', '\x1A4', + '\n', '(', '\f', '(', '\xE', '(', '\x1A7', '\v', '(', '\x3', ')', '\x3', + ')', '\x5', ')', '\x1AB', '\n', ')', '\x3', ')', '\x3', ')', '\x3', ')', + '\x5', ')', '\x1B0', '\n', ')', '\x3', ')', '\x3', ')', '\x3', ')', '\x3', + ')', '\x3', ')', '\x5', ')', '\x1B7', '\n', ')', '\x3', ')', '\x3', ')', + '\x3', ')', '\x3', ')', '\x5', ')', '\x1BD', '\n', ')', '\x3', ')', '\x5', + ')', '\x1C0', '\n', ')', '\x3', '*', '\x3', '*', '\x3', '*', '\a', '*', + '\x1C5', '\n', '*', '\f', '*', '\xE', '*', '\x1C8', '\v', '*', '\x3', + '+', '\x3', '+', '\x3', '+', '\a', '+', '\x1CD', '\n', '+', '\f', '+', + '\xE', '+', '\x1D0', '\v', '+', '\x3', ',', '\x3', ',', '\x3', ',', '\x3', + ',', '\x3', '-', '\x3', '-', '\x3', '.', '\x3', '.', '\x3', '.', '\x2', + '\b', '\x16', '\x1A', '.', '\x30', '\x38', 'N', '/', '\x2', '\x4', '\x6', + '\b', '\n', '\f', '\xE', '\x10', '\x12', '\x14', '\x16', '\x18', '\x1A', + '\x1C', '\x1E', ' ', '\"', '$', '&', '(', '*', ',', '.', '\x30', '\x32', + '\x34', '\x36', '\x38', ':', '<', '>', '@', '\x42', '\x44', '\x46', 'H', + 'J', 'L', 'N', 'P', 'R', 'T', 'V', 'X', 'Z', '\x2', '\v', '\x4', '\x2', + '\x41', '\x41', '\x44', '\x44', '\x4', '\x2', '\"', '\"', '%', '%', '\x4', + '\x2', '\x3', '\x3', '\r', '\xE', '\x3', '\x2', '\xF', '\x10', '\x3', + '\x2', '\x11', '\x14', '\x3', '\x2', '\x15', '\x16', '\x5', '\x2', '\xF', + '\x10', '\x1B', '\x1B', '\x33', '\x33', '\x6', '\x2', '\x1E', '\x1E', + ')', ')', '/', '/', '\x43', '\x43', '\a', '\x2', '*', '*', '\x34', '\x34', + ';', ';', '=', '=', '\x41', '\x42', '\x2', '\x1EE', '\x2', '\\', '\x3', '\x2', '\x2', '\x2', '\x4', '_', '\x3', '\x2', '\x2', '\x2', '\x6', 'o', '\x3', '\x2', '\x2', '\x2', '\b', 'x', '\x3', '\x2', '\x2', '\x2', '\n', '~', '\x3', '\x2', '\x2', '\x2', '\f', '\x80', '\x3', '\x2', '\x2', '\x2', @@ -3950,11 +4025,11 @@ private bool primary_expression_sempred(Primary_expressionContext _localctx, int '\x2', '\x2', '\x2', '\x42', '\x159', '\x3', '\x2', '\x2', '\x2', '\x44', '\x15B', '\x3', '\x2', '\x2', '\x2', '\x46', '\x15D', '\x3', '\x2', '\x2', '\x2', 'H', '\x15F', '\x3', '\x2', '\x2', '\x2', 'J', '\x165', '\x3', - '\x2', '\x2', '\x2', 'L', '\x167', '\x3', '\x2', '\x2', '\x2', 'N', '\x18F', - '\x3', '\x2', '\x2', '\x2', 'P', '\x1B5', '\x3', '\x2', '\x2', '\x2', - 'R', '\x1B7', '\x3', '\x2', '\x2', '\x2', 'T', '\x1BF', '\x3', '\x2', - '\x2', '\x2', 'V', '\x1C7', '\x3', '\x2', '\x2', '\x2', 'X', '\x1CB', - '\x3', '\x2', '\x2', '\x2', 'Z', '\x1CD', '\x3', '\x2', '\x2', '\x2', + '\x2', '\x2', '\x2', 'L', '\x167', '\x3', '\x2', '\x2', '\x2', 'N', '\x199', + '\x3', '\x2', '\x2', '\x2', 'P', '\x1BF', '\x3', '\x2', '\x2', '\x2', + 'R', '\x1C1', '\x3', '\x2', '\x2', '\x2', 'T', '\x1C9', '\x3', '\x2', + '\x2', '\x2', 'V', '\x1D1', '\x3', '\x2', '\x2', '\x2', 'X', '\x1D5', + '\x3', '\x2', '\x2', '\x2', 'Z', '\x1D7', '\x3', '\x2', '\x2', '\x2', '\\', ']', '\x5', '\x4', '\x3', '\x2', ']', '^', '\a', '\x2', '\x2', '\x3', '^', '\x3', '\x3', '\x2', '\x2', '\x2', '_', '\x61', '\x5', '\x6', '\x4', '\x2', '`', '\x62', '\x5', '\x14', '\v', '\x2', '\x61', '`', '\x3', '\x2', @@ -3968,89 +4043,89 @@ private bool primary_expression_sempred(Primary_expressionContext _localctx, int 'j', 'k', '\x3', '\x2', '\x2', '\x2', 'k', 'm', '\x3', '\x2', '\x2', '\x2', 'l', 'n', '\x5', '(', '\x15', '\x2', 'm', 'l', '\x3', '\x2', '\x2', '\x2', 'm', 'n', '\x3', '\x2', '\x2', '\x2', 'n', '\x5', '\x3', '\x2', '\x2', - '\x2', 'o', 'q', '\a', '\x37', '\x2', '\x2', 'p', 'r', '\a', '&', '\x2', + '\x2', 'o', 'q', '\a', '\x39', '\x2', '\x2', 'p', 'r', '\a', '&', '\x2', '\x2', 'q', 'p', '\x3', '\x2', '\x2', '\x2', 'q', 'r', '\x3', '\x2', '\x2', '\x2', 'r', 't', '\x3', '\x2', '\x2', '\x2', 's', 'u', '\x5', '\b', '\x5', '\x2', 't', 's', '\x3', '\x2', '\x2', '\x2', 't', 'u', '\x3', '\x2', '\x2', '\x2', 'u', 'v', '\x3', '\x2', '\x2', '\x2', 'v', 'w', '\x5', '\n', '\x6', - '\x2', 'w', '\a', '\x3', '\x2', '\x2', '\x2', 'x', 'y', '\a', '\x38', - '\x2', '\x2', 'y', 'z', '\t', '\x2', '\x2', '\x2', 'z', '\t', '\x3', '\x2', - '\x2', '\x2', '{', '\x7F', '\x5', '\f', '\a', '\x2', '|', '\x7F', '\x5', - '\xE', '\b', '\x2', '}', '\x7F', '\x5', '\x10', '\t', '\x2', '~', '{', - '\x3', '\x2', '\x2', '\x2', '~', '|', '\x3', '\x2', '\x2', '\x2', '~', - '}', '\x3', '\x2', '\x2', '\x2', '\x7F', '\v', '\x3', '\x2', '\x2', '\x2', - '\x80', '\x81', '\a', '\x3', '\x2', '\x2', '\x81', '\r', '\x3', '\x2', - '\x2', '\x2', '\x82', '\x83', '\a', '<', '\x2', '\x2', '\x83', '\x84', - '\x5', '.', '\x18', '\x2', '\x84', '\xF', '\x3', '\x2', '\x2', '\x2', - '\x85', '\x8A', '\x5', '\x12', '\n', '\x2', '\x86', '\x87', '\a', '\x4', - '\x2', '\x2', '\x87', '\x89', '\x5', '\x12', '\n', '\x2', '\x88', '\x86', - '\x3', '\x2', '\x2', '\x2', '\x89', '\x8C', '\x3', '\x2', '\x2', '\x2', - '\x8A', '\x88', '\x3', '\x2', '\x2', '\x2', '\x8A', '\x8B', '\x3', '\x2', - '\x2', '\x2', '\x8B', '\x11', '\x3', '\x2', '\x2', '\x2', '\x8C', '\x8A', - '\x3', '\x2', '\x2', '\x2', '\x8D', '\x90', '\x5', '.', '\x18', '\x2', - '\x8E', '\x8F', '\a', '!', '\x2', '\x2', '\x8F', '\x91', '\x5', 'X', '-', - '\x2', '\x90', '\x8E', '\x3', '\x2', '\x2', '\x2', '\x90', '\x91', '\x3', - '\x2', '\x2', '\x2', '\x91', '\x13', '\x3', '\x2', '\x2', '\x2', '\x92', - '\x93', '\a', '*', '\x2', '\x2', '\x93', '\x94', '\x5', '\x16', '\f', - '\x2', '\x94', '\x15', '\x3', '\x2', '\x2', '\x2', '\x95', '\x96', '\b', - '\f', '\x1', '\x2', '\x96', '\x9B', '\x5', '\x18', '\r', '\x2', '\x97', - '\x99', '\a', '!', '\x2', '\x2', '\x98', '\x97', '\x3', '\x2', '\x2', - '\x2', '\x98', '\x99', '\x3', '\x2', '\x2', '\x2', '\x99', '\x9A', '\x3', - '\x2', '\x2', '\x2', '\x9A', '\x9C', '\x5', 'X', '-', '\x2', '\x9B', '\x98', - '\x3', '\x2', '\x2', '\x2', '\x9B', '\x9C', '\x3', '\x2', '\x2', '\x2', - '\x9C', '\xA2', '\x3', '\x2', '\x2', '\x2', '\x9D', '\x9E', '\x5', 'X', - '-', '\x2', '\x9E', '\x9F', '\a', ',', '\x2', '\x2', '\x9F', '\xA0', '\x5', - '\x18', '\r', '\x2', '\xA0', '\xA2', '\x3', '\x2', '\x2', '\x2', '\xA1', - '\x95', '\x3', '\x2', '\x2', '\x2', '\xA1', '\x9D', '\x3', '\x2', '\x2', - '\x2', '\xA2', '\xA8', '\x3', '\x2', '\x2', '\x2', '\xA3', '\xA4', '\f', - '\x3', '\x2', '\x2', '\xA4', '\xA5', '\a', '-', '\x2', '\x2', '\xA5', - '\xA7', '\x5', '\x16', '\f', '\x4', '\xA6', '\xA3', '\x3', '\x2', '\x2', - '\x2', '\xA7', '\xAA', '\x3', '\x2', '\x2', '\x2', '\xA8', '\xA6', '\x3', - '\x2', '\x2', '\x2', '\xA8', '\xA9', '\x3', '\x2', '\x2', '\x2', '\xA9', - '\x17', '\x3', '\x2', '\x2', '\x2', '\xAA', '\xA8', '\x3', '\x2', '\x2', - '\x2', '\xAB', '\xAD', '\x5', 'X', '-', '\x2', '\xAC', '\xAE', '\x5', - '\x1A', '\xE', '\x2', '\xAD', '\xAC', '\x3', '\x2', '\x2', '\x2', '\xAD', - '\xAE', '\x3', '\x2', '\x2', '\x2', '\xAE', '\xB4', '\x3', '\x2', '\x2', - '\x2', '\xAF', '\xB0', '\a', '\x5', '\x2', '\x2', '\xB0', '\xB1', '\x5', - '\x4', '\x3', '\x2', '\xB1', '\xB2', '\a', '\x6', '\x2', '\x2', '\xB2', - '\xB4', '\x3', '\x2', '\x2', '\x2', '\xB3', '\xAB', '\x3', '\x2', '\x2', - '\x2', '\xB3', '\xAF', '\x3', '\x2', '\x2', '\x2', '\xB4', '\x19', '\x3', - '\x2', '\x2', '\x2', '\xB5', '\xC3', '\b', '\xE', '\x1', '\x2', '\xB6', - '\xB7', '\f', '\x6', '\x2', '\x2', '\xB7', '\xB8', '\a', '\a', '\x2', - '\x2', '\xB8', '\xC2', '\x5', 'X', '-', '\x2', '\xB9', '\xBA', '\f', '\x5', - '\x2', '\x2', '\xBA', '\xBB', '\a', '\b', '\x2', '\x2', '\xBB', '\xBC', - '\a', '?', '\x2', '\x2', '\xBC', '\xC2', '\a', '\t', '\x2', '\x2', '\xBD', - '\xBE', '\f', '\x4', '\x2', '\x2', '\xBE', '\xBF', '\a', '\b', '\x2', - '\x2', '\xBF', '\xC0', '\a', '@', '\x2', '\x2', '\xC0', '\xC2', '\a', - '\t', '\x2', '\x2', '\xC1', '\xB6', '\x3', '\x2', '\x2', '\x2', '\xC1', - '\xB9', '\x3', '\x2', '\x2', '\x2', '\xC1', '\xBD', '\x3', '\x2', '\x2', - '\x2', '\xC2', '\xC5', '\x3', '\x2', '\x2', '\x2', '\xC3', '\xC1', '\x3', - '\x2', '\x2', '\x2', '\xC3', '\xC4', '\x3', '\x2', '\x2', '\x2', '\xC4', - '\x1B', '\x3', '\x2', '\x2', '\x2', '\xC5', '\xC3', '\x3', '\x2', '\x2', - '\x2', '\xC6', '\xC7', '\a', '=', '\x2', '\x2', '\xC7', '\xC8', '\x5', - '.', '\x18', '\x2', '\xC8', '\x1D', '\x3', '\x2', '\x2', '\x2', '\xC9', - '\xCA', '\a', '+', '\x2', '\x2', '\xCA', '\xCB', '\a', '$', '\x2', '\x2', - '\xCB', '\xCC', '\x5', 'R', '*', '\x2', '\xCC', '\x1F', '\x3', '\x2', - '\x2', '\x2', '\xCD', '\xCE', '\a', '\x35', '\x2', '\x2', '\xCE', '\xCF', - '\a', '$', '\x2', '\x2', '\xCF', '\xD0', '\x5', '\"', '\x12', '\x2', '\xD0', - '!', '\x3', '\x2', '\x2', '\x2', '\xD1', '\xD6', '\x5', '$', '\x13', '\x2', - '\xD2', '\xD3', '\a', '\x4', '\x2', '\x2', '\xD3', '\xD5', '\x5', '$', - '\x13', '\x2', '\xD4', '\xD2', '\x3', '\x2', '\x2', '\x2', '\xD5', '\xD8', - '\x3', '\x2', '\x2', '\x2', '\xD6', '\xD4', '\x3', '\x2', '\x2', '\x2', - '\xD6', '\xD7', '\x3', '\x2', '\x2', '\x2', '\xD7', '#', '\x3', '\x2', - '\x2', '\x2', '\xD8', '\xD6', '\x3', '\x2', '\x2', '\x2', '\xD9', '\xDB', - '\x5', '.', '\x18', '\x2', '\xDA', '\xDC', '\x5', '&', '\x14', '\x2', - '\xDB', '\xDA', '\x3', '\x2', '\x2', '\x2', '\xDB', '\xDC', '\x3', '\x2', - '\x2', '\x2', '\xDC', '%', '\x3', '\x2', '\x2', '\x2', '\xDD', '\xDE', - '\t', '\x3', '\x2', '\x2', '\xDE', '\'', '\x3', '\x2', '\x2', '\x2', '\xDF', - '\xE0', '\a', '\x33', '\x2', '\x2', '\xE0', '\xE1', '\x5', '*', '\x16', - '\x2', '\xE1', '\xE2', '\a', '\x30', '\x2', '\x2', '\xE2', '\xE3', '\x5', + '\x2', 'w', '\a', '\x3', '\x2', '\x2', '\x2', 'x', 'y', '\a', ':', '\x2', + '\x2', 'y', 'z', '\t', '\x2', '\x2', '\x2', 'z', '\t', '\x3', '\x2', '\x2', + '\x2', '{', '\x7F', '\x5', '\f', '\a', '\x2', '|', '\x7F', '\x5', '\xE', + '\b', '\x2', '}', '\x7F', '\x5', '\x10', '\t', '\x2', '~', '{', '\x3', + '\x2', '\x2', '\x2', '~', '|', '\x3', '\x2', '\x2', '\x2', '~', '}', '\x3', + '\x2', '\x2', '\x2', '\x7F', '\v', '\x3', '\x2', '\x2', '\x2', '\x80', + '\x81', '\a', '\x3', '\x2', '\x2', '\x81', '\r', '\x3', '\x2', '\x2', + '\x2', '\x82', '\x83', '\a', '>', '\x2', '\x2', '\x83', '\x84', '\x5', + '.', '\x18', '\x2', '\x84', '\xF', '\x3', '\x2', '\x2', '\x2', '\x85', + '\x8A', '\x5', '\x12', '\n', '\x2', '\x86', '\x87', '\a', '\x4', '\x2', + '\x2', '\x87', '\x89', '\x5', '\x12', '\n', '\x2', '\x88', '\x86', '\x3', + '\x2', '\x2', '\x2', '\x89', '\x8C', '\x3', '\x2', '\x2', '\x2', '\x8A', + '\x88', '\x3', '\x2', '\x2', '\x2', '\x8A', '\x8B', '\x3', '\x2', '\x2', + '\x2', '\x8B', '\x11', '\x3', '\x2', '\x2', '\x2', '\x8C', '\x8A', '\x3', + '\x2', '\x2', '\x2', '\x8D', '\x90', '\x5', '.', '\x18', '\x2', '\x8E', + '\x8F', '\a', '!', '\x2', '\x2', '\x8F', '\x91', '\x5', 'X', '-', '\x2', + '\x90', '\x8E', '\x3', '\x2', '\x2', '\x2', '\x90', '\x91', '\x3', '\x2', + '\x2', '\x2', '\x91', '\x13', '\x3', '\x2', '\x2', '\x2', '\x92', '\x93', + '\a', '+', '\x2', '\x2', '\x93', '\x94', '\x5', '\x16', '\f', '\x2', '\x94', + '\x15', '\x3', '\x2', '\x2', '\x2', '\x95', '\x96', '\b', '\f', '\x1', + '\x2', '\x96', '\x9B', '\x5', '\x18', '\r', '\x2', '\x97', '\x99', '\a', + '!', '\x2', '\x2', '\x98', '\x97', '\x3', '\x2', '\x2', '\x2', '\x98', + '\x99', '\x3', '\x2', '\x2', '\x2', '\x99', '\x9A', '\x3', '\x2', '\x2', + '\x2', '\x9A', '\x9C', '\x5', 'X', '-', '\x2', '\x9B', '\x98', '\x3', + '\x2', '\x2', '\x2', '\x9B', '\x9C', '\x3', '\x2', '\x2', '\x2', '\x9C', + '\xA2', '\x3', '\x2', '\x2', '\x2', '\x9D', '\x9E', '\x5', 'X', '-', '\x2', + '\x9E', '\x9F', '\a', '-', '\x2', '\x2', '\x9F', '\xA0', '\x5', '\x18', + '\r', '\x2', '\xA0', '\xA2', '\x3', '\x2', '\x2', '\x2', '\xA1', '\x95', + '\x3', '\x2', '\x2', '\x2', '\xA1', '\x9D', '\x3', '\x2', '\x2', '\x2', + '\xA2', '\xA8', '\x3', '\x2', '\x2', '\x2', '\xA3', '\xA4', '\f', '\x3', + '\x2', '\x2', '\xA4', '\xA5', '\a', '.', '\x2', '\x2', '\xA5', '\xA7', + '\x5', '\x16', '\f', '\x4', '\xA6', '\xA3', '\x3', '\x2', '\x2', '\x2', + '\xA7', '\xAA', '\x3', '\x2', '\x2', '\x2', '\xA8', '\xA6', '\x3', '\x2', + '\x2', '\x2', '\xA8', '\xA9', '\x3', '\x2', '\x2', '\x2', '\xA9', '\x17', + '\x3', '\x2', '\x2', '\x2', '\xAA', '\xA8', '\x3', '\x2', '\x2', '\x2', + '\xAB', '\xAD', '\x5', 'X', '-', '\x2', '\xAC', '\xAE', '\x5', '\x1A', + '\xE', '\x2', '\xAD', '\xAC', '\x3', '\x2', '\x2', '\x2', '\xAD', '\xAE', + '\x3', '\x2', '\x2', '\x2', '\xAE', '\xB4', '\x3', '\x2', '\x2', '\x2', + '\xAF', '\xB0', '\a', '\x5', '\x2', '\x2', '\xB0', '\xB1', '\x5', '\x4', + '\x3', '\x2', '\xB1', '\xB2', '\a', '\x6', '\x2', '\x2', '\xB2', '\xB4', + '\x3', '\x2', '\x2', '\x2', '\xB3', '\xAB', '\x3', '\x2', '\x2', '\x2', + '\xB3', '\xAF', '\x3', '\x2', '\x2', '\x2', '\xB4', '\x19', '\x3', '\x2', + '\x2', '\x2', '\xB5', '\xC3', '\b', '\xE', '\x1', '\x2', '\xB6', '\xB7', + '\f', '\x6', '\x2', '\x2', '\xB7', '\xB8', '\a', '\a', '\x2', '\x2', '\xB8', + '\xC2', '\x5', 'X', '-', '\x2', '\xB9', '\xBA', '\f', '\x5', '\x2', '\x2', + '\xBA', '\xBB', '\a', '\b', '\x2', '\x2', '\xBB', '\xBC', '\a', '\x41', + '\x2', '\x2', '\xBC', '\xC2', '\a', '\t', '\x2', '\x2', '\xBD', '\xBE', + '\f', '\x4', '\x2', '\x2', '\xBE', '\xBF', '\a', '\b', '\x2', '\x2', '\xBF', + '\xC0', '\a', '\x42', '\x2', '\x2', '\xC0', '\xC2', '\a', '\t', '\x2', + '\x2', '\xC1', '\xB6', '\x3', '\x2', '\x2', '\x2', '\xC1', '\xB9', '\x3', + '\x2', '\x2', '\x2', '\xC1', '\xBD', '\x3', '\x2', '\x2', '\x2', '\xC2', + '\xC5', '\x3', '\x2', '\x2', '\x2', '\xC3', '\xC1', '\x3', '\x2', '\x2', + '\x2', '\xC3', '\xC4', '\x3', '\x2', '\x2', '\x2', '\xC4', '\x1B', '\x3', + '\x2', '\x2', '\x2', '\xC5', '\xC3', '\x3', '\x2', '\x2', '\x2', '\xC6', + '\xC7', '\a', '?', '\x2', '\x2', '\xC7', '\xC8', '\x5', '.', '\x18', '\x2', + '\xC8', '\x1D', '\x3', '\x2', '\x2', '\x2', '\xC9', '\xCA', '\a', ',', + '\x2', '\x2', '\xCA', '\xCB', '\a', '$', '\x2', '\x2', '\xCB', '\xCC', + '\x5', 'R', '*', '\x2', '\xCC', '\x1F', '\x3', '\x2', '\x2', '\x2', '\xCD', + '\xCE', '\a', '\x37', '\x2', '\x2', '\xCE', '\xCF', '\a', '$', '\x2', + '\x2', '\xCF', '\xD0', '\x5', '\"', '\x12', '\x2', '\xD0', '!', '\x3', + '\x2', '\x2', '\x2', '\xD1', '\xD6', '\x5', '$', '\x13', '\x2', '\xD2', + '\xD3', '\a', '\x4', '\x2', '\x2', '\xD3', '\xD5', '\x5', '$', '\x13', + '\x2', '\xD4', '\xD2', '\x3', '\x2', '\x2', '\x2', '\xD5', '\xD8', '\x3', + '\x2', '\x2', '\x2', '\xD6', '\xD4', '\x3', '\x2', '\x2', '\x2', '\xD6', + '\xD7', '\x3', '\x2', '\x2', '\x2', '\xD7', '#', '\x3', '\x2', '\x2', + '\x2', '\xD8', '\xD6', '\x3', '\x2', '\x2', '\x2', '\xD9', '\xDB', '\x5', + '.', '\x18', '\x2', '\xDA', '\xDC', '\x5', '&', '\x14', '\x2', '\xDB', + '\xDA', '\x3', '\x2', '\x2', '\x2', '\xDB', '\xDC', '\x3', '\x2', '\x2', + '\x2', '\xDC', '%', '\x3', '\x2', '\x2', '\x2', '\xDD', '\xDE', '\t', + '\x3', '\x2', '\x2', '\xDE', '\'', '\x3', '\x2', '\x2', '\x2', '\xDF', + '\xE0', '\a', '\x35', '\x2', '\x2', '\xE0', '\xE1', '\x5', '*', '\x16', + '\x2', '\xE1', '\xE2', '\a', '\x32', '\x2', '\x2', '\xE2', '\xE3', '\x5', ',', '\x17', '\x2', '\xE3', ')', '\x3', '\x2', '\x2', '\x2', '\xE4', '\xE5', '\t', '\x2', '\x2', '\x2', '\xE5', '+', '\x3', '\x2', '\x2', '\x2', '\xE6', '\xE7', '\t', '\x2', '\x2', '\x2', '\xE7', '-', '\x3', '\x2', '\x2', '\x2', '\xE8', '\xE9', '\b', '\x18', '\x1', '\x2', '\xE9', '\xF4', '\x5', '\x30', '\x19', '\x2', '\xEA', '\xEC', '\x5', '\x38', '\x1D', '\x2', '\xEB', '\xED', - '\a', '\x31', '\x2', '\x2', '\xEC', '\xEB', '\x3', '\x2', '\x2', '\x2', + '\a', '\x33', '\x2', '\x2', '\xEC', '\xEB', '\x3', '\x2', '\x2', '\x2', '\xEC', '\xED', '\x3', '\x2', '\x2', '\x2', '\xED', '\xEE', '\x3', '\x2', '\x2', '\x2', '\xEE', '\xEF', '\a', '#', '\x2', '\x2', '\xEF', '\xF0', '\x5', '\x38', '\x1D', '\x2', '\xF0', '\xF1', '\a', '\x1F', '\x2', '\x2', @@ -4074,27 +4149,27 @@ private bool primary_expression_sempred(Primary_expressionContext _localctx, int '\x2', '\x108', '\x111', '\x3', '\x2', '\x2', '\x2', '\x109', '\x10A', '\f', '\x4', '\x2', '\x2', '\x10A', '\x10B', '\a', '\x1F', '\x2', '\x2', '\x10B', '\x110', '\x5', '\x30', '\x19', '\x5', '\x10C', '\x10D', '\f', - '\x3', '\x2', '\x2', '\x10D', '\x10E', '\a', '\x34', '\x2', '\x2', '\x10E', + '\x3', '\x2', '\x2', '\x10D', '\x10E', '\a', '\x36', '\x2', '\x2', '\x10E', '\x110', '\x5', '\x30', '\x19', '\x4', '\x10F', '\x109', '\x3', '\x2', '\x2', '\x2', '\x10F', '\x10C', '\x3', '\x2', '\x2', '\x2', '\x110', '\x113', '\x3', '\x2', '\x2', '\x2', '\x111', '\x10F', '\x3', '\x2', '\x2', '\x2', '\x111', '\x112', '\x3', '\x2', '\x2', '\x2', '\x112', '\x31', '\x3', '\x2', '\x2', '\x2', '\x113', '\x111', '\x3', '\x2', '\x2', '\x2', '\x114', - '\x116', '\x5', '\x38', '\x1D', '\x2', '\x115', '\x117', '\a', '\x31', + '\x116', '\x5', '\x38', '\x1D', '\x2', '\x115', '\x117', '\a', '\x33', '\x2', '\x2', '\x116', '\x115', '\x3', '\x2', '\x2', '\x2', '\x116', '\x117', '\x3', '\x2', '\x2', '\x2', '\x117', '\x118', '\x3', '\x2', '\x2', '\x2', - '\x118', '\x119', '\a', ',', '\x2', '\x2', '\x119', '\x11A', '\a', '\x5', + '\x118', '\x119', '\a', '-', '\x2', '\x2', '\x119', '\x11A', '\a', '\x5', '\x2', '\x2', '\x11A', '\x11B', '\x5', 'R', '*', '\x2', '\x11B', '\x11C', '\a', '\x6', '\x2', '\x2', '\x11C', '\x33', '\x3', '\x2', '\x2', '\x2', '\x11D', '\x11F', '\x5', '\x38', '\x1D', '\x2', '\x11E', '\x120', '\a', - '\x31', '\x2', '\x2', '\x11F', '\x11E', '\x3', '\x2', '\x2', '\x2', '\x11F', + '\x33', '\x2', '\x2', '\x11F', '\x11E', '\x3', '\x2', '\x2', '\x2', '\x11F', '\x120', '\x3', '\x2', '\x2', '\x2', '\x120', '\x121', '\x3', '\x2', '\x2', - '\x2', '\x121', '\x122', '\a', '/', '\x2', '\x2', '\x122', '\x124', '\x5', - '\x38', '\x1D', '\x2', '\x123', '\x125', '\x5', '\x36', '\x1C', '\x2', - '\x124', '\x123', '\x3', '\x2', '\x2', '\x2', '\x124', '\x125', '\x3', - '\x2', '\x2', '\x2', '\x125', '\x35', '\x3', '\x2', '\x2', '\x2', '\x126', - '\x127', '\a', '\'', '\x2', '\x2', '\x127', '\x128', '\a', '@', '\x2', - '\x2', '\x128', '\x37', '\x3', '\x2', '\x2', '\x2', '\x129', '\x12A', + '\x2', '\x121', '\x122', '\a', '\x31', '\x2', '\x2', '\x122', '\x124', + '\x5', '\x38', '\x1D', '\x2', '\x123', '\x125', '\x5', '\x36', '\x1C', + '\x2', '\x124', '\x123', '\x3', '\x2', '\x2', '\x2', '\x124', '\x125', + '\x3', '\x2', '\x2', '\x2', '\x125', '\x35', '\x3', '\x2', '\x2', '\x2', + '\x126', '\x127', '\a', '\'', '\x2', '\x2', '\x127', '\x128', '\a', '\x42', + '\x2', '\x2', '\x128', '\x37', '\x3', '\x2', '\x2', '\x2', '\x129', '\x12A', '\b', '\x1D', '\x1', '\x2', '\x12A', '\x12B', '\x5', 'J', '&', '\x2', '\x12B', '\x14E', '\x3', '\x2', '\x2', '\x2', '\x12C', '\x12D', '\f', '\n', '\x2', '\x2', '\x12D', '\x12E', '\x5', ':', '\x1E', '\x2', '\x12E', @@ -4140,87 +4215,95 @@ private bool primary_expression_sempred(Primary_expressionContext _localctx, int '\x3', '\x2', '\x2', '\x2', '\x165', '\x162', '\x3', '\x2', '\x2', '\x2', '\x166', 'K', '\x3', '\x2', '\x2', '\x2', '\x167', '\x168', '\t', '\b', '\x2', '\x2', '\x168', 'M', '\x3', '\x2', '\x2', '\x2', '\x169', '\x16A', - '\b', '(', '\x1', '\x2', '\x16A', '\x190', '\x5', 'X', '-', '\x2', '\x16B', - '\x190', '\a', '\x42', '\x2', '\x2', '\x16C', '\x190', '\x5', 'Z', '.', + '\b', '(', '\x1', '\x2', '\x16A', '\x19A', '\x5', 'X', '-', '\x2', '\x16B', + '\x19A', '\a', '\x44', '\x2', '\x2', '\x16C', '\x19A', '\x5', 'Z', '.', '\x2', '\x16D', '\x16F', '\a', '\b', '\x2', '\x2', '\x16E', '\x170', '\x5', 'R', '*', '\x2', '\x16F', '\x16E', '\x3', '\x2', '\x2', '\x2', '\x16F', '\x170', '\x3', '\x2', '\x2', '\x2', '\x170', '\x171', '\x3', '\x2', '\x2', - '\x2', '\x171', '\x190', '\a', '\t', '\x2', '\x2', '\x172', '\x174', '\a', + '\x2', '\x171', '\x19A', '\a', '\t', '\x2', '\x2', '\x172', '\x174', '\a', '\x1C', '\x2', '\x2', '\x173', '\x175', '\x5', 'T', '+', '\x2', '\x174', '\x173', '\x3', '\x2', '\x2', '\x2', '\x174', '\x175', '\x3', '\x2', '\x2', - '\x2', '\x175', '\x176', '\x3', '\x2', '\x2', '\x2', '\x176', '\x190', + '\x2', '\x175', '\x176', '\x3', '\x2', '\x2', '\x2', '\x176', '\x19A', '\a', '\x1D', '\x2', '\x2', '\x177', '\x178', '\a', '\x5', '\x2', '\x2', '\x178', '\x179', '\x5', '.', '\x18', '\x2', '\x179', '\x17A', '\a', '\x6', - '\x2', '\x2', '\x17A', '\x190', '\x3', '\x2', '\x2', '\x2', '\x17B', '\x17C', + '\x2', '\x2', '\x17A', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x17B', '\x17C', '\a', '\x5', '\x2', '\x2', '\x17C', '\x17D', '\x5', '\x4', '\x3', '\x2', - '\x17D', '\x17E', '\a', '\x6', '\x2', '\x2', '\x17E', '\x190', '\x3', + '\x17D', '\x17E', '\a', '\x6', '\x2', '\x2', '\x17E', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x17F', '\x180', '\a', '(', '\x2', '\x2', '\x180', '\x181', '\a', '\x5', '\x2', '\x2', '\x181', '\x182', '\x5', '\x4', '\x3', - '\x2', '\x182', '\x183', '\a', '\x6', '\x2', '\x2', '\x183', '\x190', + '\x2', '\x182', '\x183', '\a', '\x6', '\x2', '\x2', '\x183', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x184', '\x185', '\a', ' ', '\x2', '\x2', '\x185', '\x186', '\a', '\x5', '\x2', '\x2', '\x186', '\x187', '\x5', '\x4', '\x3', '\x2', '\x187', '\x188', '\a', '\x6', '\x2', '\x2', '\x188', - '\x190', '\x3', '\x2', '\x2', '\x2', '\x189', '\x18A', '\a', '\x1E', '\x2', + '\x19A', '\x3', '\x2', '\x2', '\x2', '\x189', '\x18A', '\a', '\x1E', '\x2', '\x2', '\x18A', '\x18B', '\a', '\x5', '\x2', '\x2', '\x18B', '\x18C', '\x5', '\x4', '\x3', '\x2', '\x18C', '\x18D', '\a', '\x6', '\x2', '\x2', - '\x18D', '\x190', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x190', '\x5', - 'P', ')', '\x2', '\x18F', '\x169', '\x3', '\x2', '\x2', '\x2', '\x18F', - '\x16B', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x16C', '\x3', '\x2', '\x2', - '\x2', '\x18F', '\x16D', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x172', - '\x3', '\x2', '\x2', '\x2', '\x18F', '\x177', '\x3', '\x2', '\x2', '\x2', - '\x18F', '\x17B', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x17F', '\x3', - '\x2', '\x2', '\x2', '\x18F', '\x184', '\x3', '\x2', '\x2', '\x2', '\x18F', - '\x189', '\x3', '\x2', '\x2', '\x2', '\x18F', '\x18E', '\x3', '\x2', '\x2', - '\x2', '\x190', '\x19B', '\x3', '\x2', '\x2', '\x2', '\x191', '\x192', - '\f', '\b', '\x2', '\x2', '\x192', '\x193', '\a', '\a', '\x2', '\x2', - '\x193', '\x19A', '\x5', 'X', '-', '\x2', '\x194', '\x195', '\f', '\a', - '\x2', '\x2', '\x195', '\x196', '\a', '\b', '\x2', '\x2', '\x196', '\x197', - '\x5', '.', '\x18', '\x2', '\x197', '\x198', '\a', '\t', '\x2', '\x2', - '\x198', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x199', '\x191', '\x3', - '\x2', '\x2', '\x2', '\x199', '\x194', '\x3', '\x2', '\x2', '\x2', '\x19A', - '\x19D', '\x3', '\x2', '\x2', '\x2', '\x19B', '\x199', '\x3', '\x2', '\x2', - '\x2', '\x19B', '\x19C', '\x3', '\x2', '\x2', '\x2', '\x19C', 'O', '\x3', - '\x2', '\x2', '\x2', '\x19D', '\x19B', '\x3', '\x2', '\x2', '\x2', '\x19E', - '\x19F', '\a', ':', '\x2', '\x2', '\x19F', '\x1A1', '\a', '\a', '\x2', - '\x2', '\x1A0', '\x19E', '\x3', '\x2', '\x2', '\x2', '\x1A0', '\x1A1', - '\x3', '\x2', '\x2', '\x2', '\x1A1', '\x1A2', '\x3', '\x2', '\x2', '\x2', - '\x1A2', '\x1A3', '\x5', 'X', '-', '\x2', '\x1A3', '\x1A5', '\a', '\x5', - '\x2', '\x2', '\x1A4', '\x1A6', '\x5', 'R', '*', '\x2', '\x1A5', '\x1A4', - '\x3', '\x2', '\x2', '\x2', '\x1A5', '\x1A6', '\x3', '\x2', '\x2', '\x2', - '\x1A6', '\x1A7', '\x3', '\x2', '\x2', '\x2', '\x1A7', '\x1A8', '\a', - '\x6', '\x2', '\x2', '\x1A8', '\x1B6', '\x3', '\x2', '\x2', '\x2', '\x1A9', - '\x1AA', '\a', '.', '\x2', '\x2', '\x1AA', '\x1AC', '\a', '\x5', '\x2', - '\x2', '\x1AB', '\x1AD', '\x5', 'R', '*', '\x2', '\x1AC', '\x1AB', '\x3', - '\x2', '\x2', '\x2', '\x1AC', '\x1AD', '\x3', '\x2', '\x2', '\x2', '\x1AD', - '\x1AE', '\x3', '\x2', '\x2', '\x2', '\x1AE', '\x1B6', '\a', '\x6', '\x2', - '\x2', '\x1AF', '\x1B0', '\a', '\x36', '\x2', '\x2', '\x1B0', '\x1B2', - '\a', '\x5', '\x2', '\x2', '\x1B1', '\x1B3', '\x5', 'R', '*', '\x2', '\x1B2', - '\x1B1', '\x3', '\x2', '\x2', '\x2', '\x1B2', '\x1B3', '\x3', '\x2', '\x2', - '\x2', '\x1B3', '\x1B4', '\x3', '\x2', '\x2', '\x2', '\x1B4', '\x1B6', - '\a', '\x6', '\x2', '\x2', '\x1B5', '\x1A0', '\x3', '\x2', '\x2', '\x2', - '\x1B5', '\x1A9', '\x3', '\x2', '\x2', '\x2', '\x1B5', '\x1AF', '\x3', - '\x2', '\x2', '\x2', '\x1B6', 'Q', '\x3', '\x2', '\x2', '\x2', '\x1B7', - '\x1BC', '\x5', '.', '\x18', '\x2', '\x1B8', '\x1B9', '\a', '\x4', '\x2', - '\x2', '\x1B9', '\x1BB', '\x5', '.', '\x18', '\x2', '\x1BA', '\x1B8', - '\x3', '\x2', '\x2', '\x2', '\x1BB', '\x1BE', '\x3', '\x2', '\x2', '\x2', - '\x1BC', '\x1BA', '\x3', '\x2', '\x2', '\x2', '\x1BC', '\x1BD', '\x3', - '\x2', '\x2', '\x2', '\x1BD', 'S', '\x3', '\x2', '\x2', '\x2', '\x1BE', - '\x1BC', '\x3', '\x2', '\x2', '\x2', '\x1BF', '\x1C4', '\x5', 'V', ',', - '\x2', '\x1C0', '\x1C1', '\a', '\x4', '\x2', '\x2', '\x1C1', '\x1C3', - '\x5', 'V', ',', '\x2', '\x1C2', '\x1C0', '\x3', '\x2', '\x2', '\x2', - '\x1C3', '\x1C6', '\x3', '\x2', '\x2', '\x2', '\x1C4', '\x1C2', '\x3', - '\x2', '\x2', '\x2', '\x1C4', '\x1C5', '\x3', '\x2', '\x2', '\x2', '\x1C5', - 'U', '\x3', '\x2', '\x2', '\x2', '\x1C6', '\x1C4', '\x3', '\x2', '\x2', - '\x2', '\x1C7', '\x1C8', '\a', '@', '\x2', '\x2', '\x1C8', '\x1C9', '\a', - '\v', '\x2', '\x2', '\x1C9', '\x1CA', '\x5', '.', '\x18', '\x2', '\x1CA', - 'W', '\x3', '\x2', '\x2', '\x2', '\x1CB', '\x1CC', '\t', '\t', '\x2', - '\x2', '\x1CC', 'Y', '\x3', '\x2', '\x2', '\x2', '\x1CD', '\x1CE', '\t', - '\n', '\x2', '\x2', '\x1CE', '[', '\x3', '\x2', '\x2', '\x2', '/', '\x61', - '\x64', 'g', 'j', 'm', 'q', 't', '~', '\x8A', '\x90', '\x98', '\x9B', - '\xA1', '\xA8', '\xAD', '\xB3', '\xC1', '\xC3', '\xD6', '\xDB', '\xEC', - '\xF3', '\xFE', '\x100', '\x107', '\x10F', '\x111', '\x116', '\x11F', - '\x124', '\x14C', '\x14E', '\x165', '\x16F', '\x174', '\x18F', '\x199', - '\x19B', '\x1A0', '\x1A5', '\x1AC', '\x1B2', '\x1B5', '\x1BC', '\x1C4', + '\x18D', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x18E', '\x18F', '\a', + ')', '\x2', '\x2', '\x18F', '\x190', '\a', '\x5', '\x2', '\x2', '\x190', + '\x191', '\x5', '\x4', '\x3', '\x2', '\x191', '\x192', '\a', '\x6', '\x2', + '\x2', '\x192', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x193', '\x194', + '\a', '/', '\x2', '\x2', '\x194', '\x195', '\a', '\x5', '\x2', '\x2', + '\x195', '\x196', '\x5', '\x4', '\x3', '\x2', '\x196', '\x197', '\a', + '\x6', '\x2', '\x2', '\x197', '\x19A', '\x3', '\x2', '\x2', '\x2', '\x198', + '\x19A', '\x5', 'P', ')', '\x2', '\x199', '\x169', '\x3', '\x2', '\x2', + '\x2', '\x199', '\x16B', '\x3', '\x2', '\x2', '\x2', '\x199', '\x16C', + '\x3', '\x2', '\x2', '\x2', '\x199', '\x16D', '\x3', '\x2', '\x2', '\x2', + '\x199', '\x172', '\x3', '\x2', '\x2', '\x2', '\x199', '\x177', '\x3', + '\x2', '\x2', '\x2', '\x199', '\x17B', '\x3', '\x2', '\x2', '\x2', '\x199', + '\x17F', '\x3', '\x2', '\x2', '\x2', '\x199', '\x184', '\x3', '\x2', '\x2', + '\x2', '\x199', '\x189', '\x3', '\x2', '\x2', '\x2', '\x199', '\x18E', + '\x3', '\x2', '\x2', '\x2', '\x199', '\x193', '\x3', '\x2', '\x2', '\x2', + '\x199', '\x198', '\x3', '\x2', '\x2', '\x2', '\x19A', '\x1A5', '\x3', + '\x2', '\x2', '\x2', '\x19B', '\x19C', '\f', '\n', '\x2', '\x2', '\x19C', + '\x19D', '\a', '\a', '\x2', '\x2', '\x19D', '\x1A4', '\x5', 'X', '-', + '\x2', '\x19E', '\x19F', '\f', '\t', '\x2', '\x2', '\x19F', '\x1A0', '\a', + '\b', '\x2', '\x2', '\x1A0', '\x1A1', '\x5', '.', '\x18', '\x2', '\x1A1', + '\x1A2', '\a', '\t', '\x2', '\x2', '\x1A2', '\x1A4', '\x3', '\x2', '\x2', + '\x2', '\x1A3', '\x19B', '\x3', '\x2', '\x2', '\x2', '\x1A3', '\x19E', + '\x3', '\x2', '\x2', '\x2', '\x1A4', '\x1A7', '\x3', '\x2', '\x2', '\x2', + '\x1A5', '\x1A3', '\x3', '\x2', '\x2', '\x2', '\x1A5', '\x1A6', '\x3', + '\x2', '\x2', '\x2', '\x1A6', 'O', '\x3', '\x2', '\x2', '\x2', '\x1A7', + '\x1A5', '\x3', '\x2', '\x2', '\x2', '\x1A8', '\x1A9', '\a', '<', '\x2', + '\x2', '\x1A9', '\x1AB', '\a', '\a', '\x2', '\x2', '\x1AA', '\x1A8', '\x3', + '\x2', '\x2', '\x2', '\x1AA', '\x1AB', '\x3', '\x2', '\x2', '\x2', '\x1AB', + '\x1AC', '\x3', '\x2', '\x2', '\x2', '\x1AC', '\x1AD', '\x5', 'X', '-', + '\x2', '\x1AD', '\x1AF', '\a', '\x5', '\x2', '\x2', '\x1AE', '\x1B0', + '\x5', 'R', '*', '\x2', '\x1AF', '\x1AE', '\x3', '\x2', '\x2', '\x2', + '\x1AF', '\x1B0', '\x3', '\x2', '\x2', '\x2', '\x1B0', '\x1B1', '\x3', + '\x2', '\x2', '\x2', '\x1B1', '\x1B2', '\a', '\x6', '\x2', '\x2', '\x1B2', + '\x1C0', '\x3', '\x2', '\x2', '\x2', '\x1B3', '\x1B4', '\a', '\x30', '\x2', + '\x2', '\x1B4', '\x1B6', '\a', '\x5', '\x2', '\x2', '\x1B5', '\x1B7', + '\x5', 'R', '*', '\x2', '\x1B6', '\x1B5', '\x3', '\x2', '\x2', '\x2', + '\x1B6', '\x1B7', '\x3', '\x2', '\x2', '\x2', '\x1B7', '\x1B8', '\x3', + '\x2', '\x2', '\x2', '\x1B8', '\x1C0', '\a', '\x6', '\x2', '\x2', '\x1B9', + '\x1BA', '\a', '\x38', '\x2', '\x2', '\x1BA', '\x1BC', '\a', '\x5', '\x2', + '\x2', '\x1BB', '\x1BD', '\x5', 'R', '*', '\x2', '\x1BC', '\x1BB', '\x3', + '\x2', '\x2', '\x2', '\x1BC', '\x1BD', '\x3', '\x2', '\x2', '\x2', '\x1BD', + '\x1BE', '\x3', '\x2', '\x2', '\x2', '\x1BE', '\x1C0', '\a', '\x6', '\x2', + '\x2', '\x1BF', '\x1AA', '\x3', '\x2', '\x2', '\x2', '\x1BF', '\x1B3', + '\x3', '\x2', '\x2', '\x2', '\x1BF', '\x1B9', '\x3', '\x2', '\x2', '\x2', + '\x1C0', 'Q', '\x3', '\x2', '\x2', '\x2', '\x1C1', '\x1C6', '\x5', '.', + '\x18', '\x2', '\x1C2', '\x1C3', '\a', '\x4', '\x2', '\x2', '\x1C3', '\x1C5', + '\x5', '.', '\x18', '\x2', '\x1C4', '\x1C2', '\x3', '\x2', '\x2', '\x2', + '\x1C5', '\x1C8', '\x3', '\x2', '\x2', '\x2', '\x1C6', '\x1C4', '\x3', + '\x2', '\x2', '\x2', '\x1C6', '\x1C7', '\x3', '\x2', '\x2', '\x2', '\x1C7', + 'S', '\x3', '\x2', '\x2', '\x2', '\x1C8', '\x1C6', '\x3', '\x2', '\x2', + '\x2', '\x1C9', '\x1CE', '\x5', 'V', ',', '\x2', '\x1CA', '\x1CB', '\a', + '\x4', '\x2', '\x2', '\x1CB', '\x1CD', '\x5', 'V', ',', '\x2', '\x1CC', + '\x1CA', '\x3', '\x2', '\x2', '\x2', '\x1CD', '\x1D0', '\x3', '\x2', '\x2', + '\x2', '\x1CE', '\x1CC', '\x3', '\x2', '\x2', '\x2', '\x1CE', '\x1CF', + '\x3', '\x2', '\x2', '\x2', '\x1CF', 'U', '\x3', '\x2', '\x2', '\x2', + '\x1D0', '\x1CE', '\x3', '\x2', '\x2', '\x2', '\x1D1', '\x1D2', '\a', + '\x42', '\x2', '\x2', '\x1D2', '\x1D3', '\a', '\v', '\x2', '\x2', '\x1D3', + '\x1D4', '\x5', '.', '\x18', '\x2', '\x1D4', 'W', '\x3', '\x2', '\x2', + '\x2', '\x1D5', '\x1D6', '\t', '\t', '\x2', '\x2', '\x1D6', 'Y', '\x3', + '\x2', '\x2', '\x2', '\x1D7', '\x1D8', '\t', '\n', '\x2', '\x2', '\x1D8', + '[', '\x3', '\x2', '\x2', '\x2', '/', '\x61', '\x64', 'g', 'j', 'm', 'q', + 't', '~', '\x8A', '\x90', '\x98', '\x9B', '\xA1', '\xA8', '\xAD', '\xB3', + '\xC1', '\xC3', '\xD6', '\xDB', '\xEC', '\xF3', '\xFE', '\x100', '\x107', + '\x10F', '\x111', '\x116', '\x11F', '\x124', '\x14C', '\x14E', '\x165', + '\x16F', '\x174', '\x199', '\x1A3', '\x1A5', '\x1AA', '\x1AF', '\x1B6', + '\x1BC', '\x1BF', '\x1C6', '\x1CE', }; public static readonly ATN _ATN = diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 744d98bf44..e276466f9d 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -1004,6 +1004,12 @@ public override bool Visit(SqlExistsScalarExpression sqlExistsScalarExpression) return false; } + public override bool Visit(SqlFirstScalarExpression sqlFirstScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return false; + } + public override bool Visit(SqlFunctionCallScalarExpression sqlFunctionCallScalarExpression) { return !sqlFunctionCallScalarExpression.IsUdf && @@ -1021,6 +1027,12 @@ public override bool Visit(SqlInScalarExpression sqlInScalarExpression) return hasAggregates; } + public override bool Visit(SqlLastScalarExpression sqlLastScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return false; + } + public override bool Visit(SqlLiteralScalarExpression sqlLiteralScalarExpression) { return false; diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/SqlFirstScalarExpression.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlFirstScalarExpression.cs new file mode 100644 index 0000000000..556da872e8 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlFirstScalarExpression.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.SqlObjects +{ + using System; + using Microsoft.Azure.Cosmos.SqlObjects.Visitors; + +#if INTERNAL +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#pragma warning disable SA1600 // Elements should be documented + public +#else + internal +#endif + sealed class SqlFirstScalarExpression : SqlScalarExpression + { + private SqlFirstScalarExpression(SqlQuery subquery) + { + this.Subquery = subquery ?? throw new ArgumentNullException(nameof(subquery)); + } + + public SqlQuery Subquery { get; } + + public static SqlFirstScalarExpression Create(SqlQuery subquery) => new SqlFirstScalarExpression(subquery); + + public override void Accept(SqlObjectVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlObjectVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlObjectVisitor visitor, T input) => visitor.Visit(this, input); + + public override void Accept(SqlScalarExpressionVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlScalarExpressionVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlScalarExpressionVisitor visitor, T input) => visitor.Visit(this, input); + } +} diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/SqlLastScalarExpression.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlLastScalarExpression.cs new file mode 100644 index 0000000000..36707d1c80 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlLastScalarExpression.cs @@ -0,0 +1,40 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.SqlObjects +{ + using System; + using Microsoft.Azure.Cosmos.SqlObjects.Visitors; + +#if INTERNAL +#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member +#pragma warning disable SA1600 // Elements should be documented + public +#else + internal +#endif + sealed class SqlLastScalarExpression : SqlScalarExpression + { + private SqlLastScalarExpression(SqlQuery subquery) + { + this.Subquery = subquery ?? throw new ArgumentNullException(nameof(subquery)); + } + + public SqlQuery Subquery { get; } + + public static SqlLastScalarExpression Create(SqlQuery subquery) => new SqlLastScalarExpression(subquery); + + public override void Accept(SqlObjectVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlObjectVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlObjectVisitor visitor, T input) => visitor.Visit(this, input); + + public override void Accept(SqlScalarExpressionVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlScalarExpressionVisitor visitor) => visitor.Visit(this); + + public override TResult Accept(SqlScalarExpressionVisitor visitor, T input) => visitor.Visit(this, input); + } +} diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs index 3a9bf01970..8d7770ba9e 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectEqualityVisitor.cs @@ -231,6 +231,21 @@ public override bool Visit(SqlExistsScalarExpression first, SqlObject secondAsOb return true; } + public override bool Visit(SqlFirstScalarExpression first, SqlObject secondAsObject) + { + if (!(secondAsObject is SqlFirstScalarExpression second)) + { + return false; + } + + if (!Equals(first.Subquery, second.Subquery)) + { + return false; + } + + return true; + } + public override bool Visit(SqlFromClause first, SqlObject secondAsObject) { if (!(secondAsObject is SqlFromClause second)) @@ -386,6 +401,21 @@ public override bool Visit(SqlJoinCollectionExpression first, SqlObject secondAs return true; } + public override bool Visit(SqlLastScalarExpression first, SqlObject secondAsObject) + { + if (!(secondAsObject is SqlLastScalarExpression second)) + { + return false; + } + + if (!Equals(first.Subquery, second.Subquery)) + { + return false; + } + + return true; + } + public override bool Visit(SqlLikeScalarExpression first, SqlObject secondAsObject) { if (!(secondAsObject is SqlLikeScalarExpression second)) diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs index dfbab84bc0..f4f55009ec 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectHasher.cs @@ -25,6 +25,7 @@ internal sealed class SqlObjectHasher : SqlObjectVisitor private const int SqlCoalesceScalarExpressionHashCode = -1400659633; private const int SqlConditionalScalarExpressionHashCode = -421337832; private const int SqlExistsScalarExpressionHashCode = 1168675587; + private const int SqlFirstScalarExpressionHashCode = -754458752; private const int SqlFromClauseHashCode = 52588336; private const int SqlFunctionCallScalarExpressionHashCode = 496783446; private const int SqlFunctionCallScalarExpressionUdfHashCode = 1547906315; @@ -35,6 +36,7 @@ internal sealed class SqlObjectHasher : SqlObjectVisitor private const int SqlInScalarExpressionHashCode = 1439386783; private const int SqlInScalarExpressionNotHashCode = -1131398119; private const int SqlJoinCollectionExpressionHashCode = 1000382226; + private const int SqlLastScalarExpressionHashCode = 2018370813; private const int SqlLikeScalarExpressionHashCode = 317861; private const int SqlLimitSpecHashCode = 92601316; private const int SqlLiteralScalarExpressionHashCode = -158339101; @@ -207,6 +209,13 @@ public override int Visit(SqlExistsScalarExpression sqlExistsScalarExpression) return hashCode; } + public override int Visit(SqlFirstScalarExpression sqlFirstScalarExpression) + { + int hashCode = SqlFirstScalarExpressionHashCode; + hashCode = CombineHashes(hashCode, sqlFirstScalarExpression.Subquery.Accept(this)); + return hashCode; + } + public override int Visit(SqlFromClause sqlFromClause) { int hashCode = SqlFromClauseHashCode; @@ -298,6 +307,13 @@ public override int Visit(SqlJoinCollectionExpression sqlJoinCollectionExpressio return hashCode; } + public override int Visit(SqlLastScalarExpression sqlLastScalarExpression) + { + int hashCode = SqlLastScalarExpressionHashCode; + hashCode = CombineHashes(hashCode, sqlLastScalarExpression.Subquery.Accept(this)); + return hashCode; + } + public override int Visit(SqlLimitSpec sqlObject) { int hashCode = SqlLimitSpecHashCode; diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs index 5e6faaef45..2120f16567 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectObfuscator.cs @@ -46,7 +46,7 @@ public override SqlObject Visit(SqlAliasedCollectionExpression sqlAliasedCollect public override SqlObject Visit(SqlAllScalarExpression sqlAllScalarExpression) { - return SqlExistsScalarExpression.Create(sqlAllScalarExpression.Subquery.Accept(this) as SqlQuery); + return SqlAllScalarExpression.Create(sqlAllScalarExpression.Subquery.Accept(this) as SqlQuery); } public override SqlObject Visit(SqlArrayCreateScalarExpression sqlArrayCreateScalarExpression) @@ -115,6 +115,11 @@ public override SqlObject Visit(SqlExistsScalarExpression sqlExistsScalarExpress return SqlExistsScalarExpression.Create(sqlExistsScalarExpression.Subquery.Accept(this) as SqlQuery); } + public override SqlObject Visit(SqlFirstScalarExpression sqlFirstScalarExpression) + { + return SqlFirstScalarExpression.Create(sqlFirstScalarExpression.Subquery.Accept(this) as SqlQuery); + } + public override SqlObject Visit(SqlFromClause sqlFromClause) { return SqlFromClause.Create(sqlFromClause.Expression.Accept(this) as SqlCollectionExpression); @@ -189,6 +194,11 @@ public override SqlObject Visit(SqlJoinCollectionExpression sqlJoinCollectionExp sqlJoinCollectionExpression.Right.Accept(this) as SqlCollectionExpression); } + public override SqlObject Visit(SqlLastScalarExpression sqlLastScalarExpression) + { + return SqlLastScalarExpression.Create(sqlLastScalarExpression.Subquery.Accept(this) as SqlQuery); + } + public override SqlObject Visit(SqlLikeScalarExpression sqlLikeScalarExpression) { return SqlLikeScalarExpression.Create( diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs index 75076e512c..a29435744d 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectTextSerializer.cs @@ -154,6 +154,14 @@ public override void Visit(SqlExistsScalarExpression sqlExistsScalarExpression) this.WriteEndContext(")"); } + public override void Visit(SqlFirstScalarExpression sqlFirstScalarExpression) + { + this.writer.Write("FIRST"); + this.WriteStartContext("("); + sqlFirstScalarExpression.Subquery.Accept(this); + this.WriteEndContext(")"); + } + public override void Visit(SqlFromClause sqlFromClause) { this.writer.Write("FROM "); @@ -284,6 +292,14 @@ public override void Visit(SqlJoinCollectionExpression sqlJoinCollectionExpressi sqlJoinCollectionExpression.Right.Accept(this); } + public override void Visit(SqlLastScalarExpression sqlLastScalarExpression) + { + this.writer.Write("LAST"); + this.WriteStartContext("("); + sqlLastScalarExpression.Subquery.Accept(this); + this.WriteEndContext(")"); + } + public override void Visit(SqlLimitSpec sqlObject) { this.writer.Write("LIMIT "); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs index d8d8899395..3dfe3a9193 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor.cs @@ -24,6 +24,7 @@ abstract class SqlObjectVisitor public abstract void Visit(SqlCoalesceScalarExpression sqlObject); public abstract void Visit(SqlConditionalScalarExpression sqlObject); public abstract void Visit(SqlExistsScalarExpression sqlObject); + public abstract void Visit(SqlFirstScalarExpression sqlObject); public abstract void Visit(SqlFromClause sqlObject); public abstract void Visit(SqlFunctionCallScalarExpression sqlObject); public abstract void Visit(SqlGroupByClause sqlObject); @@ -32,6 +33,7 @@ abstract class SqlObjectVisitor public abstract void Visit(SqlInputPathCollection sqlObject); public abstract void Visit(SqlInScalarExpression sqlObject); public abstract void Visit(SqlJoinCollectionExpression sqlObject); + public abstract void Visit(SqlLastScalarExpression sqlObject); public abstract void Visit(SqlLikeScalarExpression sqlObject); public abstract void Visit(SqlLimitSpec sqlObject); public abstract void Visit(SqlLiteralScalarExpression sqlObject); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs index 3ba9878ae6..449cd6adaf 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TArg,TOutput}.cs @@ -24,6 +24,7 @@ abstract class SqlObjectVisitor public abstract TOutput Visit(SqlCoalesceScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlConditionalScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlExistsScalarExpression sqlObject, TArg input); + public abstract TOutput Visit(SqlFirstScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlFromClause sqlObject, TArg input); public abstract TOutput Visit(SqlFunctionCallScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlGroupByClause sqlObject, TArg input); @@ -32,6 +33,7 @@ abstract class SqlObjectVisitor public abstract TOutput Visit(SqlInputPathCollection sqlObject, TArg input); public abstract TOutput Visit(SqlInScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlJoinCollectionExpression sqlObject, TArg input); + public abstract TOutput Visit(SqlLastScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlLikeScalarExpression sqlObject, TArg input); public abstract TOutput Visit(SqlLimitSpec sqlObject, TArg input); public abstract TOutput Visit(SqlLiteralScalarExpression sqlObject, TArg input); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs index 6f0ce75e99..3d1000a171 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlObjectVisitor{TResult}.cs @@ -24,6 +24,7 @@ abstract class SqlObjectVisitor public abstract TResult Visit(SqlCoalesceScalarExpression sqlObject); public abstract TResult Visit(SqlConditionalScalarExpression sqlObject); public abstract TResult Visit(SqlExistsScalarExpression sqlObject); + public abstract TResult Visit(SqlFirstScalarExpression sqlObject); public abstract TResult Visit(SqlFromClause sqlObject); public abstract TResult Visit(SqlFunctionCallScalarExpression sqlObject); public abstract TResult Visit(SqlGroupByClause sqlObject); @@ -31,6 +32,7 @@ abstract class SqlObjectVisitor public abstract TResult Visit(SqlIdentifierPathExpression sqlObject); public abstract TResult Visit(SqlInputPathCollection sqlObject); public abstract TResult Visit(SqlJoinCollectionExpression sqlObject); + public abstract TResult Visit(SqlLastScalarExpression sqlObject); public abstract TResult Visit(SqlLikeScalarExpression sqlObject); public abstract TResult Visit(SqlInScalarExpression sqlObject); public abstract TResult Visit(SqlLimitSpec sqlObject); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs index 8e6e75b7f0..d807395055 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor.cs @@ -20,8 +20,10 @@ abstract class SqlScalarExpressionVisitor public abstract void Visit(SqlCoalesceScalarExpression scalarExpression); public abstract void Visit(SqlConditionalScalarExpression scalarExpression); public abstract void Visit(SqlExistsScalarExpression scalarExpression); + public abstract void Visit(SqlFirstScalarExpression scalarExpression); public abstract void Visit(SqlFunctionCallScalarExpression scalarExpression); public abstract void Visit(SqlInScalarExpression scalarExpression); + public abstract void Visit(SqlLastScalarExpression scalarExpression); public abstract void Visit(SqlLikeScalarExpression scalarExpression); public abstract void Visit(SqlLiteralScalarExpression scalarExpression); public abstract void Visit(SqlMemberIndexerScalarExpression scalarExpression); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs index ff5cdbc019..256482b151 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TArg,TOutput}.cs @@ -21,8 +21,10 @@ abstract class SqlScalarExpressionVisitor public abstract TOutput Visit(SqlCoalesceScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlConditionalScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlExistsScalarExpression scalarExpression, TArg input); + public abstract TOutput Visit(SqlFirstScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlFunctionCallScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlInScalarExpression scalarExpression, TArg input); + public abstract TOutput Visit(SqlLastScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlLikeScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlLiteralScalarExpression scalarExpression, TArg input); public abstract TOutput Visit(SqlMemberIndexerScalarExpression scalarExpression, TArg input); diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs index bdc7b5f04f..e419b9758d 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/Visitors/SqlScalarExpressionVisitor{TResult}.cs @@ -21,8 +21,10 @@ abstract class SqlScalarExpressionVisitor public abstract TResult Visit(SqlCoalesceScalarExpression scalarExpression); public abstract TResult Visit(SqlConditionalScalarExpression scalarExpression); public abstract TResult Visit(SqlExistsScalarExpression scalarExpression); + public abstract TResult Visit(SqlFirstScalarExpression scalarExpression); public abstract TResult Visit(SqlFunctionCallScalarExpression scalarExpression); public abstract TResult Visit(SqlInScalarExpression scalarExpression); + public abstract TResult Visit(SqlLastScalarExpression scalarExpression); public abstract TResult Visit(SqlLikeScalarExpression scalarExpression); public abstract TResult Visit(SqlLiteralScalarExpression scalarExpression); public abstract TResult Visit(SqlMemberIndexerScalarExpression scalarExpression); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.First.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.First.xml new file mode 100644 index 0000000000..ae098baddc --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.First.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.Last.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.Last.xml new file mode 100644 index 0000000000..68b61ba3f1 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/AggregateSubquerySqlParserBaselineTests.Last.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.First.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.First.xml new file mode 100644 index 0000000000..10b917f519 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.First.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.Last.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.Last.xml new file mode 100644 index 0000000000..ba5694ca80 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/ScalarExpressionSqlParserBaselineTests.Last.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj index dc5f2c8e41..1d4e4e166c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj @@ -9,7 +9,7 @@ false false Microsoft.Azure.Cosmos.Tests - $(LangVersion) + $(LangVersion) @@ -174,12 +174,24 @@ PreserveNewest - - PreserveNewest - - - PreserveNewest - + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + + + PreserveNewest + PreserveNewest @@ -198,9 +210,9 @@ PreserveNewest - + PreserveNewest - + PreserveNewest diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs index ca162fc467..18c59fcc49 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionDector.cs @@ -111,6 +111,12 @@ public override bool Visit(SqlExistsScalarExpression sqlExistsScalarExpression) return false; } + public override bool Visit(SqlFirstScalarExpression sqlFirstScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return false; + } + public override bool Visit(SqlFunctionCallScalarExpression sqlFunctionCallScalarExpression) { Aggregate aggregate; @@ -129,6 +135,12 @@ public override bool Visit(SqlInScalarExpression sqlInScalarExpression) return hasAggregates; } + public override bool Visit(SqlLastScalarExpression sqlLastScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return false; + } + public override bool Visit(SqlLikeScalarExpression sqlLikeScalarExpression) { return false; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs index 1ce82d3c98..e644eeee43 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/AggregateProjectionTransformer.cs @@ -140,6 +140,12 @@ public override SqlScalarExpression Visit(SqlExistsScalarExpression sqlExistsSca return sqlExistsScalarExpression; } + public override SqlScalarExpression Visit(SqlFirstScalarExpression sqlFirstScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return sqlFirstScalarExpression; + } + public override SqlScalarExpression Visit(SqlFunctionCallScalarExpression sqlFunctionCallScalarExpression) { SqlScalarExpression rewrittenExpression; @@ -293,6 +299,12 @@ public override SqlScalarExpression Visit(SqlInScalarExpression sqlInScalarExpre items); } + public override SqlScalarExpression Visit(SqlLastScalarExpression sqlLastScalarExpression) + { + // No need to worry about aggregates within the subquery (they will recursively get rewritten). + return sqlLastScalarExpression; + } + public override SqlScalarExpression Visit(SqlLikeScalarExpression sqlLikeScalarExpression) { return sqlLikeScalarExpression; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs index 2a671f2568..4c0cda94dc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/ScalarExpressionEvaluator.cs @@ -257,6 +257,16 @@ public override CosmosElement Visit(SqlExistsScalarExpression scalarExpression, return CosmosBoolean.Create(subqueryResults.Any()); } + public override CosmosElement Visit(SqlFirstScalarExpression scalarExpression, CosmosElement document) + { + // Only run on the current document since the subquery is always correlated. + IEnumerable subqueryResults = SqlInterpreter.ExecuteQuery( + new CosmosElement[] { document }, + scalarExpression.Subquery); + + return subqueryResults.FirstOrDefault(CosmosUndefined.Create()); + } + public override CosmosElement Visit(SqlFunctionCallScalarExpression scalarExpression, CosmosElement document) { List arguments = new List(); @@ -304,6 +314,16 @@ public override CosmosElement Visit(SqlInScalarExpression scalarExpression, Cosm return CosmosBoolean.Create(contains); } + public override CosmosElement Visit(SqlLastScalarExpression scalarExpression, CosmosElement document) + { + // Only run on the current document since the subquery is always correlated. + IEnumerable subqueryResults = SqlInterpreter.ExecuteQuery( + new CosmosElement[] { document }, + scalarExpression.Subquery); + + return subqueryResults.LastOrDefault(CosmosUndefined.Create()); + } + public override CosmosElement Visit(SqlLikeScalarExpression scalarExpression, CosmosElement document) { // Consider the necessity of having v3 offline engine. Should we remove this altogether? diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs index ba45092faa..c9da37b7c4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OfflineEngine/SqlInterpreter.cs @@ -755,6 +755,11 @@ public override bool Visit(SqlExistsScalarExpression scalarExpression) return false; } + public override bool Visit(SqlFirstScalarExpression scalarExpression) + { + return false; + } + public override bool Visit(SqlFunctionCallScalarExpression scalarExpression) { if (this.MatchesGroupByExpression(scalarExpression)) @@ -805,6 +810,11 @@ public override bool Visit(SqlInScalarExpression scalarExpression) return true; } + public override bool Visit(SqlLastScalarExpression scalarExpression) + { + return false; + } + public override bool Visit(SqlLikeScalarExpression scalarExpression) { return false; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/AggregateSubquerySqlParserBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/AggregateSubquerySqlParserBaselineTests.cs index 079fbbba46..92c6d6056b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/AggregateSubquerySqlParserBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/AggregateSubquerySqlParserBaselineTests.cs @@ -54,12 +54,109 @@ public void All() " FROM (SELECT udf.ALL(1, 2)) AS ALL " + " WHERE ALL( SELECT VALUE 1) " + ")") - }; this.ExecuteTestSuite(inputs); } + [TestMethod] + public void First() + { + List inputs = new List() + { + CreateInput( + description: "FIRST in an SqlSelectItem as an alias", + query: "SELECT 1 AS FIRST"), + CreateInput( + description: "FIRST in an AliasedCollectionExpression as an alias", + query: "SELECT * " + + "FROM (SELECT VALUE 1) AS FIRST"), + CreateInput( + description: "FIRST in an ArrayIteratorCollectionExpression", + query: "SELECT * " + + "FROM FIRST IN (SELECT VALUE 1)"), + CreateInput( + description: "FIRST in an InputPathCollection and IdentifierPathExpression", + query: "SELECT * " + + "FROM FIRST.FIRST"), + CreateInput( + description: "FIRST in a PropertyRefScalarExpression", + query: "SELECT FIRST"), + CreateInput( + description: "FIRST in a PropertyRefScalarExpression as child", + query: "SELECT c.FIRST"), + CreateInput( + description: "FIRST in a PropertyRefScalarExpression as parent and child", + query: "SELECT FIRST.FIRST"), + CreateInput( + description: "FIRST in a function cFIRST", + query: "SELECT FIRST(1, 2)"), + CreateInput( + description: "FIRST in a UDF function cFIRST", + query: "SELECT udf.FIRST(1, 2)"), + CreateInput( + description: "FIRST in every possible grammar rule at the same time", + query: "SELECT FIRST(1, 2) AS FIRST " + + "FROM FIRST IN (SELECT FIRST.FIRST) " + + "WHERE FIRST( " + + " SELECT FIRST " + + " FROM (SELECT udf.FIRST(1, 2)) AS FIRST " + + " WHERE FIRST( SELECT VALUE 1) " + + ")") + }; + + this.ExecuteTestSuite(inputs); + } + + [TestMethod] + public void Last() + { + List inputs = new List() + { + CreateInput( + description: "LAST in an SqlSelectItem as an alias", + query: "SELECT 1 AS LAST"), + CreateInput( + description: "LAST in an AliasedCollectionExpression as an alias", + query: "SELECT * " + + "FROM (SELECT VALUE 1) AS LAST"), + CreateInput( + description: "LAST in an ArrayIteratorCollectionExpression", + query: "SELECT * " + + "FROM LAST IN (SELECT VALUE 1)"), + CreateInput( + description: "LAST in an InputPathCollection and IdentifierPathExpression", + query: "SELECT * " + + "FROM LAST.LAST"), + CreateInput( + description: "LAST in a PropertyRefScalarExpression", + query: "SELECT LAST"), + CreateInput( + description: "LAST in a PropertyRefScalarExpression as child", + query: "SELECT c.LAST"), + CreateInput( + description: "LAST in a PropertyRefScalarExpression as parent and child", + query: "SELECT LAST.LAST"), + CreateInput( + description: "LAST in a function cLAST", + query: "SELECT LAST(1, 2)"), + CreateInput( + description: "LAST in a UDF function cLAST", + query: "SELECT udf.LAST(1, 2)"), + CreateInput( + description: "LAST in every possible grammar rule at the same time", + query: "SELECT LAST(1, 2) AS LAST " + + "FROM LAST IN (SELECT LAST.LAST) " + + "WHERE LAST( " + + " SELECT LAST " + + " FROM (SELECT udf.LAST(1, 2)) AS LAST " + + " WHERE LAST( SELECT VALUE 1) " + + ")") + }; + + this.ExecuteTestSuite(inputs); + } + public static SqlParserBaselineTestInput CreateInput(string description, string query) { return new SqlParserBaselineTestInput(description, query); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs index 2faed74686..43377f0074 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/ScalarExpressionSqlParserBaselineTests.cs @@ -246,6 +246,38 @@ public void Exists() this.ExecuteTestSuite(inputs); } + [TestMethod] + public void First() + { + List inputs = new List() + { + // Positive + CreateInput(description: "Basic", scalarExpression: "FIRST(SELECT *)"), + CreateInput(description: "case insensitive", scalarExpression: "FIRST(SELECT *)"), + CreateInput(description: "nested", scalarExpression:"FIRST( SELECT * WHERE FIRST( SELECT *))"), + CreateInput( + description: "multiple nested", + scalarExpression: + "FIRST( " + + " SELECT * " + + " WHERE FIRST( " + + " SELECT *" + + " WHERE FIRST(" + + " SELECT *" + + " WHERE FIRST(" + + " SELECT VALUE 1" + + " )" + + " )" + + " )" + + ")"), + + // Negative + CreateInput(description: "No closing parens", scalarExpression: "FIRST(SELECT *") + }; + + this.ExecuteTestSuite(inputs); + } + [TestMethod] public void FunctionCall() { @@ -291,6 +323,38 @@ public void In() this.ExecuteTestSuite(inputs); } + [TestMethod] + public void Last() + { + List inputs = new List() + { + // Positive + CreateInput(description: "Basic", scalarExpression: "LAST(SELECT *)"), + CreateInput(description: "case insensitive", scalarExpression: "LAST(SELECT *)"), + CreateInput(description: "nested", scalarExpression:"LAST( SELECT * WHERE LAST( SELECT *))"), + CreateInput( + description: "multiple nested", + scalarExpression: + "LAST( " + + " SELECT * " + + " WHERE LAST( " + + " SELECT *" + + " WHERE LAST(" + + " SELECT *" + + " WHERE LAST(" + + " SELECT VALUE 1" + + " )" + + " )" + + " )" + + ")"), + + // Negative + CreateInput(description: "No closing parens", scalarExpression: "LAST(SELECT *") + }; + + this.ExecuteTestSuite(inputs); + } + [TestMethod] public void Literal() { From dc3d0377cab69bf79449d3fcc72da9ea60082f72 Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Tue, 7 Mar 2023 14:39:57 -0500 Subject: [PATCH 070/164] Subpartitioning: Adds support for Prefix Partition Key searches for sub partitioned containers (#3109) * 1st round of changes to support subpartitioning for ChangeFeed * name change and moved a method to FeedRangePartitionKey * support for prefix partition change feed and query including unit and emulator tests. need to verify using FeedRange with QueryIterator * splitting out unit tests from emulator tests * 1st round of changes to support subpartitioning for ChangeFeed * name change and moved a method to FeedRangePartitionKey * support for prefix partition change feed and query including unit and emulator tests. need to verify using FeedRange with QueryIterator * splitting out unit tests from emulator tests * moved logic to choose for prefix partition query and change feed * additional conditional to check for MultiHash partitionkeydefinition kind * removed unnecessary using * cleanup * unnecessary using * removed PREVIEW from proj * unit tests for ResolveFeedRangeBasedOnPrefixContainerAsync * change access modifier * since I changed to static, needed to fix tests * dealing with some testing nits * removed Console.Writeline * slight change in test use containerProperties and partitionKeyDefinition * big fix for resolve feedrange, changes to error behavior, added additional test coverage * test changes * ran updateContracts.ps1 * reverting to 3ad5309e9e22a7376e836cfdbe11fa2438a59133 * Ran Update Contracts * ran updateContracts.ps1 * UpdateContracts.ps1 * updatecontracts * removed bad check from test, removed changes from updatecontracts.ps1 * revert UpdateContracts changes * Reverting to 756a123160d14c424c5e11c4f3520094115aa5d4 * removed accidental change from changelog * removed unwanted change from Directory.build.props * added test clean up * removed console.writelines * updates to query test * removed preview flag * ran UpdateContrats.ps1 * no longer recread feedRange for queries unless using prefix pk * simplified if statement * fixed bug --------- Co-authored-by: Nalu Tripician --- .../src/Handler/RequestInvokerHandler.cs | 29 ++ .../Resource/Container/ContainerCore.Items.cs | 6 - ...riterBaselineTests.BulkOperationsAsync.xml | 42 +- .../CosmosMultiHashTest.cs | 426 ++++++++++-------- ...reateFromPartitionKeyAsyncEmulatorTests.cs | 344 ++++++++++++++ .../HandlerTests.cs | 148 ++++++ 6 files changed, 809 insertions(+), 186 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedRangeCreateFromPartitionKeyAsyncEmulatorTests.cs diff --git a/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs b/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs index 96b889832e..bb322f19b1 100644 --- a/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs +++ b/Microsoft.Azure.Cosmos/src/Handler/RequestInvokerHandler.cs @@ -161,6 +161,14 @@ public virtual async Task SendAsync( if (feedRange != null) { + if (!request.OperationType.IsPointOperation()) + { + feedRange = await RequestInvokerHandler.ResolveFeedRangeBasedOnPrefixContainerAsync( + feedRange: feedRange, + cosmosContainerCore: cosmosContainerCore, + cancellationToken: cancellationToken); + } + if (feedRange is FeedRangePartitionKey feedRangePartitionKey) { if (cosmosContainerCore == null && object.ReferenceEquals(feedRangePartitionKey.PartitionKey, Cosmos.PartitionKey.None)) @@ -480,5 +488,26 @@ private static bool IsClientNoResponseSet(CosmosClientOptions clientOptions, Ope && clientOptions.EnableContentResponseOnWrite.HasValue && RequestInvokerHandler.IsItemNoRepsonseSet(clientOptions.EnableContentResponseOnWrite.Value, operationType); } + + internal static async Task ResolveFeedRangeBasedOnPrefixContainerAsync( + FeedRange feedRange, + ContainerInternal cosmosContainerCore, + CancellationToken cancellationToken) + { + if (feedRange is FeedRangePartitionKey feedRangePartitionKey) + { + PartitionKeyDefinition partitionKeyDefinition = await cosmosContainerCore + .GetPartitionKeyDefinitionAsync(cancellationToken) + .ConfigureAwait(false); + + if (partitionKeyDefinition != null && partitionKeyDefinition.Kind == PartitionKind.MultiHash + && feedRangePartitionKey.PartitionKey.InternalKey?.Components?.Count < partitionKeyDefinition.Paths?.Count) + { + feedRange = new FeedRangeEpk(feedRangePartitionKey.PartitionKey.InternalKey.GetEPKRangeForPrefixPartitionKey(partitionKeyDefinition)); + } + } + + return feedRange; + } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs index 0018eca9b7..31a3ccc5ca 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs @@ -959,12 +959,6 @@ private async Task ExtractPartitionKeyAndProcessItemStreamAsync // User specified PK value, no need to extract it if (partitionKey.HasValue) { - PartitionKeyDefinition pKeyDefinition = await this.GetPartitionKeyDefinitionAsync(); - if (partitionKey.HasValue && partitionKey.Value != PartitionKey.None && partitionKey.Value.InternalKey.Components.Count != pKeyDefinition.Paths.Count) - { - throw new ArgumentException(RMResources.MissingPartitionKeyValue); - } - return await this.ProcessItemStreamAsync( partitionKey, itemId, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index ed39221a61..041523ff8a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -38,6 +38,12 @@ │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Waiting for Initialization of client to complete(00000000-0000-0000-0000-000000000000) Unknown-Component 00:00:00:000 0.00 milliseconds + ├── Read Collection(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ ( + │ [Client Side Request Stats] + │ Redacted To Not Change The Baselines From Run To Run + │ ) ├── Batch Dispatch Async(00000000-0000-0000-0000-000000000000) Batch-Component 00:00:00:000 0.00 milliseconds │ ├── Using Wait(00000000-0000-0000-0000-000000000000) Batch-Component 00:00:00:000 0.00 milliseconds │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -72,7 +78,20 @@ }, { "name": "Get Collection Cache", - "duration in milliseconds": 0 + "duration in milliseconds": 0, + "children": [ + { + "name": "Waiting for Initialization of client to complete", + "duration in milliseconds": 0 + } + ] + }, + { + "name": "Read Collection", + "duration in milliseconds": 0, + "data": { + "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" + } }, { "name": "Batch Dispatch Async", @@ -1634,6 +1653,12 @@ │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds + │ └── Waiting for Initialization of client to complete(00000000-0000-0000-0000-000000000000) Unknown-Component 00:00:00:000 0.00 milliseconds + ├── Read Collection(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds + │ ( + │ [Client Side Request Stats] + │ Redacted To Not Change The Baselines From Run To Run + │ ) ├── Batch Dispatch Async(00000000-0000-0000-0000-000000000000) Batch-Component 00:00:00:000 0.00 milliseconds │ ├── Using Wait(00000000-0000-0000-0000-000000000000) Batch-Component 00:00:00:000 0.00 milliseconds │ ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -1808,7 +1833,20 @@ }, { "name": "Get Collection Cache", - "duration in milliseconds": 0 + "duration in milliseconds": 0, + "children": [ + { + "name": "Waiting for Initialization of client to complete", + "duration in milliseconds": 0 + } + ] + }, + { + "name": "Read Collection", + "duration in milliseconds": 0, + "data": { + "Client Side Request Stats": "Redacted To Not Change The Baselines From Run To Run" + } }, { "name": "Batch Dispatch Async", diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs index c77352d07f..3c590092db 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -1,5 +1,4 @@ -#if PREVIEW -namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests +namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests { using System; using System.Collections.Generic; @@ -13,9 +12,9 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests [TestClass] public class CosmosMultiHashTest { + private CosmosClient client = null; private Cosmos.Database database = null; - private CosmosClient client = null; private Container container = null; private ContainerProperties containerProperties = null; @@ -29,7 +28,7 @@ public async Task TestInitialize() this.client = TestCommon.CreateCosmosClient(true); this.database = await this.client.CreateDatabaseIfNotExistsAsync("mydb"); - this.containerProperties = new ContainerProperties("mycoll", new List { "/ZipCode", "/Address" }); + this.containerProperties = new ContainerProperties("mycoll", new List { "/ZipCode", "/City" }); this.container = await this.database.CreateContainerAsync(this.containerProperties); } @@ -37,6 +36,8 @@ public async Task TestInitialize() public async Task Cleanup() { await this.database.DeleteAsync(); + this.client.Dispose(); + HttpConstants.Versions.CurrentVersion = this.currentVersion; this.client.Dispose(); } @@ -44,25 +45,38 @@ public async Task Cleanup() [TestMethod] public async Task MultiHashCreateDocumentTest() { + Cosmos.PartitionKey pKey; //Document create test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + pKey= new PartitionKeyBuilder() + .Add(doc.GetPropertyValue("ZipCode")) + .Add(doc.GetPropertyValue("City")) + .Build(); + documents[0] = await this.container.CreateItemAsync(doc, pKey); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + pKey = new PartitionKeyBuilder() + .Add(doc.GetPropertyValue("ZipCode")) + .Add(doc.GetPropertyValue("City")) + .Build(); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + pKey = new PartitionKeyBuilder() + .Add(doc.GetPropertyValue("ZipCode")) + .Add(doc.GetPropertyValue("City")) + .Build(); + documents[2] = await this.container.CreateItemAsync(doc); Assert.AreEqual(3, documents.Select(document => ((Document)document).SelfLink).Distinct().Count()); @@ -72,14 +86,16 @@ public async Task MultiHashCreateDocumentTest() foreach (Document document in documents) { badPKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("ZipCode")) .Build(); document.Id += "Bad"; - ArgumentException createException = await Assert.ThrowsExceptionAsync(() => + CosmosException createException = await Assert.ThrowsExceptionAsync(() => this.container.CreateItemAsync(document, badPKey) ); + + Assert.AreEqual(createException.StatusCode, HttpStatusCode.BadRequest); } } @@ -91,45 +107,44 @@ public async Task MultiHashDeleteDocumentTest() //Create Items for test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); //Document Delete Test foreach (Document document in documents) { - //Negative test - using incomplete partition key + //Negative test - using incomplete partition key (try one with more values too) badPKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("ZipCode")) .Build(); CosmosException deleteException = await Assert.ThrowsExceptionAsync(() => this.container.DeleteItemAsync(document.Id, badPKey) ); - Assert.AreEqual(deleteException.StatusCode, HttpStatusCode.BadRequest); //Positive test pKey = new PartitionKeyBuilder() .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("City")) .Build(); - Document readDocument = (await this.container.DeleteItemAsync(document.Id, pKey)).Resource; + Document deleteDocument = (await this.container.DeleteItemAsync(document.Id, pKey)).Resource; CosmosException clientException = await Assert.ThrowsExceptionAsync(() => this.container.ReadItemAsync(document.Id, pKey) @@ -147,30 +162,30 @@ public async Task MultiHashReadItemTest() //Create Items for test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); //Document Read Test foreach (Document document in documents) { pKey = new PartitionKeyBuilder() .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("City")) .Build(); Document readDocument = (await this.container.ReadItemAsync(document.Id, pKey)).Resource; @@ -178,7 +193,7 @@ public async Task MultiHashReadItemTest() //Negative test - using incomplete partition key badPKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("ZipCode")) .Build(); CosmosException clientException = await Assert.ThrowsExceptionAsync(() => @@ -193,40 +208,47 @@ public async Task MultiHashReadItemTest() public async Task MultiHashReadManyTest() { Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; //Create Items for test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); //Read Many Test List<(string, Cosmos.PartitionKey)> itemList = new List<(string, Cosmos.PartitionKey)>(); + List<(string, Cosmos.PartitionKey)> incompleteList = new List<(string, Cosmos.PartitionKey)>(); foreach (Document document in documents) { pKey = new PartitionKeyBuilder() .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("City")) + .Build(); + + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) .Build(); itemList.Add((document.Id, pKey)); + incompleteList.Add((document.Id, badPKey)); } - FeedResponse feedResponse = await this.container.ReadManyItemsAsync(itemList); + FeedResponse feedResponse = await this.container.ReadManyItemsAsync(itemList); Assert.IsNotNull(feedResponse); Assert.AreEqual(feedResponse.Count, 3); @@ -234,17 +256,25 @@ public async Task MultiHashReadManyTest() Assert.IsNotNull(feedResponse.Diagnostics); int count = 0; - foreach (ToDoActivity item in feedResponse) + foreach (Document item in feedResponse) { count++; Assert.IsNotNull(item); - Assert.IsNotNull(item.pk); } Assert.AreEqual(count, 3); + + //Negative test - using incomplete partition key + await Assert.ThrowsExceptionAsync(() => + this.container.ReadManyItemsAsync(incompleteList)); } + public record DatabaseItem( + string Id, + string Pk + ); + [TestMethod] - public async Task MultiHashUpsetItemTest() + public async Task MultiHashUpsertItemTest() { Cosmos.PartitionKey pKey; Cosmos.PartitionKey badPKey; @@ -252,90 +282,92 @@ public async Task MultiHashUpsetItemTest() //Create Items for test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); //Document Upsert Test - doc1 = new Document { Id = "document4" }; - doc1.SetValue("ZipCode", "97756"); - doc1.SetValue("Address", "Redmond"); - doc1.SetValue("Type", "Residence"); + doc = new Document { Id = "document4" }; + doc.SetValue("ZipCode", "97756"); + doc.SetValue("City", "Redmond"); + doc.SetValue("Type", "Residence"); pKey = new PartitionKeyBuilder() - .Add(doc1.GetPropertyValue("ZipCode")) - .Add(doc1.GetPropertyValue("Address")) + .Add(doc.GetPropertyValue("ZipCode")) + .Add(doc.GetPropertyValue("City")) .Build(); //insert check - await this.container.UpsertItemAsync(doc1, pKey); + await this.container.UpsertItemAsync(doc, pKey); - Document readCheck = (await this.container.ReadItemAsync(doc1.Id, pKey)).Resource; + Document readCheck = (await this.container.ReadItemAsync(doc.Id, pKey)).Resource; - Assert.AreEqual(doc1.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); - Assert.AreEqual(doc1.GetPropertyValue("Address"), readCheck.GetPropertyValue("Address")); - Assert.AreEqual(doc1.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); + Assert.AreEqual(doc.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); + Assert.AreEqual(doc.GetPropertyValue("City"), readCheck.GetPropertyValue("City")); + Assert.AreEqual(doc.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); - doc1 = new Document { Id = "document4" }; - doc1.SetValue("ZipCode", "97756"); - doc1.SetValue("Address", "Redmond"); - doc1.SetValue("Type", "Business"); + doc = new Document { Id = "document4" }; + doc.SetValue("ZipCode", "97756"); + doc.SetValue("City", "Redmond"); + doc.SetValue("Type", "Business"); //update check pKey = new PartitionKeyBuilder() - .Add(doc1.GetPropertyValue("ZipCode")) - .Add(doc1.GetPropertyValue("Address")) + .Add(doc.GetPropertyValue("ZipCode")) + .Add(doc.GetPropertyValue("City")) .Build(); - documents.Append>(await this.container.UpsertItemAsync(doc1, pKey)); + documents.Append>(await this.container.UpsertItemAsync(doc, pKey)); - readCheck = (await this.container.ReadItemAsync(doc1.Id, pKey)).Resource; + readCheck = (await this.container.ReadItemAsync(doc.Id, pKey)).Resource; - Assert.AreEqual(doc1.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); - Assert.AreEqual(doc1.GetPropertyValue("Address"), readCheck.GetPropertyValue("Address")); - Assert.AreEqual(doc1.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); + Assert.AreEqual(doc.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); + Assert.AreEqual(doc.GetPropertyValue("City"), readCheck.GetPropertyValue("City")); + Assert.AreEqual(doc.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); count = 0; - foreach (Document doc in this.container.GetItemLinqQueryable(true)) + foreach (Document document in this.container.GetItemLinqQueryable(true)) { count++; } Assert.AreEqual(4, count); //Negative test - using incomplete partition key - doc1 = new Document { Id = "document4" }; - doc1.SetValue("ZipCode", "97756"); - doc1.SetValue("Address", "Redmond"); - doc1.SetValue("Type", "Residence"); + doc = new Document { Id = "document4" }; + doc.SetValue("ZipCode", "97756"); + doc.SetValue("City", "Redmond"); + doc.SetValue("Type", "Residence"); badPKey = new PartitionKeyBuilder() - .Add(doc1.GetPropertyValue("ZipCode")) + .Add(doc.GetPropertyValue("ZipCode")) .Build(); - await Assert.ThrowsExceptionAsync(() => - this.container.UpsertItemAsync(doc1, badPKey) + CosmosException clientException = await Assert.ThrowsExceptionAsync(() => + this.container.UpsertItemAsync(doc, badPKey) ); - readCheck = (await this.container.ReadItemAsync(doc1.Id, pKey)).Resource; + Assert.AreEqual(clientException.StatusCode, HttpStatusCode.BadRequest); + + readCheck = (await this.container.ReadItemAsync(doc.Id, pKey)).Resource; - Assert.AreEqual(doc1.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); - Assert.AreEqual(doc1.GetPropertyValue("Address"), readCheck.GetPropertyValue("Address")); - Assert.AreNotEqual(doc1.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); + Assert.AreEqual(doc.GetPropertyValue("ZipCode"), readCheck.GetPropertyValue("ZipCode")); + Assert.AreEqual(doc.GetPropertyValue("City"), readCheck.GetPropertyValue("City")); + Assert.AreNotEqual(doc.GetPropertyValue("Type"), readCheck.GetPropertyValue("Type")); } [TestMethod] @@ -346,30 +378,30 @@ public async Task MultiHashReplaceItemTest() //Create items for test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); //Document Replace Test foreach (Document document in documents) { pKey = new PartitionKeyBuilder() .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("City")) .Build(); @@ -383,14 +415,16 @@ public async Task MultiHashReplaceItemTest() //Negative test - using incomplete partition key badPKey = new PartitionKeyBuilder() - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("ZipCode")) .Build(); readDocument.SetValue("Type", "Goverment"); - await Assert.ThrowsExceptionAsync(() => + CosmosException clientException = await Assert.ThrowsExceptionAsync(() => this.container.ReplaceItemAsync(document, document.Id, partitionKey: badPKey) ); + + Assert.AreEqual(clientException.StatusCode, HttpStatusCode.BadRequest); } } @@ -398,37 +432,59 @@ await Assert.ThrowsExceptionAsync(() => public async Task MultiHashQueryItemTest() { Cosmos.PartitionKey pKey; + Cosmos.PartitionKey badPKey; //Create items for test ItemResponse[] documents = new ItemResponse[3]; - Document doc1 = new Document { Id = "document1" }; - doc1.SetValue("ZipCode", "500026"); - doc1.SetValue("Address", "Secunderabad"); - doc1.SetValue("Type", "Residence"); - documents[0] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document2" }; - doc1.SetValue("ZipCode", "15232"); - doc1.SetValue("Address", "Pittsburgh"); - doc1.SetValue("Type", "Business"); - documents[1] = await this.container.CreateItemAsync(doc1); - - doc1 = new Document { Id = "document3" }; - doc1.SetValue("ZipCode", "11790"); - doc1.SetValue("Address", "Stonybrook"); - doc1.SetValue("Type", "Goverment"); - documents[2] = await this.container.CreateItemAsync(doc1); + Document doc = new Document { Id = "document1" }; + doc.SetValue("ZipCode", "500026"); + doc.SetValue("City", "Secunderabad"); + doc.SetValue("Type", "Residence"); + documents[0] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document2" }; + doc.SetValue("ZipCode", "15232"); + doc.SetValue("City", "Pittsburgh"); + doc.SetValue("Type", "Business"); + documents[1] = await this.container.CreateItemAsync(doc); + + doc = new Document { Id = "document3" }; + doc.SetValue("ZipCode", "11790"); + doc.SetValue("City", "Stonybrook"); + doc.SetValue("Type", "Goverment"); + documents[2] = await this.container.CreateItemAsync(doc); //Query foreach (Document document in documents) { pKey = new PartitionKeyBuilder() .Add(document.GetPropertyValue("ZipCode")) - .Add(document.GetPropertyValue("Address")) + .Add(document.GetPropertyValue("City")) .Build(); - String query = $"SELECT * from c where c.id = {document.GetPropertyValue("Id")}"; + badPKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("City")) + .Build(); + + String query = $"SELECT * from c where c.id = \"{document.GetPropertyValue("id")}\""; + + using (FeedIterator feedIterator = this.container.GetItemQueryIterator( + query, + null, + new QueryRequestOptions() { PartitionKey = pKey })) + { + Assert.IsTrue(feedIterator.HasMoreResults); + + FeedResponse queryDoc = await feedIterator.ReadNextAsync(); + queryDoc.First(); + Assert.IsTrue(queryDoc.Count == 1); + feedIterator.Dispose(); + } + //Using an incomplete partition key with prefix of PK path definition + pKey = new PartitionKeyBuilder() + .Add(document.GetPropertyValue("ZipCode")) + .Build(); using (FeedIterator feedIterator = this.container.GetItemQueryIterator( query, null, @@ -437,11 +493,25 @@ public async Task MultiHashQueryItemTest() Assert.IsTrue(feedIterator.HasMoreResults); FeedResponse queryDoc = await feedIterator.ReadNextAsync(); + queryDoc.First(); + Assert.IsTrue(queryDoc.Count == 1); + feedIterator.Dispose(); } + //Negative test - using incomplete partition key + using (FeedIterator badFeedIterator = this.container.GetItemQueryIterator( + query, + null, + new QueryRequestOptions() { PartitionKey = badPKey})) + { + FeedResponse queryDocBad = await badFeedIterator.ReadNextAsync(); + Assert.ThrowsException(() => + queryDocBad.First() + ); + badFeedIterator.Dispose(); + } } } } -} -#endif +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedRangeCreateFromPartitionKeyAsyncEmulatorTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedRangeCreateFromPartitionKeyAsyncEmulatorTests.cs new file mode 100644 index 0000000000..6df5b0a66f --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedRangeCreateFromPartitionKeyAsyncEmulatorTests.cs @@ -0,0 +1,344 @@ +namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Threading.Tasks; + using System.Xml; + using Microsoft.Azure.Cosmos; + using Microsoft.Azure.Documents; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + using Database = Database; + using PartitionKey = PartitionKey; + using PartitionKeyDefinitionVersion = PartitionKeyDefinitionVersion; + + /// + /// Testing Prefix and Full Partition for , against a with Hierarchical Partition Keys. + /// + /// + [TestClass] + public class FeedRangeCreateFromPartitionKeyAsyncEmulatorTests + { + private CosmosClient client = null; + private Database database = null; + + private readonly string currentVersion = HttpConstants.Versions.CurrentVersion; + + [TestInitialize] + public async Task TestInit() + { + HttpConstants.Versions.CurrentVersion = "2020-07-15"; + this.client = TestCommon.CreateCosmosClient(true); + + string databaseName = Guid.NewGuid().ToString(); + DatabaseResponse databaseResponse = await this.client.CreateDatabaseIfNotExistsAsync(databaseName); + this.database = databaseResponse; + } + + [TestCleanup] + public async Task TestCleanup() + { + await this.database.DeleteAsync(); + this.client.Dispose(); + + HttpConstants.Versions.CurrentVersion = this.currentVersion; + } + + /// + /// Using to create a new with Hierarchical Partition Keys. + /// Using with a Prefix partition on a MultiHash V2 . + /// + /// + /// + [TestMethod] + public async Task GetChangeFeedIteratorWithPrefixPartitionKeyReturnsFeedIterator() + { + Container container = await this.database.CreateContainerIfNotExistsAsync(new(id: @"TestMultiHashedContainer", partitionKeyPaths: new List() { "/city", "/state", "/zipCode" })); + ContainerProperties containerProperties = await container.ReadContainerAsync(); + + Assert.AreEqual(expected: PartitionKeyDefinitionVersion.V2, actual: containerProperties.PartitionKeyDefinitionVersion); + Assert.AreEqual(expected: 3, actual: containerProperties.PartitionKey.Paths.Count); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/city")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/state")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/zipCode")); + Assert.AreEqual(expected: Documents.PartitionKind.MultiHash, actual: containerProperties.PartitionKey.Kind); + + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98502" }; + PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Add(item.zipCode) + .Build(); + + _ = await container.CreateItemAsync(item: item, partitionKey: partitionKey); + + partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Build(); + + FeedRange feedRange = new FeedRangePartitionKey(partitionKey); + FeedIterator iterator = container.GetChangeFeedIterator(ChangeFeedStartFrom.Beginning(feedRange), ChangeFeedMode.Incremental); + FeedResponse response = await iterator.ReadNextAsync(); + + string json = JsonConvert.SerializeObject(response.First()); + JObject @object = JObject.Parse(json); + + Assert.AreEqual(expected: item.id, actual: @object["id"]); + Assert.AreEqual(expected: item.city, actual: @object["city"]); + Assert.AreEqual(expected: item.state, actual: @object["state"]); + Assert.AreEqual(expected: item.zipCode, actual: @object["zipCode"]); + } + + /// + /// Using to create a new with hierarchical partition keys. + /// Using with a Prefix Partition on a MultiHash . + /// + /// + /// + [TestMethod] + public async Task GetChangeFeedStreamIteratorWithPrefixPartitionKeyReturnsFeedIterator() + { + Container container = await this.database.CreateContainerIfNotExistsAsync(new(id: @"TestMultiHashedContainer", partitionKeyPaths: new List() { "/city", "/state", "/zipCode" })); + ContainerProperties containerProperties = await container.ReadContainerAsync(); + + Assert.AreEqual(expected: PartitionKeyDefinitionVersion.V2, actual: containerProperties.PartitionKeyDefinitionVersion); + Assert.AreEqual(expected: 3, actual: containerProperties.PartitionKey.Paths.Count); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/city")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/state")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/zipCode")); + Assert.AreEqual(expected: Documents.PartitionKind.MultiHash, actual: containerProperties.PartitionKey.Kind); + + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98502" }; + PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Add(item.zipCode) + .Build(); + + _ = await container.CreateItemAsync(item: item, partitionKey: partitionKey); + + partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Build(); + + FeedRange feedRange = new FeedRangePartitionKey(partitionKey); + using (FeedIterator iterator = container.GetChangeFeedStreamIterator(ChangeFeedStartFrom.Beginning(feedRange), ChangeFeedMode.Incremental)) + { + ResponseMessage responseMessage = await iterator.ReadNextAsync(); + + using (StreamReader streamReader = new(responseMessage.Content)) + { + string content = await streamReader.ReadToEndAsync(); + + JObject @object = JObject.Parse(content); + JToken token = @object["Documents"].First(); + + Assert.AreEqual(expected: item.id, actual: token["id"]); + Assert.AreEqual(expected: item.city, actual: token["city"]); + Assert.AreEqual(expected: item.state, actual: token["state"]); + Assert.AreEqual(expected: item.zipCode, actual: token["zipCode"]); + } + } + } + + /// + /// Using to create a new with Hierarchical Partition Keys. + /// using with a Prefix partition on a MultiHash V2 . + /// + /// + /// + [TestMethod] + [Ignore("Query is returning 'Partition key provided either doesn't correspond to definition in the collection or doesn't match partition key field values specified in the document.' Investigation.")] + [Owner("naga.naravamakula")] + public async Task GetItemQueryIteratorWithPrefixPartitionKeyReturnsFeedIterator() + { + Container container = await this.database.CreateContainerIfNotExistsAsync(new(id: @"TestMultiHashedContainer", partitionKeyPaths: new List() { "/city", "/state", "/zipCode" })); + ContainerProperties containerProperties = await container.ReadContainerAsync(); + + Assert.AreEqual(expected: PartitionKeyDefinitionVersion.V2, actual: containerProperties.PartitionKeyDefinitionVersion); + Assert.AreEqual(expected: 3, actual: containerProperties.PartitionKey.Paths.Count); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/city")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/state")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/zipCode")); + Assert.AreEqual(expected: Documents.PartitionKind.MultiHash, actual: containerProperties.PartitionKey.Kind); + + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98052" }; + PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Add(item.zipCode) + .Build(); + + _ = await container.CreateItemAsync(item: item, partitionKey: partitionKey); + + QueryDefinition queryDefinition = new QueryDefinition(query: "SELECT * FROM c WHERE c.city = @cityInput AND c.state = @stateInput") + .WithParameter("@cityInput", "Redmond") + .WithParameter("@stateInput", "WA"); + + partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Build(); + + FeedRange feedRange = new FeedRangePartitionKey(partitionKey); + Console.WriteLine(feedRange.ToJsonString()); + using (FeedIterator iterator = container.GetItemQueryIterator(feedRange: feedRange, queryDefinition: queryDefinition, requestOptions: new() { PartitionKey = partitionKey })) + { + FeedResponse feedResponse = await iterator.ReadNextAsync(); + + string content = JsonConvert.SerializeObject(feedResponse.First()); + JObject @object = JObject.Parse(content); + + Assert.AreEqual(expected: item.id, actual: @object["id"]); + Assert.AreEqual(expected: item.city, actual: @object["city"]); + Assert.AreEqual(expected: item.state, actual: @object["state"]); + Assert.AreEqual(expected: item.zipCode, actual: @object["zipCode"]); + } + } + + /// + /// Using to create a new with Hierarchical Partition Keys. + /// Using with a Prefix Partition on a MultiHash V2 . + /// + /// + /// + [TestMethod] + public async Task GetItemQueryStreamIteratorWithPrefixPartitionKeyReturnsFeedIterator() + { + Container container = await this.database.CreateContainerIfNotExistsAsync(new(id: @"TestMultiHashedContainer", partitionKeyPaths: new List() { "/city", "/state", "/zipCode" })); + ContainerProperties containerProperties = await container.ReadContainerAsync(); + + Assert.AreEqual(expected: PartitionKeyDefinitionVersion.V2, actual: containerProperties.PartitionKeyDefinitionVersion); + Assert.AreEqual(expected: 3, actual: containerProperties.PartitionKey.Paths.Count); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/city")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/state")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/zipCode")); + Assert.AreEqual(expected: Documents.PartitionKind.MultiHash, actual: containerProperties.PartitionKey.Kind); + + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98052" }; + PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Add(item.zipCode) + .Build(); + + _ = await container.CreateItemAsync(item: item, partitionKey: partitionKey); + + QueryDefinition queryDefinition = new QueryDefinition(query: "SELECT * FROM c WHERE c.city = @cityInput AND c.state = @stateInput") + .WithParameter("@cityInput", "Redmond") + .WithParameter("@stateInput", "WA"); + + using (FeedIterator iterator = container.GetItemQueryStreamIterator(queryDefinition: queryDefinition, requestOptions: new() { PartitionKey = partitionKey })) + { + ResponseMessage responseMessage = await iterator.ReadNextAsync(); + + using (StreamReader streamReader = new(responseMessage.Content)) + { + string content = await streamReader.ReadToEndAsync(); + + JObject @object = JObject.Parse(content); + JToken token = @object["Documents"].First(); + + Assert.AreEqual(expected: item.id, actual: token["id"]); + Assert.AreEqual(expected: item.city, actual: token["city"]); + Assert.AreEqual(expected: item.state, actual: token["state"]); + Assert.AreEqual(expected: item.zipCode, actual: token["zipCode"]); + } + } + } + + /// + /// Using to create a new with Hierarchical Partition Keys. + /// Using with a Full Partition on a MultiHash V2 . + /// + /// + /// + [TestMethod] + public async Task ReadItemWithFullPartitionKeyReturnsFeedIterator() + { + ContainerProperties containerProperties = new(id: @"TestMultiHashedContainer", partitionKeyDefinition: new Documents.PartitionKeyDefinition + { + Kind = Documents.PartitionKind.MultiHash, + Version = Documents.PartitionKeyDefinitionVersion.V2, + Paths = new System.Collections.ObjectModel.Collection(new List() { "/city", "/state", "/zipCode" }) + }); + + Container container = await this.database.CreateContainerIfNotExistsAsync(containerProperties: containerProperties); + + Assert.AreEqual(expected: PartitionKeyDefinitionVersion.V2, actual: containerProperties.PartitionKeyDefinitionVersion); + Assert.AreEqual(expected: 3, actual: containerProperties.PartitionKey.Paths.Count); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/city")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/state")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/zipCode")); + Assert.AreEqual(expected: Documents.PartitionKind.MultiHash, actual: containerProperties.PartitionKey.Kind); + + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98052" }; + PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Add(item.zipCode) + .Build(); + + _ = await container.CreateItemAsync(item: item, partitionKey: partitionKey); + + ItemResponse itemResponse = await container.ReadItemAsync(id: item.id, partitionKey: partitionKey); + + string content = JsonConvert.SerializeObject(itemResponse.Resource); + JObject @object = JObject.Parse(content); + + Assert.AreEqual(expected: item.id, actual: @object["id"]); + Assert.AreEqual(expected: item.city, actual: @object["city"]); + Assert.AreEqual(expected: item.state, actual: @object["state"]); + Assert.AreEqual(expected: item.zipCode, actual: @object["zipCode"]); + } + + /// + /// Using to create a new with Hierarchical Partition Keys. + /// Using + /// Using with a Full Partition on a MultiHash V2 . + /// + /// + /// + [TestMethod] + public async Task ReadItemStreamWithFullPartitionKeyReturnsFeedIterator() + { + Container container = await this.database.CreateContainerIfNotExistsAsync(new(id: @"TestMultiHashedContainer", partitionKeyPaths: new List() { "/city", "/state", "/zipCode" })); + ContainerProperties containerProperties = await container.ReadContainerAsync(); + + Assert.AreEqual(expected: PartitionKeyDefinitionVersion.V2, actual: containerProperties.PartitionKeyDefinitionVersion); + Assert.AreEqual(expected: 3, actual: containerProperties.PartitionKey.Paths.Count); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/city")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/state")); + Assert.IsTrue(containerProperties.PartitionKey.Paths.Contains("/zipCode")); + Assert.AreEqual(expected: Documents.PartitionKind.MultiHash, actual: containerProperties.PartitionKey.Kind); + + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98052" }; + PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Add(item.zipCode) + .Build(); + + _ = await container.CreateItemAsync(item: item, partitionKey: partitionKey); + + using (ResponseMessage responseMessage = await container.ReadItemStreamAsync(id: item.id, partitionKey: partitionKey)) + { + using (StreamReader streamReader = new(responseMessage.Content)) + { + string content = await streamReader.ReadToEndAsync(); + JObject @object = JObject.Parse(content); + + Assert.AreEqual(expected: item.id, actual: @object["id"]); + Assert.AreEqual(expected: item.city, actual: @object["city"]); + Assert.AreEqual(expected: item.state, actual: @object["state"]); + Assert.AreEqual(expected: item.zipCode, actual: @object["zipCode"]); + } + } + } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/HandlerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/HandlerTests.cs index 8884e22815..ae5dccd2c8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/HandlerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/HandlerTests.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Cosmos.Tests using System; using System.Collections; using System.Collections.Generic; + using System.Collections.ObjectModel; using System.Globalization; using System.IO; using System.Linq; @@ -438,6 +439,153 @@ public void TestAggregateExceptionConverter() Assert.IsTrue(response.ErrorMessage.Contains(errorMessage)); } + [TestMethod] + public async Task TestResolveFeedRangeBasedOnPrefixWithFeedRangePartitionKeyAndMultiHashContainerAsync() + { + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond", state = "WA", zipCode = "98502" }; + Cosmos.PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Add(item.state) + .Build(); + + await HandlerTests.TestResolveFeedRangeBasedOnPrefixAsync( + partitionKeyDefinition: new PartitionKeyDefinition() + { + Kind = PartitionKind.MultiHash, + Paths = new Collection(new List() { "/city", "/state", "/zipCode" }) + }, + inputFeedRange: new FeedRangePartitionKey(partitionKey), + expectedFeedRange: new FeedRangeEpk(new Documents.Routing.Range( + min: "01620B162169497AFD85FA66E99F73760845FB119899DE50766A2C4CEFC2FA73", + max: "01620B162169497AFD85FA66E99F73760845FB119899DE50766A2C4CEFC2FA73FF", + isMinInclusive: true, + isMaxInclusive: default)), + getPartitionKeyDefinitionAsyncExecutions: Moq.Times.Once()); + } + + [TestMethod] + public async Task TestResolveFeedRangeBasedOnPrefixWithFeedRangePartitionKeyOnHashContainerAsync() + { + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond" }; + Cosmos.PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Build(); + + await HandlerTests.TestResolveFeedRangeBasedOnPrefixAsync( + partitionKeyDefinition: new PartitionKeyDefinition() + { + Kind = PartitionKind.Hash, + Paths = new Collection(new List() { "/city" }) + }, + inputFeedRange: new FeedRangePartitionKey(partitionKey), + expectedFeedRange: new FeedRangePartitionKey(partitionKey), + getPartitionKeyDefinitionAsyncExecutions: Moq.Times.Once()); + } + + [TestMethod] + public async Task TestResolveFeedRangeBasedOnPrefixWithFeedRangePartitionKeyOnRangeContainerAsync() + { + dynamic item = new { id = Guid.NewGuid().ToString(), city = "Redmond" }; + Cosmos.PartitionKey partitionKey = new PartitionKeyBuilder() + .Add(item.city) + .Build(); + + await HandlerTests.TestResolveFeedRangeBasedOnPrefixAsync( + partitionKeyDefinition: new PartitionKeyDefinition() + { + Kind = PartitionKind.Range, + Paths = new Collection(new List() { "/city" }) + }, + inputFeedRange: new FeedRangePartitionKey(partitionKey), + expectedFeedRange: new FeedRangePartitionKey(partitionKey), + getPartitionKeyDefinitionAsyncExecutions: Moq.Times.Once()); + } + + [TestMethod] + public async Task TestResolveFeedRangeBasedOnPrefixWithFeedRangeEpkOnMultiHashContainerAsync() + { + await HandlerTests.TestResolveFeedRangeBasedOnPrefixAsync( + partitionKeyDefinition: new PartitionKeyDefinition() + { + Kind = PartitionKind.MultiHash, + Paths = new Collection(new List() { "/city", "/state", "/zipCode" }) + }, + inputFeedRange: FeedRangeEpk.FullRange, + expectedFeedRange: FeedRangeEpk.FullRange, + getPartitionKeyDefinitionAsyncExecutions: Moq.Times.Never()); + } + + [TestMethod] + public async Task TestResolveFeedRangeBasedOnPrefixWithFeedRangeEpkOnHashContainerAsync() + { + await HandlerTests.TestResolveFeedRangeBasedOnPrefixAsync( + partitionKeyDefinition: new PartitionKeyDefinition() + { + Kind = PartitionKind.Hash, + Paths = new Collection(new List() { "/city" }) + }, + inputFeedRange: FeedRangeEpk.FullRange, + expectedFeedRange: FeedRangeEpk.FullRange, + getPartitionKeyDefinitionAsyncExecutions: Moq.Times.Never()); + } + + [TestMethod] + public async Task TestResolveFeedRangeBasedOnPrefixWithFeedRangeEpkOnRangeContainerAsync() + { + await HandlerTests.TestResolveFeedRangeBasedOnPrefixAsync( + partitionKeyDefinition: new PartitionKeyDefinition() + { + Kind = PartitionKind.Range, + Paths = new Collection(new List() { "/city" }) + }, + inputFeedRange: FeedRangeEpk.FullRange, + expectedFeedRange: FeedRangeEpk.FullRange, + getPartitionKeyDefinitionAsyncExecutions: Moq.Times.Never()); + } + + private static async Task TestResolveFeedRangeBasedOnPrefixAsync( + PartitionKeyDefinition partitionKeyDefinition, + FeedRangeInternal inputFeedRange, + FeedRangeInternal expectedFeedRange, + Moq.Times getPartitionKeyDefinitionAsyncExecutions) + where TFeedRange : FeedRangeInternal + { + using CosmosClient client = MockCosmosUtil.CreateMockCosmosClient( + accountConsistencyLevel: Cosmos.ConsistencyLevel.Strong, + customizeClientBuilder: builder => builder.WithConsistencyLevel(Cosmos.ConsistencyLevel.Eventual)); + + Moq.Mock mockContainer = MockCosmosUtil.CreateMockContainer( + dbName: Guid.NewGuid().ToString(), + containerName: Guid.NewGuid().ToString()); + + CancellationToken cancellationToken = CancellationToken.None; + + mockContainer + .Setup(container => container.GetPartitionKeyDefinitionAsync(cancellationToken)) + .Returns(Task.FromResult(partitionKeyDefinition)); + + RequestInvokerHandler invoker = new( + client: client, + requestedClientConsistencyLevel: default); + + Cosmos.FeedRange feedRange = await RequestInvokerHandler.ResolveFeedRangeBasedOnPrefixContainerAsync( + feedRange: inputFeedRange, + cosmosContainerCore: mockContainer.Object, + cancellationToken: cancellationToken); + + mockContainer.Verify(x => x.GetPartitionKeyDefinitionAsync(Moq.It.IsAny()), getPartitionKeyDefinitionAsyncExecutions); + + Assert.IsNotNull(feedRange, "FeedRange did not initialize"); + + Assert.IsInstanceOfType( + value: feedRange, + expectedType: typeof(TFeedRange)); + + Assert.AreEqual( + expected: expectedFeedRange.ToJsonString(), + actual: feedRange.ToJsonString()); + } + private class SomePayload { public string V1 { get; set; } From 6ebb8d4c22fc1f7d4329ac1956c6102d3f0f883c Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 9 Mar 2023 21:07:11 +0530 Subject: [PATCH 071/164] [Internal] ClientTelemetry: Adds logic to limit payload size to 2 MB (#3717) * first draft wip fix test and logic * resolve conflicts * limit 2 mb * ad callback * fix tests * code refactor * cosmos json to newtosoft json * clean up files * fix logging to argumrnt based * code refactor * add null check --- .../src/Telemetry/ClientTelemetry.cs | 184 +++---------- .../src/Telemetry/ClientTelemetryHelper.cs | 117 +++----- .../src/Telemetry/ClientTelemetryOptions.cs | 8 +- .../Telemetry/ClientTelemetryPayloadWriter.cs | 161 +++++++++++ .../src/Telemetry/ClientTelemetryProcessor.cs | 142 ++++++++++ .../Models/ClientTelemetryProperties.cs | 72 +++++ .../ClientTelemetryTests.cs | 36 +-- .../Microsoft.Azure.Cosmos.Tests.csproj | 4 + .../ClientTelemetryPayloadWithoutMetrics.json | 135 +++++++++ .../Telemetry/ClientTelemetryTests.cs | 258 ++++++++++++++++++ 10 files changed, 859 insertions(+), 258 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs create mode 100644 Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryPayloadWithoutMetrics.json create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs index 82e212f7f3..d0ca7d8ac8 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs @@ -8,8 +8,6 @@ namespace Microsoft.Azure.Cosmos.Telemetry using System.Collections.Concurrent; using System.Collections.Generic; using System.Net; - using System.Net.Http; - using System.Text; using System.Threading; using System.Threading.Tasks; using Handler; @@ -20,9 +18,6 @@ namespace Microsoft.Azure.Cosmos.Telemetry using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Cosmos.Tracing.TraceData; using Microsoft.Azure.Documents; - using Microsoft.Azure.Documents.Collections; - using Microsoft.Azure.Documents.Rntbd; - using Newtonsoft.Json; using Util; using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; @@ -36,12 +31,10 @@ internal class ClientTelemetry : IDisposable { private const int allowedNumberOfFailures = 3; - private static readonly Uri endpointUrl = ClientTelemetryOptions.GetClientTelemetryEndpoint(); private static readonly TimeSpan observingWindow = ClientTelemetryOptions.GetScheduledTimeSpan(); private readonly ClientTelemetryProperties clientTelemetryInfo; - private readonly CosmosHttpClient httpClient; - private readonly AuthorizationTokenProvider tokenProvider; + private readonly ClientTelemetryProcessor processor; private readonly DiagnosticsHandlerHelper diagnosticsHelper; private readonly CancellationTokenSource cancellationTokenSource; @@ -108,7 +101,7 @@ public static ClientTelemetry CreateAndStartBackgroundTelemetry( return clientTelemetry; } - private ClientTelemetry( + internal ClientTelemetry( string clientId, CosmosHttpClient httpClient, string userAgent, @@ -118,9 +111,8 @@ private ClientTelemetry( IReadOnlyList preferredRegions, GlobalEndpointManager globalEndpointManager) { - this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); this.diagnosticsHelper = diagnosticsHelper ?? throw new ArgumentNullException(nameof(diagnosticsHelper)); - this.tokenProvider = authorizationTokenProvider ?? throw new ArgumentNullException(nameof(authorizationTokenProvider)); + this.processor = new ClientTelemetryProcessor(httpClient, authorizationTokenProvider); this.clientTelemetryInfo = new ClientTelemetryProperties( clientId: clientId, @@ -170,6 +162,7 @@ private async Task EnrichAndSendAsync() await Task.Delay(observingWindow, this.cancellationTokenSource.Token); + this.clientTelemetryInfo.DateTimeUtc = DateTime.UtcNow.ToString(ClientTelemetryOptions.DateFormat); this.clientTelemetryInfo.MachineId = VmMetadataApiHandler.GetMachineId(); // Load host information from cache @@ -177,32 +170,37 @@ private async Task EnrichAndSendAsync() this.clientTelemetryInfo.ApplicationRegion = vmInformation?.Location; this.clientTelemetryInfo.HostEnvInfo = ClientTelemetryOptions.GetHostInformation(vmInformation); - // If cancellation is requested after the delay then return from here. - if (this.cancellationTokenSource.IsCancellationRequested) - { - DefaultTrace.TraceInformation("Observer Task Cancelled."); - - break; - } - - this.RecordSystemUtilization(); + this.clientTelemetryInfo.SystemInfo = ClientTelemetryHelper.RecordSystemUtilization(this.diagnosticsHelper, + this.clientTelemetryInfo.IsDirectConnectionMode); - this.clientTelemetryInfo.DateTimeUtc = DateTime.UtcNow.ToString(ClientTelemetryOptions.DateFormat); - - ConcurrentDictionary operationInfoSnapshot + // Take the copy for further processing i.e. serializing and dividing into chunks + ConcurrentDictionary operationInfoSnapshot = Interlocked.Exchange(ref this.operationInfoMap, new ConcurrentDictionary()); ConcurrentDictionary cacheRefreshInfoSnapshot - = Interlocked.Exchange(ref this.cacheRefreshInfoMap, new ConcurrentDictionary()); + = Interlocked.Exchange(ref this.cacheRefreshInfoMap, new ConcurrentDictionary()); ConcurrentDictionary requestInfoSnapshot = Interlocked.Exchange(ref this.requestInfoMap, new ConcurrentDictionary()); - this.clientTelemetryInfo.OperationInfo = ClientTelemetryHelper.ToListWithMetricsInfo(operationInfoSnapshot); - this.clientTelemetryInfo.CacheRefreshInfo = ClientTelemetryHelper.ToListWithMetricsInfo(cacheRefreshInfoSnapshot); - this.clientTelemetryInfo.RequestInfo = ClientTelemetryHelper.ToListWithMetricsInfo(requestInfoSnapshot); - - await this.SendAsync(); + try + { + await this.processor + .ProcessAndSendAsync( + clientTelemetryInfo: this.clientTelemetryInfo, + operationInfoSnapshot: operationInfoSnapshot, + cacheRefreshInfoSnapshot: cacheRefreshInfoSnapshot, + requestInfoSnapshot: requestInfoSnapshot, + cancellationToken: this.cancellationTokenSource.Token); + + this.numberOfFailures = 0; + } + catch (Exception ex) + { + this.numberOfFailures++; + + DefaultTrace.TraceError("Telemetry Job Processor failed with error : {0}", ex); + } } } catch (Exception ex) @@ -233,8 +231,8 @@ internal void CollectCacheInfo(string cacheRefreshSource, throw new ArgumentNullException(nameof(cacheRefreshSource)); } - DefaultTrace.TraceVerbose($"Collecting cacheRefreshSource {cacheRefreshSource} data for Telemetry."); - + DefaultTrace.TraceVerbose($"Collecting cacheRefreshSource {0} data for Telemetry.", cacheRefreshSource); + string regionsContacted = ClientTelemetryHelper.GetContactedRegions(regionsContactedList); // Recording Request Latency @@ -290,7 +288,7 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, ITrace trace) { DefaultTrace.TraceVerbose("Collecting Operation data for Telemetry."); - + if (cosmosDiagnostics == null) { throw new ArgumentNullException(nameof(cosmosDiagnostics)); @@ -301,7 +299,7 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, this.RecordRntbdResponses(containerId, databaseId, summaryDiagnostics.StoreResponseStatistics.Value); string regionsContacted = ClientTelemetryHelper.GetContactedRegions(cosmosDiagnostics.GetContactedRegions()); - + // Recording Request Latency and Request Charge OperationInfo payloadKey = new OperationInfo(regionsContacted: regionsContacted?.ToString(), responseSizeInBytes: responseSizeInBytes, @@ -370,126 +368,6 @@ private void RecordRntbdResponses(string containerId, string databaseId, List - /// Record CPU and memory usage which will be sent as part of telemetry information - /// - private void RecordSystemUtilization() - { - try - { - DefaultTrace.TraceVerbose("Started Recording System Usage for telemetry."); - - SystemUsageHistory systemUsageHistory = this.diagnosticsHelper.GetClientTelemetrySystemHistory(); - - if (systemUsageHistory != null ) - { - ClientTelemetryHelper.RecordSystemUsage( - systemUsageHistory: systemUsageHistory, - systemInfoCollection: this.clientTelemetryInfo.SystemInfo, - isDirectConnectionMode: this.clientTelemetryInfo.IsDirectConnectionMode); - } - else - { - DefaultTrace.TraceWarning("System Usage History not available"); - } - } - catch (Exception ex) - { - DefaultTrace.TraceError("System Usage Recording Error : {0} ", ex); - } - } - - /// - /// Task to send telemetry information to configured Juno endpoint. - /// If endpoint is not configured then it won't even try to send information. It will just trace an error message. - /// In any case it resets the telemetry information to collect the latest one. - /// - /// Async Task - private async Task SendAsync() - { - if (endpointUrl == null) - { - DefaultTrace.TraceError("Telemetry is enabled but endpoint is not configured"); - return; - } - - try - { - DefaultTrace.TraceInformation("Sending Telemetry Data to {0}", endpointUrl.AbsoluteUri); - - string json = JsonConvert.SerializeObject(this.clientTelemetryInfo, ClientTelemetryOptions.JsonSerializerSettings); - - using HttpRequestMessage request = new HttpRequestMessage - { - Method = HttpMethod.Post, - RequestUri = endpointUrl, - Content = new StringContent(json, Encoding.UTF8, "application/json") - }; - - async ValueTask CreateRequestMessage() - { - INameValueCollection headersCollection = new StoreResponseNameValueCollection(); - await this.tokenProvider.AddAuthorizationHeaderAsync( - headersCollection, - endpointUrl, - "POST", - AuthorizationTokenType.PrimaryMasterKey); - - foreach (string key in headersCollection.AllKeys()) - { - request.Headers.Add(key, headersCollection[key]); - } - - request.Headers.Add(HttpConstants.HttpHeaders.DatabaseAccountName, this.clientTelemetryInfo.GlobalDatabaseAccountName); - String envName = ClientTelemetryOptions.GetEnvironmentName(); - if (!String.IsNullOrEmpty(envName)) - { - request.Headers.Add(HttpConstants.HttpHeaders.EnvironmentName, envName); - } - - return request; - } - - using HttpResponseMessage response = await this.httpClient.SendHttpAsync(CreateRequestMessage, - ResourceType.Telemetry, - HttpTimeoutPolicyNoRetry.Instance, - null, - this.cancellationTokenSource.Token); - - if (!response.IsSuccessStatusCode) - { - this.numberOfFailures++; - - DefaultTrace.TraceError("Juno API response not successful. Status Code : {0}, Message : {1}", response.StatusCode, response.ReasonPhrase); - } - else - { - this.numberOfFailures = 0; // Ressetting failure counts on success call. - DefaultTrace.TraceInformation("Telemetry data sent successfully."); - } - - } - catch (Exception ex) - { - this.numberOfFailures++; - - DefaultTrace.TraceError("Exception while sending telemetry data : {0}", ex); - } - finally - { - // Reset SystemInfo Dictionary for new data. - this.Reset(); - } - } - - /// - /// Reset all the operation, System Utilization and Cache refresh related collections - /// - private void Reset() - { - this.clientTelemetryInfo.SystemInfo.Clear(); - } /// /// Dispose of cosmos client.It will get disposed with client so not making it thread safe. diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs index 2a29ef9454..2399bcb9fb 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryHelper.cs @@ -8,8 +8,8 @@ namespace Microsoft.Azure.Cosmos.Telemetry using System.Linq; using System.Text; using System.Threading.Tasks; - using HdrHistogram; using Microsoft.Azure.Cosmos.Core.Trace; + using Microsoft.Azure.Cosmos.Handler; using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Telemetry.Models; using Microsoft.Azure.Documents.Rntbd; @@ -46,115 +46,62 @@ internal static async Task SetAccountNameAsync(GlobalEndpoint /// /// /// - /// /// - internal static void RecordSystemUsage( + private static List RecordSystemUsage( SystemUsageHistory systemUsageHistory, - List systemInfoCollection, bool isDirectConnectionMode) { if (systemUsageHistory.Values == null) { - return; + return null; } DefaultTrace.TraceVerbose("System Usage recorded by telemetry is : {0}", systemUsageHistory); - - systemInfoCollection.Add(TelemetrySystemUsage.GetCpuInfo(systemUsageHistory.Values)); - systemInfoCollection.Add(TelemetrySystemUsage.GetMemoryRemainingInfo(systemUsageHistory.Values)); - systemInfoCollection.Add(TelemetrySystemUsage.GetAvailableThreadsInfo(systemUsageHistory.Values)); - systemInfoCollection.Add(TelemetrySystemUsage.GetThreadWaitIntervalInMs(systemUsageHistory.Values)); - systemInfoCollection.Add(TelemetrySystemUsage.GetThreadStarvationSignalCount(systemUsageHistory.Values)); + + List systemInfoCollection = new List(6) + { + TelemetrySystemUsage.GetCpuInfo(systemUsageHistory.Values), + TelemetrySystemUsage.GetMemoryRemainingInfo(systemUsageHistory.Values), + TelemetrySystemUsage.GetAvailableThreadsInfo(systemUsageHistory.Values), + TelemetrySystemUsage.GetThreadWaitIntervalInMs(systemUsageHistory.Values), + TelemetrySystemUsage.GetThreadStarvationSignalCount(systemUsageHistory.Values) + }; // Reset System Information if (isDirectConnectionMode) { systemInfoCollection.Add(TelemetrySystemUsage.GetTcpConnectionCount(systemUsageHistory.Values)); } + return systemInfoCollection; } - + /// - /// Convert map with operation information to list of operations along with request latency and request charge metrics + /// Record CPU and memory usage which will be sent as part of telemetry information /// - /// - /// Collection of ReportPayload - internal static List ToListWithMetricsInfo( - IDictionary metrics) + internal static List RecordSystemUtilization(DiagnosticsHandlerHelper helper, bool isDirectMode) { - DefaultTrace.TraceVerbose("Aggregating operation information to list started"); - - List payloadWithMetricInformation = new List(); - foreach (KeyValuePair entry in metrics) + try { - OperationInfo payloadForLatency = entry.Key; - payloadForLatency.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); - payloadForLatency.SetAggregators(entry.Value.latency, ClientTelemetryOptions.TicksToMsFactor); - - payloadWithMetricInformation.Add(payloadForLatency); + DefaultTrace.TraceVerbose("Started Recording System Usage for telemetry."); - OperationInfo payloadForRequestCharge = payloadForLatency.Copy(); - payloadForRequestCharge.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestChargeName, ClientTelemetryOptions.RequestChargeUnit); - payloadForRequestCharge.SetAggregators(entry.Value.requestcharge, ClientTelemetryOptions.HistogramPrecisionFactor); - - payloadWithMetricInformation.Add(payloadForRequestCharge); - } + SystemUsageHistory systemUsageHistory = helper.GetClientTelemetrySystemHistory(); - DefaultTrace.TraceVerbose("Aggregating operation information to list done"); - - return payloadWithMetricInformation; - } - - /// - /// Convert map with request information to list of operations along with request latency and request charge metrics - /// - /// - /// Collection of ReportPayload - internal static List ToListWithMetricsInfo( - IDictionary metrics) - { - DefaultTrace.TraceVerbose("Aggregating RequestInfo information to list started"); - - List payloadWithMetricInformation = new List(); - foreach (KeyValuePair entry in metrics) - { - MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); - metricInfo.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); - - RequestInfo payloadForLatency = entry.Key; - payloadForLatency.Metrics.Add(metricInfo); - - payloadWithMetricInformation.Add(payloadForLatency); + if (systemUsageHistory != null) + { + return ClientTelemetryHelper.RecordSystemUsage( + systemUsageHistory: systemUsageHistory, + isDirectConnectionMode: isDirectMode); + } + else + { + DefaultTrace.TraceWarning("System Usage History not available"); + } } - - DefaultTrace.TraceVerbose("Aggregating RequestInfo information to list done"); - - return payloadWithMetricInformation; - } - - /// - /// Convert map with CacheRefreshInfo information to list of operations along with request latency and request charge metrics - /// - /// - /// Collection of ReportPayload - internal static List ToListWithMetricsInfo(IDictionary metrics) - { - DefaultTrace.TraceVerbose("Aggregating CacheRefreshInfo information to list started"); - - List payloadWithMetricInformation = new List(); - foreach (KeyValuePair entry in metrics) + catch (Exception ex) { - CacheRefreshInfo payloadForLatency = entry.Key; - payloadForLatency.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); - payloadForLatency.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); - - payloadWithMetricInformation.Add(payloadForLatency); + DefaultTrace.TraceError("System Usage Recording Error : {0} ", ex); } - - DefaultTrace.TraceVerbose("Aggregating CacheRefreshInfo information to list done"); - - return payloadWithMetricInformation; + return null; } /// diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs index 3b69e0c621..f2caaf50d5 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs @@ -18,7 +18,7 @@ internal static class ClientTelemetryOptions internal const int KbToMbFactor = 1024; internal const int OneKbToBytes = 1024; - + // Expecting histogram to have Minimum Latency of 1 and Maximum Latency of 1 hour (which is never going to happen) internal const long RequestLatencyMax = TimeSpan.TicksPerHour; internal const long RequestLatencyMin = 1; @@ -94,9 +94,11 @@ internal static class ClientTelemetryOptions NullValueHandling = NullValueHandling.Ignore, MaxDepth = 64, // https://github.com/advisories/GHSA-5crp-9r3c-p9vr }; - - private static readonly List ExcludedStatusCodes = new List { 404, 409 }; + private static readonly List ExcludedStatusCodes = new List { 404, 409 }; + + internal static int PayloadSizeThreshold = 1024 * 1024 * 2; // 2MB + private static Uri clientTelemetryEndpoint; private static string environmentName; private static TimeSpan scheduledTimeSpan = TimeSpan.Zero; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs new file mode 100644 index 0000000000..1158c7d639 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Telemetry +{ + using System; + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.IO; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using HdrHistogram; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using Newtonsoft.Json; + + internal static class ClientTelemetryPayloadWriter + { + public static async Task SerializedPayloadChunksAsync( + ClientTelemetryProperties properties, + ConcurrentDictionary operationInfoSnapshot, + ConcurrentDictionary cacheRefreshInfoSnapshot, + ConcurrentDictionary requestInfoSnapshot, + Func callback) + { + if (properties == null) + { + throw new ArgumentNullException(nameof(properties)); + } + + StringBuilder stringBuilder = new StringBuilder(ClientTelemetryOptions.PayloadSizeThreshold); + + JsonWriter writer = ClientTelemetryPayloadWriter.GetWriterWithSectionStartTag(stringBuilder, properties, "operationInfo"); + + if (operationInfoSnapshot?.Any() == true) + { + foreach (KeyValuePair entry in operationInfoSnapshot) + { + long lengthNow = stringBuilder.Length; + + OperationInfo payloadForLatency = entry.Key; + payloadForLatency.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); + payloadForLatency.SetAggregators(entry.Value.latency, ClientTelemetryOptions.TicksToMsFactor); + + OperationInfo payloadForRequestCharge = payloadForLatency.Copy(); + payloadForRequestCharge.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestChargeName, ClientTelemetryOptions.RequestChargeUnit); + payloadForRequestCharge.SetAggregators(entry.Value.requestcharge, ClientTelemetryOptions.HistogramPrecisionFactor); + + string latencyMetrics = JsonConvert.SerializeObject(payloadForLatency); + string requestChargeMetrics = JsonConvert.SerializeObject(payloadForRequestCharge); + + if (lengthNow + latencyMetrics.Length + requestChargeMetrics.Length > ClientTelemetryOptions.PayloadSizeThreshold) + { + writer.WriteEndArray(); + writer.WriteEndObject(); + + await callback.Invoke(stringBuilder.ToString()); + + writer = ClientTelemetryPayloadWriter.GetWriterWithSectionStartTag(stringBuilder, properties, "operationInfo"); + } + + writer.WriteRawValue(latencyMetrics); + writer.WriteRawValue(requestChargeMetrics); + } + + } + writer.WriteEndArray(); + + if (cacheRefreshInfoSnapshot?.Any() == true) + { + writer.WritePropertyName("cacheRefreshInfo"); + writer.WriteStartArray(); + + foreach (KeyValuePair entry in cacheRefreshInfoSnapshot) + { + long lengthNow = stringBuilder.Length; + + CacheRefreshInfo payloadForLatency = entry.Key; + payloadForLatency.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); + payloadForLatency.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); + + string latencyMetrics = JsonConvert.SerializeObject(payloadForLatency); + + if (lengthNow + latencyMetrics.Length > ClientTelemetryOptions.PayloadSizeThreshold) + { + writer.WriteEndArray(); + writer.WriteEndObject(); + + await callback.Invoke(stringBuilder.ToString()); + + writer = ClientTelemetryPayloadWriter.GetWriterWithSectionStartTag(stringBuilder, properties, "cacheRefreshInfo"); + } + + writer.WriteRawValue(latencyMetrics); + } + writer.WriteEndArray(); + + } + + if (requestInfoSnapshot?.Any() == true) + { + writer.WritePropertyName("requestInfo"); + writer.WriteStartArray(); + + foreach (KeyValuePair entry in requestInfoSnapshot) + { + long lengthNow = stringBuilder.Length; + + MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); + metricInfo.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); + + RequestInfo payloadForLatency = entry.Key; + payloadForLatency.Metrics.Add(metricInfo); + string latencyMetrics = JsonConvert.SerializeObject(payloadForLatency); + + if (lengthNow + latencyMetrics.Length > ClientTelemetryOptions.PayloadSizeThreshold) + { + writer.WriteEndArray(); + writer.WriteEndObject(); + + await callback.Invoke(stringBuilder.ToString()); + + writer = ClientTelemetryPayloadWriter.GetWriterWithSectionStartTag(stringBuilder, properties, "requestInfo"); + } + + writer.WriteRawValue(latencyMetrics); + } + writer.WriteEndArray(); + } + + writer.WriteEndObject(); + + await callback.Invoke(stringBuilder.ToString()); + } + + private static JsonWriter GetWriterWithSectionStartTag( + StringBuilder stringBuilder, + ClientTelemetryProperties properties, + string sectionName) + { + stringBuilder.Clear(); + + StringWriter stringWriter = new StringWriter(stringBuilder); + + JsonWriter writer = new JsonTextWriter(stringWriter) + { + AutoCompleteOnClose = false + }; + + writer.WriteStartObject(); + + properties.Write(writer); + + writer.WritePropertyName(sectionName); + + writer.WriteStartArray(); + return writer; + } + } +} diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs new file mode 100644 index 0000000000..b91eb96832 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs @@ -0,0 +1,142 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Telemetry +{ + using System; + using System.Collections.Concurrent; + using System.Net.Http; + using System.Text; + using System.Threading; + using System.Threading.Tasks; + using HdrHistogram; + using Microsoft.Azure.Cosmos.Core.Trace; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using Microsoft.Azure.Documents; + using Microsoft.Azure.Documents.Collections; + + internal class ClientTelemetryProcessor + { + private static readonly Uri endpointUrl = ClientTelemetryOptions.GetClientTelemetryEndpoint(); + + private readonly AuthorizationTokenProvider tokenProvider; + private readonly CosmosHttpClient httpClient; + + internal ClientTelemetryProcessor(CosmosHttpClient httpClient, AuthorizationTokenProvider tokenProvider) + { + this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); + this.tokenProvider = tokenProvider ?? throw new ArgumentNullException(nameof(tokenProvider)); + } + + /// + /// It will create Task to process and send client telemetry payload to Client Telemetry Service. + /// + /// + /// + /// + /// + /// + /// Task + internal async Task ProcessAndSendAsync( + ClientTelemetryProperties clientTelemetryInfo, + ConcurrentDictionary operationInfoSnapshot, + ConcurrentDictionary cacheRefreshInfoSnapshot, + ConcurrentDictionary requestInfoSnapshot, + CancellationToken cancellationToken) + { + try + { + await ClientTelemetryPayloadWriter.SerializedPayloadChunksAsync( + properties: clientTelemetryInfo, + operationInfoSnapshot: operationInfoSnapshot, + cacheRefreshInfoSnapshot: cacheRefreshInfoSnapshot, + requestInfoSnapshot: requestInfoSnapshot, + callback: async (payload) => await this.SendAsync(clientTelemetryInfo.GlobalDatabaseAccountName, payload, cancellationToken)); + } + catch (Exception ex) + { + DefaultTrace.TraceError($"Exception while serializing telemetry payload: {ex}"); + throw; + } + + } + + /// + /// Task to send telemetry information to configured Juno endpoint. + /// If endpoint is not configured then it won't even try to send information. It will just trace an error message. + /// In any case it resets the telemetry information to collect the latest one. + /// + /// Async Task + private async Task SendAsync( + string globalDatabaseAccountName, + string jsonPayload, + CancellationToken cancellationToken) + { + if (endpointUrl == null) + { + DefaultTrace.TraceError("Telemetry is enabled but endpoint is not configured"); + return; + } + + try + { + DefaultTrace.TraceInformation("Sending Telemetry Data to {0}", endpointUrl.AbsoluteUri); + + using HttpRequestMessage request = new HttpRequestMessage + { + Method = HttpMethod.Post, + RequestUri = endpointUrl, + Content = new StringContent(jsonPayload, Encoding.UTF8, "application/json") + }; + + async ValueTask CreateRequestMessage() + { + INameValueCollection headersCollection = new StoreResponseNameValueCollection(); + await this.tokenProvider.AddAuthorizationHeaderAsync( + headersCollection, + endpointUrl, + "POST", + AuthorizationTokenType.PrimaryMasterKey); + + foreach (string key in headersCollection.AllKeys()) + { + request.Headers.Add(key, headersCollection[key]); + } + + request.Headers.Add(HttpConstants.HttpHeaders.DatabaseAccountName, globalDatabaseAccountName); + String envName = ClientTelemetryOptions.GetEnvironmentName(); + if (!String.IsNullOrEmpty(envName)) + { + request.Headers.Add(HttpConstants.HttpHeaders.EnvironmentName, envName); + } + + return request; + } + + using HttpResponseMessage response = await this.httpClient.SendHttpAsync(CreateRequestMessage, + ResourceType.Telemetry, + HttpTimeoutPolicyNoRetry.Instance, + null, + cancellationToken); + + if (!response.IsSuccessStatusCode) + { + DefaultTrace.TraceError("Telemetry Service API response not successful. Status Code : {0}, Message : {1}", response.StatusCode, response.ReasonPhrase); + throw new Exception(string.Format("Telemetry Service API response not successful. Status Code : {0}, Message : {1}", response.StatusCode, response.ReasonPhrase)); + } + else + { + DefaultTrace.TraceInformation("Telemetry data sent successfully."); + } + + } + catch (Exception ex) + { + DefaultTrace.TraceError("Exception while sending telemetry data : {0}", ex.Message); + throw; + } + } + + } +} diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs b/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs index 6ad08f694e..22089191fd 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/Models/ClientTelemetryProperties.cs @@ -119,5 +119,77 @@ public ClientTelemetryProperties(string dateTimeUtc, this.PreferredRegions = preferredRegions; this.MachineId = machineId; } + + public void Write(JsonWriter writer) + { + writer.WritePropertyName("timeStamp"); + writer.WriteValue(this.DateTimeUtc); + + writer.WritePropertyName("clientId"); + writer.WriteValue(this.ClientId); + + writer.WritePropertyName("machineId"); + writer.WriteValue(this.MachineId); + + writer.WritePropertyName("processId"); + writer.WriteValue(this.ProcessId); + + writer.WritePropertyName("userAgent"); + writer.WriteValue(this.UserAgent); + + writer.WritePropertyName("connectionMode"); + writer.WriteValue(this.ConnectionMode); + + writer.WritePropertyName("globalDatabaseAccountName"); + writer.WriteValue(this.GlobalDatabaseAccountName); + + writer.WritePropertyName("applicationRegion"); + if (this.ApplicationRegion != null) + { + writer.WriteValue(this.ApplicationRegion); + } + else + { + writer.WriteNull(); + } + + writer.WritePropertyName("hostEnvInfo"); + writer.WriteValue(this.HostEnvInfo); + + writer.WritePropertyName("acceleratedNetworking"); + if (this.AcceleratedNetworking.HasValue) + { + writer.WriteValue(this.AcceleratedNetworking.Value); + } + else + { + writer.WriteNull(); + } + + writer.WritePropertyName("preferredRegions"); + + if (this.PreferredRegions != null) + { + writer.WriteStartArray(); + foreach (string region in this.PreferredRegions) + { + writer.WriteValue(region); + } + writer.WriteEndArray(); + } + else + { + writer.WriteNull(); + } + + writer.WritePropertyName("aggregationIntervalInSec"); + writer.WriteValue(this.AggregationIntervalInSec); + + if (this.SystemInfo != null && this.SystemInfo.Count > 0) + { + writer.WritePropertyName("systemInfo"); + writer.WriteRawValue(JsonConvert.SerializeObject(this.SystemInfo)); + } + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs index be6dfcd332..7e924ffd53 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs @@ -988,9 +988,23 @@ private static void AssertAccountLevelInformation( // Asserting If basic client telemetry object is as expected foreach (ClientTelemetryProperties telemetryInfo in localCopyOfActualInfo) { - actualOperationList.AddRange(telemetryInfo.OperationInfo); - actualSystemInformation.AddRange(telemetryInfo.SystemInfo); - actualRequestInformation.AddRange(telemetryInfo.RequestInfo); + if (telemetryInfo.OperationInfo != null) + { + actualOperationList.AddRange(telemetryInfo.OperationInfo); + } + + if (telemetryInfo.SystemInfo != null) + { + foreach (SystemInfo sysInfo in telemetryInfo.SystemInfo) + { + actualSystemInformation.Add(sysInfo); + } + } + + if (telemetryInfo.RequestInfo != null) + { + actualRequestInformation.AddRange(telemetryInfo.RequestInfo); + } if (telemetryInfo.ConnectionMode == ConnectionMode.Direct.ToString().ToUpperInvariant()) { @@ -1083,20 +1097,8 @@ public async Task CheckMisconfiguredTelemetryEndpoint_should_stop_the_job() mode: ConnectionMode.Direct, customHttpHandler: customHttpHandler); - // Create an item - ToDoActivity testItem = ToDoActivity.CreateRandomToDoActivity("MyTestPkValue"); - ItemResponse createResponse = await container.CreateItemAsync(testItem); - ToDoActivity testItemCreated = createResponse.Resource; - - // Read an Item - ItemResponse response = await container.ReadItemAsync(testItem.id, new Cosmos.PartitionKey(testItem.id)); - - await Task.Delay(1500); - - response = await container.ReadItemAsync(testItem.id, new Cosmos.PartitionKey(testItem.id)); - - await Task.Delay(3500); - + await Task.Delay(TimeSpan.FromMilliseconds(5000)); // wait for 5 sec, ideally telemetry would be sent 5 times but client telemetry endpoint is not functional (in this test), it should try 3 times maximum and after that client telemetry job should be stopped. + Assert.AreEqual(3, retryCounter); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj index 1d4e4e166c..4d25f7e5a7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Microsoft.Azure.Cosmos.Tests.csproj @@ -34,6 +34,7 @@ + @@ -375,6 +376,9 @@ PreserveNewest + + PreserveNewest + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryPayloadWithoutMetrics.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryPayloadWithoutMetrics.json new file mode 100644 index 0000000000..a17f0fd74c --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryPayloadWithoutMetrics.json @@ -0,0 +1,135 @@ +{ + "timeStamp": "2022-07-12T10:37:40Z", + "clientId": "1d5a40cf-d1a3-4ac5-ad34-307ad9243985", + "machineId": "vmId:d0cb93eb-214b-4c2b-bd3d-cc93e90d9efd", + "processId": "dotnet", + "userAgent": "cosmos-netstandard-sdk/3.28.0|8|X64|Microsoft Windows 10.0.22000|.NET 6.0.6|L|F 00000010|", + "connectionMode": "DIRECT", + "globalDatabaseAccountName": "localhost", + "applicationRegion": "eastus", + "hostEnvInfo": "Linux|18.04-LTS|Standard_D2s_v3|AzurePublicCloud", + "preferredRegions": [ "region1", "region2" ], + "aggregationIntervalInSec": 1, + "acceleratedNetworking": false, + "systemInfo": [ + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "CPU", + "unitName": "Percentage", + "mean": 38.55, + "count": 4, + "min": 10.96, + "max": 73.27, + "percentiles": { + "50": 33.11, + "90": 73.27, + "95": 73.27, + "99": 73.27, + "99.9": 73.27 + } + } + }, + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "MemoryRemaining", + "unitName": "MB", + "mean": 31904.0, + "count": 4, + "min": 31744.0, + "max": 31999.9990234375, + "percentiles": { + "50": 31999.9990234375, + "90": 31999.9990234375, + "95": 31999.9990234375, + "99": 31999.9990234375, + "99.9": 31999.9990234375 + } + } + }, + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "SystemPool_AvailableThreads", + "unitName": "ThreadCount", + "mean": 32704.0, + "count": 4, + "min": 32640.0, + "max": 32767.0, + "percentiles": { + "50": 32767.0, + "90": 32767.0, + "95": 32767.0, + "99": 32767.0, + "99.9": 32767.0 + } + } + }, + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "SystemPool_ThreadWaitInterval", + "unitName": "MilliSecond", + "mean": 0.1743, + "count": 3, + "min": 0.0488, + "max": 0.3359, + "percentiles": { + "50": 0.1391, + "90": 0.3359, + "95": 0.3359, + "99": 0.3359, + "99.9": 0.3359 + } + } + }, + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "SystemPool_IsThreadStarving_True", + "unitName": "Count", + "mean": 0.1, + "count": 2, + "min": 0.1, + "max": 0.1 + } + }, + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "RntbdOpenConnections", + "unitName": "Count", + "mean": 0.25, + "count": 4, + "min": 0.1, + "max": 1.0, + "percentiles": { + "50": 0.1, + "90": 1.0, + "95": 1.0, + "99": 1.0, + "99.9": 1.0 + } + } + }, + { + "resource": "HostMachine", + "metricInfo": { + "metricsName": "TcpNewChannelOpenLatency", + "unitName": "MilliSecond", + "mean": 0.25, + "count": 4, + "min": 0.1, + "max": 1.0, + "percentiles": { + "50": 0.1, + "90": 1.0, + "95": 1.0, + "99": 1.0, + "99.9": 1.0 + } + } + } + ] +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs new file mode 100644 index 0000000000..48cb0d1e42 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs @@ -0,0 +1,258 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tests.Telemetry +{ + using System; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using HdrHistogram; + using Newtonsoft.Json; + using Microsoft.Azure.Cosmos.Telemetry; + using System.Collections.Generic; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using System.Text; + using System.IO; + using System.Net.Http; + using Moq; + using System.Threading.Tasks; + using System.Threading; + using System.Net; + using System.Collections.Concurrent; + + /// + /// Tests for . + /// + [TestClass] + public class ClientTelemetryTests + { + [TestCleanup] + public void Cleanup() + { + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, null); + } + + [TestMethod] + public void CheckMetricsAggregationLogic() + { + MetricInfo metrics = new MetricInfo("metricsName", "unitName"); + + LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, + long.MaxValue, + 5); + + histogram.RecordValue(10); + histogram.RecordValue(20); + histogram.RecordValue(30); + histogram.RecordValue(40); + + metrics.SetAggregators(histogram); + + Assert.AreEqual(40, metrics.Max); + Assert.AreEqual(10, metrics.Min); + Assert.AreEqual(4, metrics.Count); + Assert.AreEqual(25, metrics.Mean); + + Assert.AreEqual(20, metrics.Percentiles[ClientTelemetryOptions.Percentile50]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile90]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile95]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile99]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile999]); + } + + [TestMethod] + public void CheckMetricsAggregationLogicWithAdjustment() + { + MetricInfo metrics = new MetricInfo("metricsName", "unitName"); + long adjustmentFactor = 1000; + + LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, + long.MaxValue, + 5); + + histogram.RecordValue(10 * adjustmentFactor); + histogram.RecordValue(20 * adjustmentFactor); + histogram.RecordValue(30 * adjustmentFactor); + histogram.RecordValue(40 * adjustmentFactor); + + metrics.SetAggregators(histogram, adjustmentFactor); + + Assert.AreEqual(40, metrics.Max); + Assert.AreEqual(10, metrics.Min); + Assert.AreEqual(4, metrics.Count); + + Assert.AreEqual(25, metrics.Mean); + + Assert.AreEqual(20, metrics.Percentiles[ClientTelemetryOptions.Percentile50]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile90]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile95]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile99]); + Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile999]); + } + + [TestMethod] + public void CheckJsonSerializerContract() + { + string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", + processId: "", + userAgent: null, + connectionMode: ConnectionMode.Direct, + preferredRegions: null, + aggregationIntervalInSec: 10), ClientTelemetryOptions.JsonSerializerSettings); + Assert.AreEqual("{\"clientId\":\"clientId\",\"processId\":\"\",\"connectionMode\":\"DIRECT\",\"aggregationIntervalInSec\":10,\"systemInfo\":[]}", json); + } + + [TestMethod] + public void CheckJsonSerializerContractWithPreferredRegions() + { + List preferredRegion = new List + { + "region1" + }; + string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", + processId: "", + userAgent: null, + connectionMode: ConnectionMode.Direct, + preferredRegions: preferredRegion, + aggregationIntervalInSec: 1), ClientTelemetryOptions.JsonSerializerSettings); + Assert.AreEqual("{\"clientId\":\"clientId\",\"processId\":\"\",\"connectionMode\":\"DIRECT\",\"preferredRegions\":[\"region1\"],\"aggregationIntervalInSec\":1,\"systemInfo\":[]}", json); + } + + [TestMethod] + [DataRow(100, 50, 200)] // When operation, cacherefresh and request info is there in payload + [DataRow(0, 50, 0)] // When only cacherefresh info is there in payload + [DataRow(100, 50, 0)] // When only operation and cacherefresh info is there in payload + [DataRow(100, 0, 0)] // When only operation info is there in payload + public async Task CheckIfPayloadIsDividedCorrectlyAsync(int expectedOperationInfoSize, int expectedCacheRefreshInfoSize, int expectedRequestInfoSize) + { + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, "http://dummy.telemetry.endpoint/"); + ClientTelemetryOptions.PayloadSizeThreshold = 1024 * 15; //15 Kb + + string data = File.ReadAllText("Telemetry/ClientTelemetryPayloadWithoutMetrics.json", Encoding.UTF8); + ClientTelemetryProperties clientTelemetryProperties = JsonConvert.DeserializeObject(data); + + int totalPayloadSizeInBytes = data.Length; + + int actualOperationInfoSize = 0; + int actualCacheRefreshInfoSize = 0; + int actualRequestInfoSize = 0; + + Mock mockHttpHandler = new Mock(); + _ = mockHttpHandler.Setup(x => x.SendAsync( + It.IsAny(), + It.IsAny())) + .Callback( + (request, cancellationToken) => + { + string payloadJson = request.Content.ReadAsStringAsync().Result; + Assert.IsTrue(payloadJson.Length <= ClientTelemetryOptions.PayloadSizeThreshold, "Payload Size is " + payloadJson.Length); + + ClientTelemetryProperties propertiesToSend = JsonConvert.DeserializeObject(payloadJson); + + Assert.AreEqual(7, propertiesToSend.SystemInfo.Count, "System Info is not correct"); + + actualOperationInfoSize += propertiesToSend.OperationInfo?.Count ?? 0; + actualCacheRefreshInfoSize += propertiesToSend.CacheRefreshInfo?.Count ?? 0; + actualRequestInfoSize += propertiesToSend.RequestInfo?.Count ?? 0; + }) + .Returns(Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK))); + + ClientTelemetryProcessor processor = new ClientTelemetryProcessor( + MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(new HttpHandlerHelper(mockHttpHandler.Object))), + Mock.Of()); + + ConcurrentDictionary operationInfoSnapshot + = new ConcurrentDictionary(); + + for (int i = 0; i < (expectedOperationInfoSize/2); i++) + { + OperationInfo opeInfo = new OperationInfo(Regions.WestUS, + 0, + Documents.ConsistencyLevel.Session.ToString(), + "databaseName" + i, + "containerName", + Documents.OperationType.Read, + Documents.ResourceType.Document, + 200, + 0); + + LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision); + latency.RecordValue(10l); + + LongConcurrentHistogram requestcharge = new LongConcurrentHistogram(ClientTelemetryOptions.RequestChargeMin, + ClientTelemetryOptions.RequestChargeMax, + ClientTelemetryOptions.RequestChargePrecision); + requestcharge.RecordValue(11l); + + operationInfoSnapshot.TryAdd(opeInfo, (latency, requestcharge)); + } + + ConcurrentDictionary cacheRefreshInfoSnapshot + = new ConcurrentDictionary(); + for (int i = 0; i < expectedCacheRefreshInfoSize; i++) + { + CacheRefreshInfo crInfo = new CacheRefreshInfo(Regions.WestUS, + 10, + Documents.ConsistencyLevel.Session.ToString(), + "databaseName" + i, + "containerName", + Documents.OperationType.Read, + Documents.ResourceType.Document, + 200, + 1002, + "dummycache") ; + + LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision); + latency.RecordValue(10l); + + cacheRefreshInfoSnapshot.TryAdd(crInfo, latency); + } + + ConcurrentDictionary requestInfoInfoSnapshot + = new ConcurrentDictionary(); + for (int i = 0; i < expectedRequestInfoSize; i++) + { + RequestInfo reqInfo = new RequestInfo + { + Uri = "https://dummyuri.com", + DatabaseName = "databaseName" + i, + ContainerName = "containerName" + i, + Operation = Documents.OperationType.Read.ToString(), + Resource = Documents.ResourceType.Document.ToString(), + StatusCode = 200, + SubStatusCode = 0 + }; + + LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision); + latency.RecordValue(10l); + + requestInfoInfoSnapshot.TryAdd(reqInfo, latency); + } + + await processor.ProcessAndSendAsync( + clientTelemetryProperties, + operationInfoSnapshot, + cacheRefreshInfoSnapshot, + requestInfoInfoSnapshot, + new CancellationToken()); + + Assert.AreEqual(expectedOperationInfoSize, actualOperationInfoSize, "Operation Info is not correct"); + Assert.AreEqual(expectedCacheRefreshInfoSize, actualCacheRefreshInfoSize, "Cache Refresh Info is not correct"); + Assert.AreEqual(expectedRequestInfoSize, actualRequestInfoSize, "Request Info is not correct"); + } + + [TestMethod] + [ExpectedException(typeof(FormatException))] + public void CheckMisconfiguredTelemetry_should_fail() + { + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, "non-boolean"); + using CosmosClient client = MockCosmosUtil.CreateMockCosmosClient(); + } + } +} From 682b0011dd8224fbbd8f66691abf28cb53929e28 Mon Sep 17 00:00:00 2001 From: leminh98 Date: Fri, 10 Mar 2023 09:51:03 -0800 Subject: [PATCH 072/164] Query: Fixes regression from LINQ custom serializer fix (#3749) Co-authored-by: Minh Le Co-authored-by: Matias Quaranta --- .../src/Linq/ExpressionToSQL.cs | 17 -- .../Resource/Container/ContainerCore.Items.cs | 7 +- .../Serializer/CosmosLinqSerializerOptions.cs | 9 - ...BaselineTests.TestLiteralSerialization.xml | 2 +- ...rializerBaseline.TestMemberInitializer.xml | 48 ------ .../LinqTestsCommon.cs | 4 +- .../LinqTranslationBaselineTests.cs | 2 +- ...TranslationWithCustomSerializerBaseline.cs | 159 ------------------ ...icrosoft.Azure.Cosmos.EmulatorTests.csproj | 4 - 9 files changed, 7 insertions(+), 245 deletions(-) delete mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationWithCustomSerializerBaseline.TestMemberInitializer.xml delete mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs diff --git a/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs b/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs index d15f67fece..476774e137 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs @@ -10,7 +10,6 @@ namespace Microsoft.Azure.Cosmos.Linq using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; - using System.IO; using System.Linq; using System.Linq.Expressions; using System.Reflection; @@ -713,22 +712,6 @@ public static SqlScalarExpression VisitConstant(ConstantExpression inputExpressi return SqlArrayCreateScalarExpression.Create(arrayItems.ToImmutableArray()); } - if (context.linqSerializerOptions?.CustomCosmosSerializer != null) - { - StringWriter writer = new StringWriter(CultureInfo.InvariantCulture); - - // Use the user serializer for the parameter values so custom conversions are correctly handled - using (Stream stream = context.linqSerializerOptions.CustomCosmosSerializer.ToStream(inputExpression.Value)) - { - using (StreamReader streamReader = new StreamReader(stream)) - { - string propertyValue = streamReader.ReadToEnd(); - writer.Write(propertyValue); - return CosmosElement.Parse(writer.ToString()).Accept(CosmosElementToSqlScalarExpressionVisitor.Singleton); - } - } - } - return CosmosElement.Parse(JsonConvert.SerializeObject(inputExpression.Value)).Accept(CosmosElementToSqlScalarExpressionVisitor.Singleton); } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs index 31a3ccc5ca..a694b78019 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/ContainerCore.Items.cs @@ -505,14 +505,11 @@ public override IOrderedQueryable GetItemLinqQueryable( { requestOptions ??= new QueryRequestOptions(); - if (linqSerializerOptions == null && this.ClientContext.ClientOptions != null) + if (linqSerializerOptions == null && this.ClientContext.ClientOptions.SerializerOptions != null) { linqSerializerOptions = new CosmosLinqSerializerOptions { - PropertyNamingPolicy = this.ClientContext.ClientOptions.SerializerOptions != null - ? this.ClientContext.ClientOptions.SerializerOptions.PropertyNamingPolicy - : CosmosPropertyNamingPolicy.Default, - CustomCosmosSerializer = this.ClientContext.ClientOptions.Serializer + PropertyNamingPolicy = this.ClientContext.ClientOptions.SerializerOptions.PropertyNamingPolicy }; } diff --git a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializerOptions.cs b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializerOptions.cs index 0affdde976..b7523b2c6a 100644 --- a/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializerOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Serializer/CosmosLinqSerializerOptions.cs @@ -22,15 +22,6 @@ public CosmosLinqSerializerOptions() this.PropertyNamingPolicy = CosmosPropertyNamingPolicy.Default; } - /// - /// Gets or sets the user defined customer serializer. If no customer serializer was defined, - /// then the value is set to the default value - /// - /// - /// The default value is null - /// - internal CosmosSerializer CustomCosmosSerializer { get; set; } - /// /// Gets or sets whether the naming policy used to convert a string-based name to another format, /// such as a camel-casing format. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestLiteralSerialization.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestLiteralSerialization.xml index b72807f399..c4c2fb38dd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestLiteralSerialization.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestLiteralSerialization.xml @@ -435,7 +435,7 @@ FROM root]]> diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationWithCustomSerializerBaseline.TestMemberInitializer.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationWithCustomSerializerBaseline.TestMemberInitializer.xml deleted file mode 100644 index 8763ef6866..0000000000 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationWithCustomSerializerBaseline.TestMemberInitializer.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - (doc == new DataObject() {NumericField = 12, StringField = "12"}))]]> - - - - - - - - - new DataObject() {NumericField = 12, StringField = "12"})]]> - - - - - - - - - IIF((doc.NumericField > 12), new DataObject() {NumericField = 12, StringField = "12"}, new DataObject() {NumericField = 12, StringField = "12"}))]]> - - - 12) ? {"number": 12, "String_value": "12", "id": null, "Pk": null} : {"number": 12, "String_value": "12", "id": null, "Pk": null}) -FROM root]]> - - - - - - (doc == new DataObject() {NumericField = doc.NumericField, StringField = doc.StringField})).Select(b => "A")]]> - - - - - - \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs index 2b8f5c2d4a..5907d861fc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs @@ -455,7 +455,9 @@ Family createDataObj(Random random) return getQuery; } - public static Func> GenerateSimpleCosmosData(Cosmos.Database cosmosDatabase) + public static Func> GenerateSimpleCosmosData( + Cosmos.Database cosmosDatabase + ) { const int DocumentCount = 10; PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition { Paths = new System.Collections.ObjectModel.Collection(new[] { "/Pk" }), Kind = PartitionKind.Hash }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs index 01b64cd4fd..14aadd354f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs @@ -1,5 +1,5 @@ //----------------------------------------------------------------------- -// +// // Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs deleted file mode 100644 index c81beaaeb8..0000000000 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationWithCustomSerializerBaseline.cs +++ /dev/null @@ -1,159 +0,0 @@ -//----------------------------------------------------------------------- -// -// Copyright (c) Microsoft Corporation. All rights reserved. -// -//----------------------------------------------------------------------- -namespace Microsoft.Azure.Cosmos.Services.Management.Tests.LinqProviderTests -{ - using BaselineTest; - using Microsoft.Azure.Cosmos.Linq; - using Microsoft.Azure.Cosmos.Spatial; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using System; - using System.Collections.Generic; - using System.Globalization; - using System.Linq; - using System.Linq.Dynamic; - using System.Text; - using System.Text.Json; - using Microsoft.Azure.Documents; - using Microsoft.Azure.Cosmos.SDK.EmulatorTests; - using System.Threading.Tasks; - using global::Azure.Core.Serialization; - using System.IO; - using System.Text.Json.Serialization; - - [Microsoft.Azure.Cosmos.SDK.EmulatorTests.TestClass] - public class LinqTranslationWithCustomSerializerBaseline : BaselineTests - { - private static CosmosClient cosmosClient; - private static Cosmos.Database testDb; - private static Container testContainer; - - [ClassInitialize] - public async static Task Initialize(TestContext textContext) - { - cosmosClient = TestCommon.CreateCosmosClient((cosmosClientBuilder) - => cosmosClientBuilder.WithCustomSerializer(new SystemTextJsonSerializer(new JsonSerializerOptions())).WithConnectionModeGateway()); - - string dbName = $"{nameof(LinqTranslationBaselineTests)}-{Guid.NewGuid().ToString("N")}"; - testDb = await cosmosClient.CreateDatabaseAsync(dbName); - } - - [ClassCleanup] - public async static Task CleanUp() - { - if (testDb != null) - { - await testDb.DeleteStreamAsync(); - } - - cosmosClient?.Dispose(); - } - - [TestInitialize] - public async Task TestInitialize() - { - testContainer = await testDb.CreateContainerAsync(new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPath: "/Pk")); - } - - [TestCleanup] - public async Task TestCleanUp() - { - await testContainer.DeleteContainerStreamAsync(); - } - - // Custom serializer that uses System.Text.Json.JsonSerializer instead of NewtonsoftJson.JsonSerializer - private class SystemTextJsonSerializer : CosmosSerializer - { - private readonly JsonObjectSerializer systemTextJsonSerializer; - - public SystemTextJsonSerializer(JsonSerializerOptions jsonSerializerOptions) - { - this.systemTextJsonSerializer = new JsonObjectSerializer(jsonSerializerOptions); - } - - public override T FromStream(Stream stream) - { - if (stream == null) - throw new ArgumentNullException(nameof(stream)); - - using (stream) - { - if (stream.CanSeek && stream.Length == 0) - { - return default; - } - - if (typeof(Stream).IsAssignableFrom(typeof(T))) - { - return (T)(object)stream; - } - - return (T)this.systemTextJsonSerializer.Deserialize(stream, typeof(T), default); - } - } - - public override Stream ToStream(T input) - { - MemoryStream streamPayload = new MemoryStream(); - this.systemTextJsonSerializer.Serialize(streamPayload, input, typeof(T), default); - streamPayload.Position = 0; - return streamPayload; - } - } - - internal class DataObject : LinqTestObject - { - [JsonPropertyName("number")] - public double NumericField { get; set; } - - [JsonPropertyName("String_value")] - public string StringField { get; set; } - - [JsonPropertyName("id")] - public string Id { get; set; } - - [JsonPropertyName("Pk")] - public string Pk { get; set; } - } - - [TestMethod] - public void TestMemberInitializer() - { - const int Records = 100; - const int NumAbsMax = 500; - const int MaxStringLength = 100; - DataObject createDataObj(Random random) - { - DataObject obj = new DataObject - { - NumericField = random.Next(NumAbsMax * 2) - NumAbsMax, - StringField = LinqTestsCommon.RandomString(random, random.Next(MaxStringLength)), - Id = Guid.NewGuid().ToString(), - Pk = "Test" - }; - return obj; - } - Func> getQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); - - List inputs = new List - { - new LinqTestInput("Filter w/ DataObject initializer with constant value", b => getQuery(b).Where(doc => doc == new DataObject() { NumericField = 12, StringField = "12" })), - new LinqTestInput("Select w/ DataObject initializer", b => getQuery(b).Select(doc => new DataObject() { NumericField = 12, StringField = "12" })), - new LinqTestInput("Deeper than top level reference", b => getQuery(b).Select(doc => doc.NumericField > 12 ? new DataObject() { NumericField = 12, StringField = "12" } : new DataObject() { NumericField = 12, StringField = "12" })), - - - // Negative test case: serializing only field name using custom serializer not currently supported - new LinqTestInput("Filter w/ DataObject initializer with member initialization", b => getQuery(b).Where(doc => doc == new DataObject() { NumericField = doc.NumericField, StringField = doc.StringField }).Select(b => "A")) - }; - this.ExecuteTestSuite(inputs); - } - - - public override LinqTestOutput ExecuteTest(LinqTestInput input) - { - return LinqTestsCommon.ExecuteTest(input); - } - } -} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index 10e0462cef..a504adc855 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -37,7 +37,6 @@ - @@ -248,9 +247,6 @@ PreserveNewest - - PreserveNewest - PreserveNewest From f2a3078bdb796d1234c2a7d52b3639bb8ddddc7a Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Fri, 10 Mar 2023 15:55:11 -0800 Subject: [PATCH 073/164] [Internal] LocalQuorum: Refactors override (i.e. strong) to allow from any account consistency (#3753) - Localquorum override (i.e. strong) to allow from any account consistency - Facilitates no-downtime downgrade of existing accounts (i.e. existing Strong/bounded accounts migration to Eventual) --- .../src/ValidationHelpers.cs | 9 +- .../ValidationHelpersTests.cs | 98 +++++++++++-------- 2 files changed, 56 insertions(+), 51 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs b/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs index 58a7a55ddb..4810d99f66 100644 --- a/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs +++ b/Microsoft.Azure.Cosmos/src/ValidationHelpers.cs @@ -55,7 +55,6 @@ public static bool IsValidConsistencyLevelOverwrite( { if (isLocalQuorumConsistency && ValidationHelpers.IsLocalQuorumConsistency( - backendConsistency: backendConsistency, desiredConsistency: desiredConsistency, operationType: operationType, resourceType: resourceType)) @@ -109,21 +108,15 @@ private static bool IsValidConsistencyLevelOverwrite( /// /// Condition to check Quorum(i.e. Strong) read with either an eventual consistency account or a consistent prefix account. /// - /// /// /// /// /// true/false - private static bool IsLocalQuorumConsistency(Documents.ConsistencyLevel backendConsistency, + private static bool IsLocalQuorumConsistency( Documents.ConsistencyLevel desiredConsistency, OperationType? operationType, ResourceType? resourceType) { - if (backendConsistency != Documents.ConsistencyLevel.Eventual && backendConsistency != Documents.ConsistencyLevel.ConsistentPrefix) - { - return false; - } - if (desiredConsistency != Documents.ConsistencyLevel.Strong) { return false; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs index 2c9db33cec..dbfc45eb36 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ValidationHelpersTests.cs @@ -4,6 +4,8 @@ namespace Microsoft.Azure.Cosmos.Tests { + using System; + using System.Collections.Generic; using System.Data; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -11,62 +13,72 @@ namespace Microsoft.Azure.Cosmos.Tests public class ValidationHelpersTest { [TestMethod] - [DataRow(true, ConsistencyLevel.Eventual, ConsistencyLevel.Strong)] - [DataRow(true, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong)] - [DataRow(false, ConsistencyLevel.Eventual, ConsistencyLevel.BoundedStaleness)] - [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.BoundedStaleness)] - [DataRow(false, ConsistencyLevel.Session, ConsistencyLevel.Strong)] - [DataRow(false, ConsistencyLevel.BoundedStaleness, ConsistencyLevel.Strong)] - public void TestIsValidConsistencyLevelOverwrite(bool isValidConsistencyLevelOverwrite, - ConsistencyLevel backendConsistencyLevel, - ConsistencyLevel desiredConsistencyLevel) + [DataRow(true)] + [DataRow(false)] + public void TestIsValidConsistencyLevelOverwrite_AllCombinations( + bool isValidConsistencyLevelOverwrite) { - bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, - desiredConsistencyLevel, - true, - Documents.OperationType.Read, - Documents.ResourceType.Document); + ConsistencyLevel[] allConsistencies = Enum.GetValues(); + + // All overrides when target is 'Strong' are VALID + ConsistencyLevel desiredConsistencyLevel = ConsistencyLevel.Strong; + foreach (ConsistencyLevel backendConsistencyLevel in allConsistencies) + { + if (backendConsistencyLevel == desiredConsistencyLevel) + { + continue; + } + + foreach (KeyValuePair entry in ValidationHelpersTest.GetPerOperationExpectations()) + { + bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, + desiredConsistencyLevel, + isValidConsistencyLevelOverwrite, + (Documents.OperationType)entry.Key, + Documents.ResourceType.Document); - Assert.AreEqual(isValidConsistencyLevelOverwrite, result); + Assert.AreEqual(isValidConsistencyLevelOverwrite && entry.Value, result, + $"({isValidConsistencyLevelOverwrite}, {backendConsistencyLevel}, {desiredConsistencyLevel}) ({entry.Key}, {entry.Value})"); + } + } } [TestMethod] - [DataRow(false, ConsistencyLevel.Eventual, ConsistencyLevel.Strong)] - [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong)] - public void TestIsValidConsistencyLevelOverwrite_OnlyWhenSpecifyingExplicitOverwrite(bool isValidConsistencyLevelOverwrite, + [DataRow(ConsistencyLevel.Eventual, ConsistencyLevel.BoundedStaleness)] + [DataRow(ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.BoundedStaleness)] + [DataRow(ConsistencyLevel.Session, ConsistencyLevel.BoundedStaleness)] + public void TestIsValidConsistencyLevelOverwrite_BoundedPromotionsRejected( ConsistencyLevel backendConsistencyLevel, ConsistencyLevel desiredConsistencyLevel) { - bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, - desiredConsistencyLevel, - false, - Documents.OperationType.Read, - Documents.ResourceType.Document); + foreach (KeyValuePair entry in ValidationHelpersTest.GetPerOperationExpectations()) + { + bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, + desiredConsistencyLevel, + true, + (Documents.OperationType)entry.Key, + Documents.ResourceType.Document); - Assert.AreEqual(isValidConsistencyLevelOverwrite, result); + Assert.AreEqual(false, result, + $"({backendConsistencyLevel}, {desiredConsistencyLevel}) ({entry.Key}, {entry.Value})"); + } } - [TestMethod] - [DataRow(true, ConsistencyLevel.Eventual, ConsistencyLevel.Strong, Documents.OperationType.Read)] - [DataRow(true, ConsistencyLevel.Eventual, ConsistencyLevel.Strong, Documents.OperationType.ReadFeed)] - [DataRow(true, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.Query)] - [DataRow(true, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.SqlQuery)] - [DataRow(false, ConsistencyLevel.Eventual, ConsistencyLevel.Strong, Documents.OperationType.QueryPlan)] - [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.Create)] - [DataRow(false, ConsistencyLevel.ConsistentPrefix, ConsistencyLevel.Strong, Documents.OperationType.Batch)] - public void TestIsValidConsistencyLevelOverwrite_OnlyAllowedForCertainOperationTypes( - bool isValidConsistencyLevelOverwrite, - ConsistencyLevel backendConsistencyLevel, - ConsistencyLevel desiredConsistencyLevel, - dynamic operationType) + private static Dictionary GetPerOperationExpectations() { - bool result = ValidationHelpers.IsValidConsistencyLevelOverwrite(backendConsistencyLevel, - desiredConsistencyLevel, - true, - (Documents.OperationType) operationType, - Documents.ResourceType.Document); + Dictionary perOperationOverride = new Dictionary(); + + foreach (Documents.OperationType operationType in Enum.GetValues()) + { + perOperationOverride.Add( + operationType, + Documents.OperationTypeExtensions.IsReadOperation(operationType) + && operationType != Documents.OperationType.Head + && operationType != Documents.OperationType.HeadFeed + && operationType != Documents.OperationType.QueryPlan); + } - Assert.AreEqual(isValidConsistencyLevelOverwrite, result); + return perOperationOverride; } } } \ No newline at end of file From d41f0995618cb344fcaf3c16e002960493aaa016 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Fri, 10 Mar 2023 18:07:24 -0800 Subject: [PATCH 074/164] Release: Adds SDK version and change log for 3.32.2 (#3752) * version bump * contract * changelog * version bump * Fixing changelog text * Add another PR --- Directory.Build.props | 4 +- .../contracts/API_3.32.2-preview.txt | 1531 +++++++++++++++++ .../contracts/API_3.32.2.txt | 1478 ++++++++++++++++ changelog.md | 7 + 4 files changed, 3018 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.2-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.2.txt diff --git a/Directory.Build.props b/Directory.Build.props index aa8918e3b1..e7ca7a8727 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.32.1 - 3.32.1 + 3.32.2 + 3.32.2 preview 3.30.2 2.0.1 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.2-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.2-preview.txt new file mode 100644 index 0000000000..69b7a4b83e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.2-preview.txt @@ -0,0 +1,1531 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.2.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.2.txt new file mode 100644 index 0000000000..5218206b0e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.2.txt @@ -0,0 +1,1478 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index b201ba77fb..a8a156b922 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,13 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.32.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.2) - 2023-03-10 +### [3.32.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.2-preview) - 2023-03-10 + +#### Fixed +- [#3713](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3713) CosmosNullReferenceException: Refactors CosmosNullReferenceException to pass along InnerException property on parent NullReferenceException. +- [#3749](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3749) Query: Fixes regression from LINQ custom serializer fix. Introduced in 3.32.0 PR [3749](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3749) + ### [3.32.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.1) - 2023-03-01 ### [3.32.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.1-preview) - 2023-03-01 From 1acfaa280561286d661605b3a793b4e2d1790ada Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Tue, 21 Mar 2023 16:21:35 -0700 Subject: [PATCH 075/164] Subpartitioning: Adds APIs for public release and increase REST API version (#3763) * initial commit, Http version issues still needs to be resolved * updateContracts + update Http Version * updateded version in test * update contracts * requested changed * changed name in comments to subpartitioning from multihash * undid changes to TestLiteralSerialization.xml * removed changes to non API.json files * removed non XXXAPI.json file changes * changed verbage on public comments * changed error message to reflect verbage change --- Microsoft.Azure.Cosmos/src/CosmosClient.cs | 5 +- .../src/PartitionKeyBuilder.cs | 7 +-- .../src/Resource/Database/DatabaseCore.cs | 8 +-- .../Resource/Settings/ContainerProperties.cs | 26 ++------ .../CosmosContainerTests.cs | 4 +- .../CosmosMultiHashTest.cs | 7 --- .../CosmosReadManyItemsTests.cs | 39 +----------- .../Contracts/ContractTests.cs | 6 +- .../Contracts/DotNetPreviewSDKAPI.json | 63 ------------------- .../Contracts/DotNetSDKAPI.json | 63 +++++++++++++++++++ 10 files changed, 77 insertions(+), 151 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/CosmosClient.cs b/Microsoft.Azure.Cosmos/src/CosmosClient.cs index e5ca2d8b53..d4fe7dcb9b 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClient.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClient.cs @@ -115,11 +115,8 @@ public class CosmosClient : IDisposable static CosmosClient() { -#if PREVIEW HttpConstants.Versions.CurrentVersion = HttpConstants.Versions.v2020_07_15; -#else - HttpConstants.Versions.CurrentVersion = HttpConstants.Versions.v2018_12_31; -#endif + HttpConstants.Versions.CurrentVersionUTF8 = Encoding.UTF8.GetBytes(HttpConstants.Versions.CurrentVersion); ServiceInteropWrapper.AssembliesExist = new Lazy(() => diff --git a/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs b/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs index 6154921a86..e9b0e70a7d 100644 --- a/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs +++ b/Microsoft.Azure.Cosmos/src/PartitionKeyBuilder.cs @@ -11,12 +11,7 @@ namespace Microsoft.Azure.Cosmos /// /// Represents a partition key value list in the Azure Cosmos DB service. /// -#if PREVIEW - public -#else - internal -#endif - sealed class PartitionKeyBuilder + public sealed class PartitionKeyBuilder { private readonly List partitionKeyValues; diff --git a/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseCore.cs b/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseCore.cs index f8bbb95276..5f97a15286 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Database/DatabaseCore.cs @@ -5,6 +5,7 @@ namespace Microsoft.Azure.Cosmos { using System; + using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; @@ -15,10 +16,6 @@ namespace Microsoft.Azure.Cosmos using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Documents; -#if PREVIEW - using System.Collections.Generic; -#endif - /// /// Operations for reading or deleting an existing database. /// @@ -219,7 +216,6 @@ public async Task CreateContainerIfNotExistsAsync( nameof(containerProperties.PartitionKey)); } } -#if PREVIEW else { IReadOnlyList retrivedPartitionKeyPaths = retrivedContainerResponse.Resource.PartitionKeyPaths; @@ -236,7 +232,7 @@ public async Task CreateContainerIfNotExistsAsync( nameof(containerProperties.PartitionKey)); } } -#endif + return retrivedContainerResponse; } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs index b95efb99c8..94cb93cff5 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs @@ -112,14 +112,8 @@ public ContainerProperties(string id, string partitionKeyPath) /// Initializes a new instance of the class for the Azure Cosmos DB service. /// /// The Id of the resource in the Azure Cosmos service. - /// The path to the partition key. Example: /location -#if PREVIEW - public -#else - internal -#endif - - ContainerProperties(string id, IReadOnlyList partitionKeyPaths) + /// The paths of the hierarchical partition keys. Example: ["/tenantId", "/userId"] + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths) { this.Id = id; @@ -347,12 +341,11 @@ public string PartitionKeyPath { get { -#if PREVIEW if (this.PartitionKey?.Kind == PartitionKind.MultiHash && this.PartitionKey?.Paths.Count > 1) { - throw new NotImplementedException($"This MultiHash collection has more than 1 partition key path please use `PartitionKeyPaths`"); + throw new NotImplementedException($"This subpartitioned container has more than 1 partition key path please use `PartitionKeyPaths`"); } -#endif + return this.PartitionKey?.Paths != null && this.PartitionKey.Paths.Count > 0 ? this.PartitionKey?.Paths[0] : null; } set @@ -377,15 +370,10 @@ public string PartitionKeyPath } /// - /// JSON path used for containers partitioning + /// List of JSON paths used for containers with hierarchical partition keys /// [JsonIgnore] -#if PREVIEW - public -#else - internal -#endif - IReadOnlyList PartitionKeyPaths + public IReadOnlyList PartitionKeyPaths { get => this.PartitionKey?.Paths; set @@ -657,12 +645,10 @@ internal IReadOnlyList> PartitionKeyPathTokens throw new ArgumentOutOfRangeException($"Container {this.Id} is not partitioned"); } -#if PREVIEW if (this.PartitionKey.Kind == Documents.PartitionKind.MultiHash && this.PartitionKeyPaths == null) { throw new ArgumentOutOfRangeException($"Container {this.Id} is not partitioned"); } -#endif List> partitionKeyPathTokensList = new List>(); foreach (string path in this.PartitionKey?.Paths) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs index 07cb6a4dca..f3befc588b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosContainerTests.cs @@ -11,6 +11,7 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System.Linq; using System.Net; using System.Threading.Tasks; + using HttpConstants = Microsoft.Azure.Documents.HttpConstants; using Microsoft.Azure.Cosmos.Resource.CosmosExceptions; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -22,6 +23,7 @@ public class CosmosContainerTests { private CosmosClient cosmosClient = null; private Cosmos.Database cosmosDatabase = null; + private static long ToEpoch(DateTime dateTime) { return (long)(dateTime - new DateTime(1970, 1, 1)).TotalSeconds; @@ -713,7 +715,6 @@ public async Task GetFeedRangeOnContainerRecreateScenariosTestAsync() } } -#if PREVIEW //MultiHash container checks. [TestMethod] public async Task CreateContainerIfNotExistsAsyncForMultiHashCollectionsTest() @@ -798,7 +799,6 @@ public async Task CreateContainerIfNotExistsAsyncForMultiHashCollectionsTest() } -#endif [TestMethod] public async Task StreamPartitionedCreateWithPathDelete() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs index 3c590092db..5307145dfc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosMultiHashTest.cs @@ -18,13 +18,9 @@ public class CosmosMultiHashTest private Container container = null; private ContainerProperties containerProperties = null; - private readonly string currentVersion = HttpConstants.Versions.CurrentVersion; - - [TestInitialize] public async Task TestInitialize() { - HttpConstants.Versions.CurrentVersion = "2020-07-15"; this.client = TestCommon.CreateCosmosClient(true); this.database = await this.client.CreateDatabaseIfNotExistsAsync("mydb"); @@ -37,9 +33,6 @@ public async Task Cleanup() { await this.database.DeleteAsync(); this.client.Dispose(); - - HttpConstants.Versions.CurrentVersion = this.currentVersion; - this.client.Dispose(); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs index c3949d763f..d215b6b18b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs @@ -510,44 +510,7 @@ await container.CreateItemAsync( await database.DeleteAsync(); client.Dispose(); - } - -#if PREVIEW - [TestMethod] - public async Task ReadManyMultiplePK() - { - IReadOnlyList pkPaths = new List { "/pk", "/description" }; - ContainerProperties containerSettings = new ContainerProperties(id: Guid.NewGuid().ToString(), partitionKeyPaths: pkPaths); - Container container = await this.database.CreateContainerAsync(containerSettings); - - for (int i = 0; i < 5; i++) - { - ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(); - item.pk = "pk" + i.ToString(); - item.id = i.ToString(); - item.description = "description" + i; - ItemResponse itemResponse = await container.CreateItemAsync(item); - Assert.AreEqual(HttpStatusCode.Created, itemResponse.StatusCode); - } - - List<(string, PartitionKey)> itemList = new List<(string, PartitionKey)>(); - for (int i = 0; i < 5; i++) - { - PartitionKey partitionKey = new PartitionKeyBuilder() - .Add("pk" + i) - .Add("description" + i) - .Build(); - - itemList.Add((i.ToString(), partitionKey)); - } - - FeedResponse feedResponse = await container.ReadManyItemsAsync(itemList); - Assert.IsNotNull(feedResponse); - Assert.AreEqual(feedResponse.Count, 5); - Assert.IsTrue(feedResponse.Headers.RequestCharge > 0); - Assert.IsNotNull(feedResponse.Diagnostics); - } -#endif + } private class NestedToDoActivity { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/ContractTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/ContractTests.cs index 9501dee4ce..a4d295a634 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/ContractTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/ContractTests.cs @@ -23,13 +23,9 @@ public void ApiVersionTest() } catch(ArgumentNullException) { } -#if PREVIEW + Assert.AreEqual(HttpConstants.Versions.v2020_07_15, HttpConstants.Versions.CurrentVersion); CollectionAssert.AreEqual(Encoding.UTF8.GetBytes(HttpConstants.Versions.v2020_07_15), HttpConstants.Versions.CurrentVersionUTF8); -#else - Assert.AreEqual(HttpConstants.Versions.v2018_12_31, HttpConstants.Versions.CurrentVersion); - CollectionAssert.AreEqual(Encoding.UTF8.GetBytes(HttpConstants.Versions.v2018_12_31), HttpConstants.Versions.CurrentVersionUTF8); -#endif ulong capabilitites = SDKSupportedCapabilitiesHelpers.GetSDKSupportedCapabilities(); Assert.AreEqual(capabilitites & (ulong)SDKSupportedCapabilities.PartitionMerge, (ulong)SDKSupportedCapabilities.PartitionMerge); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index 43801584fe..39ae1d2eca 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -284,32 +284,10 @@ "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, - "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths()": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths[Newtonsoft.Json.JsonIgnoreAttribute()]": { - "Type": "Property", - "Attributes": [ - "JsonIgnoreAttribute" - ], - "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])": { - "Type": "Constructor", - "Attributes": [], - "MethodInfo": "[Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String]), Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])]" - }, "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy)": { "Type": "Method", "Attributes": [], "MethodInfo": "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String])": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} @@ -384,47 +362,6 @@ } }, "NestedTypes": {} - }, - "Microsoft.Azure.Cosmos.PartitionKeyBuilder;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { - "Subclasses": {}, - "Members": { - "Microsoft.Azure.Cosmos.PartitionKey Build()": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean)": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double)": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String)": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType()": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue()": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Void .ctor()": { - "Type": "Constructor", - "Attributes": [], - "MethodInfo": "[Void .ctor(), Void .ctor()]" - } - }, - "NestedTypes": {} } }, "Members": {}, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 9edd8d6de1..3cf5c017c2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -2167,6 +2167,18 @@ ], "MethodInfo": "Microsoft.Azure.Cosmos.UniqueKeyPolicy UniqueKeyPolicy;CanRead:True;CanWrite:True;Microsoft.Azure.Cosmos.UniqueKeyPolicy get_UniqueKeyPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_UniqueKeyPolicy(Microsoft.Azure.Cosmos.UniqueKeyPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths[Newtonsoft.Json.JsonIgnoreAttribute()]": { + "Type": "Property", + "Attributes": [ + "JsonIgnoreAttribute" + ], + "MethodInfo": "System.Collections.Generic.IReadOnlyList`1[System.String] PartitionKeyPaths;CanRead:True;CanWrite:True;System.Collections.Generic.IReadOnlyList`1[System.String] get_PartitionKeyPaths();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "System.Nullable`1[Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion] get_PartitionKeyDefinitionVersion()": { "Type": "Method", "Attributes": [], @@ -2294,6 +2306,11 @@ "Attributes": [], "MethodInfo": "[Void .ctor(), Void .ctor()]" }, + "Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])": { + "Type": "Constructor", + "Attributes": [], + "MethodInfo": "[Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String]), Void .ctor(System.String, System.Collections.Generic.IReadOnlyList`1[System.String])]" + }, "Void .ctor(System.String, System.String)": { "Type": "Constructor", "Attributes": [], @@ -2348,6 +2365,11 @@ "Attributes": [], "MethodInfo": "Void set_PartitionKeyPath(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String])": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Void set_PartitionKeyPaths(System.Collections.Generic.IReadOnlyList`1[System.String]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_TimeToLivePropertyPath(System.String)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ @@ -5589,6 +5611,47 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.PartitionKeyBuilder;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "Microsoft.Azure.Cosmos.PartitionKey Build()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKey Build();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(Double);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder Add(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNoneType();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PartitionKeyBuilder AddNullValue();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void .ctor()": { + "Type": "Constructor", + "Attributes": [], + "MethodInfo": "[Void .ctor(), Void .ctor()]" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.PartitionKeyDefinitionVersion;System.Enum;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:True;IsClass:False;IsValueType:True;IsNested:False;IsGenericType:False;IsSerializable:True": { "Subclasses": {}, "Members": { From d0c05781c6953128167b0a0eb4b023d2e56066c2 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 22 Mar 2023 19:47:03 -0700 Subject: [PATCH 076/164] Change Feed Processor: Fixes LeaseLostException leaks on notification APIs for Renew scenarios (#3775) * Adding cases * Tests --- .../DocumentServiceLeaseManagerCosmos.cs | 48 ++++- .../DocumentServiceLeaseManagerCosmosTests.cs | 195 ++++++++++++++++++ 2 files changed, 239 insertions(+), 4 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/LeaseManagement/DocumentServiceLeaseManagerCosmos.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/LeaseManagement/DocumentServiceLeaseManagerCosmos.cs index 260bff3161..d5a75abb47 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/LeaseManagement/DocumentServiceLeaseManagerCosmos.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/LeaseManagement/DocumentServiceLeaseManagerCosmos.cs @@ -190,7 +190,17 @@ await this.leaseUpdater.UpdateLeaseAsync( if (serverLease.Owner != lease.Owner) { DefaultTrace.TraceInformation("Lease with token {0} no need to release lease. The lease was already taken by another host '{1}'.", lease.CurrentLeaseToken, serverLease.Owner); - throw new LeaseLostException(lease); + throw new LeaseLostException( + lease, + CosmosExceptionFactory.Create( + statusCode: HttpStatusCode.PreconditionFailed, + message: $"{lease.CurrentLeaseToken} lease token was taken over by owner '{serverLease.Owner}'", + headers: new Headers(), + stackTrace: default, + trace: NoOpTrace.Singleton, + error: default, + innerException: default), + isGone: false); } serverLease.Owner = null; return serverLease; @@ -232,7 +242,17 @@ public override async Task RenewAsync(DocumentServiceLease if (serverLease.Owner != lease.Owner) { DefaultTrace.TraceInformation("Lease with token {0} was taken over by owner '{1}'", lease.CurrentLeaseToken, serverLease.Owner); - throw new LeaseLostException(lease); + throw new LeaseLostException( + lease, + CosmosExceptionFactory.Create( + statusCode: HttpStatusCode.PreconditionFailed, + message: $"{lease.CurrentLeaseToken} lease token was taken over by owner '{serverLease.Owner}'", + headers: new Headers(), + stackTrace: default, + trace: NoOpTrace.Singleton, + error: default, + innerException: default), + isGone: false); } return serverLease; }).ConfigureAwait(false); @@ -245,7 +265,17 @@ public override async Task UpdatePropertiesAsync(DocumentS if (lease.Owner != this.options.HostName) { DefaultTrace.TraceInformation("Lease with token '{0}' was taken over by owner '{1}' before lease properties update", lease.CurrentLeaseToken, lease.Owner); - throw new LeaseLostException(lease); + throw new LeaseLostException( + lease, + CosmosExceptionFactory.Create( + statusCode: HttpStatusCode.PreconditionFailed, + message: $"{lease.CurrentLeaseToken} lease token was taken over by owner '{lease.Owner}'", + headers: new Headers(), + stackTrace: default, + trace: NoOpTrace.Singleton, + error: default, + innerException: default), + isGone: false); } return await this.leaseUpdater.UpdateLeaseAsync( @@ -257,7 +287,17 @@ public override async Task UpdatePropertiesAsync(DocumentS if (serverLease.Owner != lease.Owner) { DefaultTrace.TraceInformation("Lease with token '{0}' was taken over by owner '{1}'", lease.CurrentLeaseToken, serverLease.Owner); - throw new LeaseLostException(lease); + throw new LeaseLostException( + lease, + CosmosExceptionFactory.Create( + statusCode: HttpStatusCode.PreconditionFailed, + message: $"{lease.CurrentLeaseToken} lease token was taken over by owner '{serverLease.Owner}'", + headers: new Headers(), + stackTrace: default, + trace: NoOpTrace.Singleton, + error: default, + innerException: default), + isGone: false); } serverLease.Properties = lease.Properties; return serverLease; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/DocumentServiceLeaseManagerCosmosTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/DocumentServiceLeaseManagerCosmosTests.cs index 19a0710e66..88f945ae43 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/DocumentServiceLeaseManagerCosmosTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ChangeFeed/DocumentServiceLeaseManagerCosmosTests.cs @@ -356,6 +356,201 @@ public async Task IfOwnerChangedThrow() && innerCosmosException.StatusCode == HttpStatusCode.PreconditionFailed); } + /// + /// Verifies that if the renewed read a different Owner from the captured in memory, throws a LeaseLost + /// + [TestMethod] + public async Task IfOwnerChangedThrowOnRenew() + { + DocumentServiceLeaseStoreManagerOptions options = new DocumentServiceLeaseStoreManagerOptions + { + HostName = Guid.NewGuid().ToString() + }; + + DocumentServiceLeaseCore lease = new DocumentServiceLeaseCore() + { + LeaseToken = "0", + Owner = Guid.NewGuid().ToString(), + FeedRange = new FeedRangePartitionKeyRange("0") + }; + + Mock mockUpdater = new Mock(); + + Func, bool> validateUpdater = (Func updater) => + { + // Simulate dirty read from db + DocumentServiceLeaseCore serverLease = new DocumentServiceLeaseCore() + { + LeaseToken = "0", + Owner = Guid.NewGuid().ToString(), + FeedRange = new FeedRangePartitionKeyRange("0") + }; + DocumentServiceLease afterUpdateLease = updater(serverLease); + return true; + }; + + mockUpdater.Setup(c => c.UpdateLeaseAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.Is>(f => validateUpdater(f)))) + .ReturnsAsync(lease); + + ResponseMessage leaseResponse = new ResponseMessage(System.Net.HttpStatusCode.OK) + { + Content = new CosmosJsonDotNetSerializer().ToStream(lease) + }; + + Mock leaseContainer = new Mock(); + leaseContainer.Setup(c => c.ReadItemStreamAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())).ReturnsAsync(leaseResponse); + + DocumentServiceLeaseManagerCosmos documentServiceLeaseManagerCosmos = new DocumentServiceLeaseManagerCosmos( + Mock.Of(), + leaseContainer.Object, + mockUpdater.Object, + options, + Mock.Of()); + + LeaseLostException leaseLost = await Assert.ThrowsExceptionAsync(() => documentServiceLeaseManagerCosmos.RenewAsync(lease)); + + Assert.IsTrue(leaseLost.InnerException is CosmosException innerCosmosException + && innerCosmosException.StatusCode == HttpStatusCode.PreconditionFailed); + } + + /// + /// Verifies that if the update properties read a different Owner from the captured in memory, throws a LeaseLost + /// + [TestMethod] + public async Task IfOwnerChangedThrowOnUpdateProperties() + { + DocumentServiceLeaseCore lease = new DocumentServiceLeaseCore() + { + LeaseToken = "0", + Owner = Guid.NewGuid().ToString(), + FeedRange = new FeedRangePartitionKeyRange("0") + }; + + DocumentServiceLeaseStoreManagerOptions options = new DocumentServiceLeaseStoreManagerOptions + { + HostName = lease.Owner + }; + + Mock mockUpdater = new Mock(); + + Func, bool> validateUpdater = (Func updater) => + { + // Simulate dirty read from db + DocumentServiceLeaseCore serverLease = new DocumentServiceLeaseCore() + { + LeaseToken = "0", + Owner = Guid.NewGuid().ToString(), + FeedRange = new FeedRangePartitionKeyRange("0") + }; + DocumentServiceLease afterUpdateLease = updater(serverLease); + return true; + }; + + mockUpdater.Setup(c => c.UpdateLeaseAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.Is>(f => validateUpdater(f)))) + .ReturnsAsync(lease); + + ResponseMessage leaseResponse = new ResponseMessage(System.Net.HttpStatusCode.OK) + { + Content = new CosmosJsonDotNetSerializer().ToStream(lease) + }; + + Mock leaseContainer = new Mock(); + leaseContainer.Setup(c => c.ReadItemStreamAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())).ReturnsAsync(leaseResponse); + + DocumentServiceLeaseManagerCosmos documentServiceLeaseManagerCosmos = new DocumentServiceLeaseManagerCosmos( + Mock.Of(), + leaseContainer.Object, + mockUpdater.Object, + options, + Mock.Of()); + + LeaseLostException leaseLost = await Assert.ThrowsExceptionAsync(() => documentServiceLeaseManagerCosmos.UpdatePropertiesAsync(lease)); + + Assert.IsTrue(leaseLost.InnerException is CosmosException innerCosmosException + && innerCosmosException.StatusCode == HttpStatusCode.PreconditionFailed); + } + + /// + /// Verifies that if the update properties read a different Owner from the captured in memory, throws a LeaseLost + /// + [TestMethod] + public async Task IfOwnerChangedThrowOnRelease() + { + DocumentServiceLeaseStoreManagerOptions options = new DocumentServiceLeaseStoreManagerOptions + { + HostName = Guid.NewGuid().ToString() + }; + + DocumentServiceLeaseCore lease = new DocumentServiceLeaseCore() + { + LeaseToken = "0", + Owner = Guid.NewGuid().ToString(), + FeedRange = new FeedRangePartitionKeyRange("0") + }; + + Mock mockUpdater = new Mock(); + + Func, bool> validateUpdater = (Func updater) => + { + // Simulate dirty read from db + DocumentServiceLeaseCore serverLease = new DocumentServiceLeaseCore() + { + LeaseToken = "0", + Owner = Guid.NewGuid().ToString(), + FeedRange = new FeedRangePartitionKeyRange("0") + }; + DocumentServiceLease afterUpdateLease = updater(serverLease); + return true; + }; + + mockUpdater.Setup(c => c.UpdateLeaseAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.Is>(f => validateUpdater(f)))) + .ReturnsAsync(lease); + + ResponseMessage leaseResponse = new ResponseMessage(System.Net.HttpStatusCode.OK) + { + Content = new CosmosJsonDotNetSerializer().ToStream(lease) + }; + + Mock leaseContainer = new Mock(); + leaseContainer.Setup(c => c.ReadItemStreamAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())).ReturnsAsync(leaseResponse); + + DocumentServiceLeaseManagerCosmos documentServiceLeaseManagerCosmos = new DocumentServiceLeaseManagerCosmos( + Mock.Of(), + leaseContainer.Object, + mockUpdater.Object, + options, + Mock.Of()); + + LeaseLostException leaseLost = await Assert.ThrowsExceptionAsync(() => documentServiceLeaseManagerCosmos.ReleaseAsync(lease)); + + Assert.IsTrue(leaseLost.InnerException is CosmosException innerCosmosException + && innerCosmosException.StatusCode == HttpStatusCode.PreconditionFailed); + } + /// /// When a lease is missing the range information, check that we are adding it /// From 4ab62933d2e8ab33c5ad1be7d2d9e711d1a51776 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Thu, 23 Mar 2023 10:57:39 -0700 Subject: [PATCH 077/164] Upgrade Resiliency: Refactors GatewayAddressCache to Mark TransportAddresses to Unhealthy when Connection Reset Event Occurs (#3768) * Code changes to mark the transport uri to unhealthy for which a connection reset event occures through the connection state listener. * Code changes to bump up the direct version. * Code changes to clean up Gateway Address Cache. * Code changes to fix pipeline build. * Code changes to fix serilization test failures. * Code changes to add force refresh to the gateway function callback delegate. --- Directory.Build.props | 2 +- .../src/Routing/GatewayAddressCache.cs | 61 ++++++++++--------- .../src/Routing/GlobalAddressResolver.cs | 25 ++------ .../GatewayAddressCacheTests.cs | 38 ++++++++---- .../Tracing/TraceTests.cs | 2 + 5 files changed, 66 insertions(+), 62 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index e7ca7a8727..39004a08ab 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.32.2 3.32.2 preview - 3.30.2 + 3.30.4 2.0.1 2.0.1 preview diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index b577443761..eba425fb0d 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -387,7 +387,13 @@ private static void LogPartitionCacheRefresh( } } - public void TryRemoveAddresses( + /// + /// Marks the to Unhealthy that matches with the faulted + /// server key. + /// + /// An instance of that contains the host and + /// port of the backend replica. + public async Task MarkAddressesToUnhealthyAsync( ServerKey serverKey) { if (serverKey == null) @@ -395,7 +401,7 @@ public void TryRemoveAddresses( throw new ArgumentNullException(nameof(serverKey)); } - if (this.serverPartitionAddressToPkRangeIdMap.TryRemove(serverKey, out HashSet pkRangeIds)) + if (this.serverPartitionAddressToPkRangeIdMap.TryGetValue(serverKey, out HashSet pkRangeIds)) { PartitionKeyRangeIdentity[] pkRangeIdsCopy; lock (pkRangeIds) @@ -405,36 +411,35 @@ public void TryRemoveAddresses( foreach (PartitionKeyRangeIdentity pkRangeId in pkRangeIdsCopy) { - DefaultTrace.TraceInformation("Remove addresses for collectionRid :{0}, pkRangeId: {1}, serviceEndpoint: {2}", - pkRangeId.CollectionRid, - pkRangeId.PartitionKeyRangeId, - this.serviceEndpoint); - - this.serverPartitionAddressCache.TryRemove(pkRangeId); - } - } - } - - public async Task UpdateAsync( - PartitionKeyRangeIdentity partitionKeyRangeIdentity, - CancellationToken cancellationToken) - { - if (partitionKeyRangeIdentity == null) - { - throw new ArgumentNullException(nameof(partitionKeyRangeIdentity)); - } - - cancellationToken.ThrowIfCancellationRequested(); - - return await this.serverPartitionAddressCache.GetAsync( - key: partitionKeyRangeIdentity, + // The forceRefresh flag is set to true for the callback delegate is because, if the GetAsync() from the async + // non-blocking cache fails to look up the pkRangeId, then there are some inconsistency present in the cache, and it is + // more safe to do a force refresh to fetch the addresses from the gateway, instead of fetching it from the cache itself. + // Please note that, the chances of encountering such scenario is highly unlikely. + PartitionAddressInformation addressInfo = await this.serverPartitionAddressCache.GetAsync( + key: pkRangeId, singleValueInitFunc: (_) => this.GetAddressesForRangeIdAsync( null, cachedAddresses: null, - partitionKeyRangeIdentity.CollectionRid, - partitionKeyRangeIdentity.PartitionKeyRangeId, + pkRangeId.CollectionRid, + pkRangeId.PartitionKeyRangeId, forceRefresh: true), - forceRefresh: (_) => true); + forceRefresh: (_) => false); + + IReadOnlyList transportAddresses = addressInfo.Get(Protocol.Tcp)?.ReplicaTransportAddressUris; + foreach (TransportAddressUri address in from TransportAddressUri transportAddress in transportAddresses + where serverKey.Equals(transportAddress.ReplicaServerKey) + select transportAddress) + { + DefaultTrace.TraceInformation("Marking a backend replica to Unhealthy for collectionRid :{0}, pkRangeId: {1}, serviceEndpoint: {2}, transportAddress: {3}", + pkRangeId.CollectionRid, + pkRangeId.PartitionKeyRangeId, + this.serviceEndpoint, + address.ToString()); + + address.SetUnhealthy(); + } + } + } } private async Task> ResolveMasterAsync(DocumentServiceRequest request, bool forceRefresh) diff --git a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs index 51a6c6d2f3..344f994395 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs @@ -228,33 +228,16 @@ public async Task ResolveAsync( } public async Task UpdateAsync( - IReadOnlyList addressCacheTokens, - CancellationToken cancellationToken) - { - List tasks = new List(); - - foreach (AddressCacheToken cacheToken in addressCacheTokens) - { - if (this.addressCacheByEndpoint.TryGetValue(cacheToken.ServiceEndpoint, out EndpointCache endpointCache)) - { - tasks.Add(endpointCache.AddressCache.UpdateAsync(cacheToken.PartitionKeyRangeIdentity, cancellationToken)); - } - } - - await Task.WhenAll(tasks); - } - - public Task UpdateAsync( ServerKey serverKey, CancellationToken cancellationToken) { foreach (KeyValuePair addressCache in this.addressCacheByEndpoint) { - // since we don't know which address cache contains the pkRanges mapped to this node, we do a tryRemove on all AddressCaches of all regions - addressCache.Value.AddressCache.TryRemoveAddresses(serverKey); + // since we don't know which address cache contains the pkRanges mapped to this node, + // we mark all transport uris that has the same server key to unhealthy status in the + // AddressCaches of all regions. + await addressCache.Value.AddressCache.MarkAddressesToUnhealthyAsync(serverKey); } - - return Task.CompletedTask; } /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 9e3b87ec83..809814aef1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -18,6 +18,8 @@ namespace Microsoft.Azure.Cosmos using Microsoft.Azure.Cosmos.Tests; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Documents; + using Microsoft.Azure.Documents.Client; + using Microsoft.Azure.Documents.Rntbd; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; @@ -108,8 +110,11 @@ public void TestGatewayAddressCacheAutoRefreshOnSuboptimalPartition() public async Task TestGatewayAddressCacheUpdateOnConnectionResetAsync() { FakeMessageHandler messageHandler = new FakeMessageHandler(); - HttpClient httpClient = new HttpClient(messageHandler); - httpClient.Timeout = TimeSpan.FromSeconds(120); + HttpClient httpClient = new HttpClient(messageHandler) + { + Timeout = TimeSpan.FromSeconds(120) + }; + GatewayAddressCache cache = new GatewayAddressCache( new Uri(GatewayAddressCacheTests.DatabaseAccountApiEndpoint), Documents.Client.Protocol.Tcp, @@ -129,8 +134,9 @@ public async Task TestGatewayAddressCacheUpdateOnConnectionResetAsync() Assert.IsNotNull(addresses.AllAddresses.Select(address => address.PhysicalUri == "https://blabla.com")); - // call updateAddress - cache.TryRemoveAddresses(new Documents.Rntbd.ServerKey(new Uri("https://blabla.com"))); + // Mark transport addresses to Unhealthy depcting a connection reset event. + ServerKey faultyServerKey = new (new Uri("https://blabla2.com")); + await cache.MarkAddressesToUnhealthyAsync(faultyServerKey); // check if the addresss is updated addresses = await cache.TryGetAddressesAsync( @@ -140,7 +146,15 @@ public async Task TestGatewayAddressCacheUpdateOnConnectionResetAsync() false, CancellationToken.None); - Assert.IsNotNull(addresses.AllAddresses.Select(address => address.PhysicalUri == "https://blabla5.com")); + // Validate that the above transport uri with host blabla2.com has been marked Unhealthy. + IReadOnlyList transportAddressUris = addresses + .Get(Protocol.Tcp)? + .ReplicaTransportAddressUris; + + TransportAddressUri transportAddressUri = transportAddressUris + .Single(x => x.ReplicaServerKey.Equals(faultyServerKey)); + + Assert.IsTrue(condition: transportAddressUri.GetCurrentHealthState().GetHealthStatus().Equals(TransportAddressHealthState.HealthStatus.Unhealthy)); } [TestMethod] @@ -1458,23 +1472,23 @@ public int GetMethodInvocationCount() } Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( - IReadOnlyList addresses) + IEnumerable addresses) { - this.totalReceivedAddressesCounter = addresses.Count; - for (int i = 0; i < addresses.Count; i++) + this.totalReceivedAddressesCounter = addresses.Count(); + for (int i = 0; i < addresses.Count(); i++) { if (this.useAttemptBasedFailingIndexs) { if (this.failIndexesByAttempts.ContainsKey(i) && this.failIndexesByAttempts[i].Contains(this.methodInvocationCounter)) { this.ExecuteFailureCondition( - addresses: addresses, + addresses: addresses.ToList(), index: i); } else { this.ExecuteSuccessCondition( - addresses: addresses, + addresses: addresses.ToList(), index: i); } } @@ -1483,13 +1497,13 @@ Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( if (this.failingIndexes.Contains(i)) { this.ExecuteFailureCondition( - addresses: addresses, + addresses: addresses.ToList(), index: i); } else { this.ExecuteSuccessCondition( - addresses: addresses, + addresses: addresses.ToList(), index: i); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs index f747d35d22..ff27842308 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs @@ -125,6 +125,8 @@ public void ValidateStoreResultSerialization() storeResultProperties.Remove(nameof(storeResult.Target.Exception)); storeResultProperties.Add("transportRequestTimeline"); storeResultProperties.Remove(nameof(storeResult.Target.TransportRequestStats)); + storeResultProperties.Add("ReplicaHealthStatuses"); + storeResultProperties.Remove(nameof(storeResult.Target.ReplicaHealthStatuses)); foreach (string key in jsonPropertyNames) { From d822239439c6b42973525fd2910720b69c464253 Mon Sep 17 00:00:00 2001 From: Achint-Agrawal <45819170+Achint-Agrawal@users.noreply.github.com> Date: Tue, 28 Mar 2023 01:50:11 +0530 Subject: [PATCH 078/164] [Preview] PriorityBasedExecution: Adds PriorityLevel as a RequestOption (#3672) * Added Priority Level as a Request Option * Changed Priority Level Low and High to 1 and 2 respectively * Bumped DirectVersion * Added made PriorityLevel internal for non preview packages * Deleted PriorityLevelTests.cs * Added description of Priority Level in RequestOptions.cs * Modified comments for PriorityLevel in RequestOptions.cs * Updated Contracts * Modified Remarks for PriorityLevel and added see also link. * Updated contracts --------- Co-authored-by: Matias Quaranta --- Microsoft.Azure.Cosmos/src/DocumentClient.cs | 5 ++ .../src/RequestOptions/RequestOptions.cs | 28 ++++++++++- .../src/Resource/Settings/PriorityLevel.cs | 39 ++++++++++++++++ .../Contracts/DotNetPreviewSDKAPI.json | 46 +++++++++++++++++++ 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 Microsoft.Azure.Cosmos/src/Resource/Settings/PriorityLevel.cs diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index c7504d312c..cbd4e06674 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -6909,6 +6909,11 @@ private INameValueCollection GetRequestHeaders( headers.Set(HttpConstants.HttpHeaders.ConsistencyLevel, options.ConsistencyLevel.ToString()); } + if (options.PriorityLevel.HasValue) + { + headers.Set(HttpConstants.HttpHeaders.PriorityLevel, options.PriorityLevel.ToString()); + } + if (options.IndexingDirective.HasValue) { headers.Set(HttpConstants.HttpHeaders.IndexingDirective, options.IndexingDirective.ToString()); diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs index 5387a0fbac..dc02f9a248 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/RequestOptions.cs @@ -42,11 +42,32 @@ public class RequestOptions /// public Action AddRequestHeaders { get; set; } + /// + /// Gets or sets the priority level for a request. + /// + /// + /// Setting priority level only has an effect if Priority Based Execution is enabled. + /// If it is not enabled, the priority level is ignored by the backend. + /// Default PriorityLevel for each request is treated as High. It can be explicitly set to Low for some requests. + /// When Priority based execution is enabled, if there are more requests than the configured RU/S in a second, + /// then Cosmos DB will throttle low priority requests to allow high priority requests to execute. + /// This does not limit the throughput available to each priority level. Each priority level can consume the complete + /// provisioned throughput in absence of the other. If both priorities are present and the user goes above the + /// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads. + /// + /// +#if PREVIEW + public +#else + internal +#endif + PriorityLevel? PriorityLevel { get; set; } + /// /// Set Request Level Distributed Tracing Options. /// internal DistributedTracingOptions DistributedTracingOptions { get; set; } - + /// /// Gets or sets the boolean to use effective partition key routing in the cosmos db request. /// @@ -91,6 +112,11 @@ internal virtual void PopulateRequestOptions(RequestMessage request) request.Headers.Add(HttpConstants.HttpHeaders.IfNoneMatch, this.IfNoneMatchEtag); } + if (this.PriorityLevel.HasValue) + { + request.Headers.Add(HttpConstants.HttpHeaders.PriorityLevel, this.PriorityLevel.ToString()); + } + this.AddRequestHeaders?.Invoke(request.Headers); } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/PriorityLevel.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/PriorityLevel.cs new file mode 100644 index 0000000000..6644d0931f --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/PriorityLevel.cs @@ -0,0 +1,39 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos +{ + /// + /// Valid values of Priority Level for a request + /// + /// + /// Setting priority level only has an effect if Priority Based Execution is enabled. + /// If it is not enabled, the priority level is ignored by the backend. + /// Default PriorityLevel for each request is treated as High. It can be explicitly set to Low for some requests. + /// When Priority based execution is enabled, if there are more requests than the configured RU/S in a second, + /// then Cosmos DB will throttle low priority requests to allow high priority requests to execute. + /// This does not limit the throughput available to each priority level. Each priority level can consume the complete + /// provisioned throughput in absence of the other. If both priorities are present and the user goes above the + /// configured RU/s, low priority requests start getting throttled first to allow execution of mission critical workloads. + /// + /// + +#if PREVIEW + public +#else + internal +#endif + enum PriorityLevel + { + /// + /// High Priority + /// + High = 1, + + /// + /// Low Priority + /// + Low = 2, + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index 39ae1d2eca..8a3d326d50 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -362,6 +362,52 @@ } }, "NestedTypes": {} + }, + "Microsoft.Azure.Cosmos.PriorityLevel;System.Enum;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:True;IsClass:False;IsValueType:True;IsNested:False;IsGenericType:False;IsSerializable:True": { + "Subclasses": {}, + "Members": { + "Int32 value__": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "Int32 value__;IsInitOnly:False;IsStatic:False;" + }, + "Microsoft.Azure.Cosmos.PriorityLevel High": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PriorityLevel High;IsInitOnly:False;IsStatic:True;" + }, + "Microsoft.Azure.Cosmos.PriorityLevel Low": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PriorityLevel Low;IsInitOnly:False;IsStatic:True;" + } + }, + "NestedTypes": {} + }, + "Microsoft.Azure.Cosmos.RequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] PriorityLevel;CanRead:True;CanWrite:True;System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_PriorityLevel(System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} } }, "Members": {}, From 1c544bf651e097aaa696bff0abe8a7a3d651f512 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 29 Mar 2023 20:50:33 +0530 Subject: [PATCH 079/164] [Internal] Client Telemetry: Adds sampling logic for network level telemetry (#3750) * sampling logic add * throttlinfix * fix tests * fix tests * remove dispose from sampler * add 412 * draft push * refactor code for sampling * clean up * start testing * adding tests * wip * test fix * fix test * fix tests * deleted extra file * remove one toList * add custome logic for sampling * code refactor * replace key * remove commented code from test * added more comments * simpler sampler logic * refactor code --- .../src/Telemetry/ClientTelemetry.cs | 55 ++----- .../src/Telemetry/ClientTelemetryOptions.cs | 34 +---- .../Telemetry/ClientTelemetryPayloadWriter.cs | 22 ++- .../src/Telemetry/ClientTelemetryProcessor.cs | 14 +- .../src/Telemetry/Models/RequestInfo.cs | 31 +++- .../src/Telemetry/NetworkDataRecorder.cs | 139 ++++++++++++++++++ .../src/Telemetry/Sampler/DataSampler.cs | 84 +++++++++++ .../ClientTelemetryTests.cs | 134 ----------------- .../Telemetry/ClientTelemetryTests.cs | 40 ++--- .../Telemetry/DataSamplerTests.cs | 119 +++++++++++++++ .../Telemetry/DiagnosticsFilterHelperTest.cs | 3 - .../Telemetry/NetworkDataRecorderTest.cs | 92 ++++++++++++ 12 files changed, 516 insertions(+), 251 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Telemetry/NetworkDataRecorder.cs create mode 100644 Microsoft.Azure.Cosmos/src/Telemetry/Sampler/DataSampler.cs delete mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DataSamplerTests.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/NetworkDataRecorderTest.cs diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs index d0ca7d8ac8..8a83778fdb 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs @@ -36,7 +36,8 @@ internal class ClientTelemetry : IDisposable private readonly ClientTelemetryProperties clientTelemetryInfo; private readonly ClientTelemetryProcessor processor; private readonly DiagnosticsHandlerHelper diagnosticsHelper; - + private readonly NetworkDataRecorder networkDataRecorder; + private readonly CancellationTokenSource cancellationTokenSource; private readonly GlobalEndpointManager globalEndpointManager; @@ -49,11 +50,8 @@ internal class ClientTelemetry : IDisposable private ConcurrentDictionary cacheRefreshInfoMap = new ConcurrentDictionary(); - private ConcurrentDictionary requestInfoMap - = new ConcurrentDictionary(); - private int numberOfFailures = 0; - + /// /// Only for Mocking in tests /// @@ -112,6 +110,8 @@ internal ClientTelemetry( GlobalEndpointManager globalEndpointManager) { this.diagnosticsHelper = diagnosticsHelper ?? throw new ArgumentNullException(nameof(diagnosticsHelper)); + this.globalEndpointManager = globalEndpointManager; + this.processor = new ClientTelemetryProcessor(httpClient, authorizationTokenProvider); this.clientTelemetryInfo = new ClientTelemetryProperties( @@ -122,8 +122,9 @@ internal ClientTelemetry( preferredRegions: preferredRegions, aggregationIntervalInSec: (int)observingWindow.TotalSeconds); + this.networkDataRecorder = new NetworkDataRecorder(); + this.cancellationTokenSource = new CancellationTokenSource(); - this.globalEndpointManager = globalEndpointManager; } /// @@ -179,18 +180,15 @@ private async Task EnrichAndSendAsync() ConcurrentDictionary cacheRefreshInfoSnapshot = Interlocked.Exchange(ref this.cacheRefreshInfoMap, new ConcurrentDictionary()); - - ConcurrentDictionary requestInfoSnapshot - = Interlocked.Exchange(ref this.requestInfoMap, new ConcurrentDictionary()); - + try { await this.processor - .ProcessAndSendAsync( + .ProcessAndSendAsync( clientTelemetryInfo: this.clientTelemetryInfo, operationInfoSnapshot: operationInfoSnapshot, cacheRefreshInfoSnapshot: cacheRefreshInfoSnapshot, - requestInfoSnapshot: requestInfoSnapshot, + requestInfoSnapshot: this.networkDataRecorder.GetRequests(), cancellationToken: this.cancellationTokenSource.Token); this.numberOfFailures = 0; @@ -296,7 +294,7 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, // Record Network/Replica Information SummaryDiagnostics summaryDiagnostics = new SummaryDiagnostics(trace); - this.RecordRntbdResponses(containerId, databaseId, summaryDiagnostics.StoreResponseStatistics.Value); + this.networkDataRecorder.Record(summaryDiagnostics.StoreResponseStatistics.Value, databaseId, containerId); string regionsContacted = ClientTelemetryHelper.GetContactedRegions(cosmosDiagnostics.GetContactedRegions()); @@ -338,37 +336,6 @@ internal void CollectOperationInfo(CosmosDiagnostics cosmosDiagnostics, } } - /// - /// Records RNTBD calls statistics - /// - /// - /// - /// - private void RecordRntbdResponses(string containerId, string databaseId, List storeResponseStatistics) - { - foreach (StoreResponseStatistics storetatistics in storeResponseStatistics) - { - if (ClientTelemetryOptions.IsEligible((int)storetatistics.StoreResult.StatusCode, (int)storetatistics.StoreResult.SubStatusCode, storetatistics.RequestLatency)) - { - RequestInfo requestInfo = new RequestInfo() - { - DatabaseName = databaseId, - ContainerName = containerId, - Uri = storetatistics.StoreResult.StorePhysicalAddress.ToString(), - StatusCode = (int)storetatistics.StoreResult.StatusCode, - SubStatusCode = (int)storetatistics.StoreResult.SubStatusCode, - Resource = storetatistics.RequestResourceType.ToString(), - Operation = storetatistics.RequestOperationType.ToString(), - }; - - LongConcurrentHistogram latencyHist = this.requestInfoMap.GetOrAdd(requestInfo, x => new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, - ClientTelemetryOptions.RequestLatencyMax, - ClientTelemetryOptions.RequestLatencyPrecision)); - latencyHist.RecordValue(storetatistics.RequestLatency.Ticks); - } - } - } - /// /// Dispose of cosmos client.It will get disposed with client so not making it thread safe. /// diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs index f2caaf50d5..47232a187e 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs @@ -88,15 +88,18 @@ internal static class ClientTelemetryOptions internal static readonly ResourceType AllowedResourceTypes = ResourceType.Document; // Why 5 sec? As of now, if any network request is taking more than 5 millisecond sec, we will consider it slow request this value can be revisited in future - private static readonly TimeSpan NetworkLatencyThreshold = TimeSpan.FromMilliseconds(5); + internal static readonly TimeSpan NetworkLatencyThreshold = TimeSpan.FromMilliseconds(5); + internal static readonly int NetworkRequestsSampleSizeThreshold = 10; + internal static readonly JsonSerializerSettings JsonSerializerSettings = new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore, MaxDepth = 64, // https://github.com/advisories/GHSA-5crp-9r3c-p9vr }; - private static readonly List ExcludedStatusCodes = new List { 404, 409 }; + internal static readonly List ExcludedStatusCodes = new List { 404, 409, 412 }; + internal static readonly int NetworkTelemetrySampleSize = 200; internal static int PayloadSizeThreshold = 1024 * 1024 * 2; // 2MB private static Uri clientTelemetryEndpoint; @@ -180,32 +183,5 @@ internal static string GetEnvironmentName() } return environmentName; } - - /// - /// This method will return true if the request is failed with User or Server Exception and not excluded from telemetry. - /// This method will return true if the request latency is more than the threshold. - /// otherwise return false - /// - /// - /// - /// - /// true/false - internal static bool IsEligible(int statusCode, int subStatusCode, TimeSpan latencyInMs) - { - return - ClientTelemetryOptions.IsStatusCodeNotExcluded(statusCode, subStatusCode) && - (ClientTelemetryOptions.IsUserOrServerError(statusCode) || latencyInMs >= ClientTelemetryOptions.NetworkLatencyThreshold); - } - - private static bool IsUserOrServerError(int statusCode) - { - return statusCode >= 400 && statusCode <= 599; - } - - private static bool IsStatusCodeNotExcluded(int statusCode, int subStatusCode) - { - return !(ClientTelemetryOptions.ExcludedStatusCodes.Contains(statusCode) && subStatusCode == 0); - } - } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs index 1158c7d639..370d576fcc 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryPayloadWriter.cs @@ -21,7 +21,7 @@ public static async Task SerializedPayloadChunksAsync( ClientTelemetryProperties properties, ConcurrentDictionary operationInfoSnapshot, ConcurrentDictionary cacheRefreshInfoSnapshot, - ConcurrentDictionary requestInfoSnapshot, + IReadOnlyList sampledRequestInfo, Func callback) { if (properties == null) @@ -46,11 +46,12 @@ public static async Task SerializedPayloadChunksAsync( OperationInfo payloadForRequestCharge = payloadForLatency.Copy(); payloadForRequestCharge.MetricInfo = new MetricInfo(ClientTelemetryOptions.RequestChargeName, ClientTelemetryOptions.RequestChargeUnit); payloadForRequestCharge.SetAggregators(entry.Value.requestcharge, ClientTelemetryOptions.HistogramPrecisionFactor); - + string latencyMetrics = JsonConvert.SerializeObject(payloadForLatency); string requestChargeMetrics = JsonConvert.SerializeObject(payloadForRequestCharge); - - if (lengthNow + latencyMetrics.Length + requestChargeMetrics.Length > ClientTelemetryOptions.PayloadSizeThreshold) + + int thisSectionLength = latencyMetrics.Length + requestChargeMetrics.Length; + if (lengthNow + thisSectionLength > ClientTelemetryOptions.PayloadSizeThreshold) { writer.WriteEndArray(); writer.WriteEndObject(); @@ -98,21 +99,16 @@ public static async Task SerializedPayloadChunksAsync( } - if (requestInfoSnapshot?.Any() == true) + if (sampledRequestInfo?.Any() == true) { writer.WritePropertyName("requestInfo"); writer.WriteStartArray(); - foreach (KeyValuePair entry in requestInfoSnapshot) + foreach (RequestInfo entry in sampledRequestInfo) { long lengthNow = stringBuilder.Length; - - MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); - metricInfo.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); - - RequestInfo payloadForLatency = entry.Key; - payloadForLatency.Metrics.Add(metricInfo); - string latencyMetrics = JsonConvert.SerializeObject(payloadForLatency); + + string latencyMetrics = JsonConvert.SerializeObject(entry); if (lengthNow + latencyMetrics.Length > ClientTelemetryOptions.PayloadSizeThreshold) { diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs index b91eb96832..c9511cb4e4 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryProcessor.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; using System.Collections.Concurrent; + using System.Collections.Generic; using System.Net.Http; using System.Text; using System.Threading; @@ -22,7 +23,7 @@ internal class ClientTelemetryProcessor private readonly AuthorizationTokenProvider tokenProvider; private readonly CosmosHttpClient httpClient; - + internal ClientTelemetryProcessor(CosmosHttpClient httpClient, AuthorizationTokenProvider tokenProvider) { this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); @@ -32,17 +33,12 @@ internal ClientTelemetryProcessor(CosmosHttpClient httpClient, AuthorizationToke /// /// It will create Task to process and send client telemetry payload to Client Telemetry Service. /// - /// - /// - /// - /// - /// /// Task internal async Task ProcessAndSendAsync( ClientTelemetryProperties clientTelemetryInfo, - ConcurrentDictionary operationInfoSnapshot, + ConcurrentDictionary operationInfoSnapshot, ConcurrentDictionary cacheRefreshInfoSnapshot, - ConcurrentDictionary requestInfoSnapshot, + IReadOnlyList requestInfoSnapshot, CancellationToken cancellationToken) { try @@ -51,7 +47,7 @@ await ClientTelemetryPayloadWriter.SerializedPayloadChunksAsync( properties: clientTelemetryInfo, operationInfoSnapshot: operationInfoSnapshot, cacheRefreshInfoSnapshot: cacheRefreshInfoSnapshot, - requestInfoSnapshot: requestInfoSnapshot, + sampledRequestInfo: requestInfoSnapshot, callback: async (payload) => await this.SendAsync(clientTelemetryInfo.GlobalDatabaseAccountName, payload, cancellationToken)); } catch (Exception ex) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs b/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs index d71f0fa446..382f37260d 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/Models/RequestInfo.cs @@ -37,8 +37,14 @@ internal sealed class RequestInfo public override int GetHashCode() { - int hash = 3; + int hash = this.GetHashCodeForSampler(); hash = (hash * 7) ^ (this.Uri == null ? 0 : this.Uri.GetHashCode()); + return hash; + } + + public int GetHashCodeForSampler() + { + int hash = 3; hash = (hash * 7) ^ (this.DatabaseName == null ? 0 : this.DatabaseName.GetHashCode()); hash = (hash * 7) ^ (this.ContainerName == null ? 0 : this.ContainerName.GetHashCode()); hash = (hash * 7) ^ (this.Operation == null ? 0 : this.Operation.GetHashCode()); @@ -47,7 +53,7 @@ public override int GetHashCode() hash = (hash * 7) ^ (this.SubStatusCode.GetHashCode()); return hash; } - + public override bool Equals(object obj) { bool isequal = obj is RequestInfo payload && @@ -62,5 +68,26 @@ public override bool Equals(object obj) return isequal; } + public double GetP99Latency() + { + foreach (MetricInfo metric in this.Metrics) + { + if (metric.MetricsName.Equals(ClientTelemetryOptions.RequestLatencyName, StringComparison.OrdinalIgnoreCase)) + { + return metric.Percentiles[ClientTelemetryOptions.Percentile99]; + } + } + return Double.MinValue; // least prioity for request info w/o latency info + } + + public double GetSampleCount() + { + return (double)this.Metrics[0].Count; + } + + public override string ToString() + { + return "Latency : " + this.GetP99Latency() + ", SampleCount : " + this.GetSampleCount(); + } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/NetworkDataRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/NetworkDataRecorder.cs new file mode 100644 index 0000000000..20e6f975da --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Telemetry/NetworkDataRecorder.cs @@ -0,0 +1,139 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Telemetry +{ + using System.Collections.Concurrent; + using System.Collections.Generic; + using System.Threading; + using HdrHistogram; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; + + internal class NetworkDataRecorder + { + private ConcurrentDictionary RequestInfoHighLatencyBucket + = new ConcurrentDictionary(); + private ConcurrentDictionary RequestInfoErrorBucket + = new ConcurrentDictionary(); + + public void Record(List storeResponseStatistics, string databaseId, string containerId) + { + foreach (StoreResponseStatistics storeStatistics in storeResponseStatistics) + { + if (NetworkDataRecorder.IsStatusCodeNotExcluded((int)storeStatistics.StoreResult.StatusCode, (int)storeStatistics.StoreResult.SubStatusCode)) + { + if (NetworkDataRecorder.IsUserOrServerError((int)storeStatistics.StoreResult.StatusCode)) + { + RequestInfo requestInfo = this.CreateRequestInfo(storeStatistics, databaseId, containerId); + LongConcurrentHistogram latencyHist = this.RequestInfoErrorBucket.GetOrAdd(requestInfo, x => new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision)); + latencyHist.RecordValue(storeStatistics.RequestLatency.Ticks); + + } + else + { + RequestInfo requestInfo = this.CreateRequestInfo(storeStatistics, databaseId, containerId); + LongConcurrentHistogram latencyHist = this.RequestInfoHighLatencyBucket.GetOrAdd(requestInfo, x => new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision)); + latencyHist.RecordValue(storeStatistics.RequestLatency.Ticks); + } + } + } + } + + internal void GetErroredRequests(List requestInfoList) + { + ConcurrentDictionary requestInfoErrorList + = Interlocked.Exchange(ref this.RequestInfoErrorBucket, new ConcurrentDictionary()); + + List allRequests = new List(); + foreach (KeyValuePair entry in requestInfoErrorList) + { + MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); + metricInfo.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); + + RequestInfo payloadForLatency = entry.Key; + payloadForLatency.Metrics.Add(metricInfo); + + allRequests.Add(payloadForLatency); + } + + requestInfoList.AddRange(DataSampler.OrderAndSample(allRequests, DataSampleCountComparer.Instance)); + } + + internal void GetHighLatencyRequests(List requestInfoList) + { + ConcurrentDictionary requestInfoHighLatencyList + = Interlocked.Exchange(ref this.RequestInfoHighLatencyBucket, new ConcurrentDictionary()); + + List allRequests = new List(); + foreach (KeyValuePair entry in requestInfoHighLatencyList) + { + MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); + metricInfo.SetAggregators(entry.Value, ClientTelemetryOptions.TicksToMsFactor); + + // Don't record if p99 latency is less than threshold + if (!NetworkDataRecorder.IsHighLatency(metricInfo.Percentiles[ClientTelemetryOptions.Percentile99])) + { + continue; + } + + RequestInfo payloadForLatency = entry.Key; + payloadForLatency.Metrics.Add(metricInfo); + + allRequests.Add(payloadForLatency); + } + + requestInfoList.AddRange(DataSampler.OrderAndSample(allRequests, DataLatencyComparer.Instance)); + } + + internal RequestInfo CreateRequestInfo(StoreResponseStatistics storeResponseStatistic, string databaseId, string containerId) + { + return new RequestInfo() + { + DatabaseName = databaseId, + ContainerName = containerId, + Uri = storeResponseStatistic.StoreResult?.StorePhysicalAddress?.ToString(), + StatusCode = (int)storeResponseStatistic.StoreResult?.StatusCode, + SubStatusCode = (int)storeResponseStatistic.StoreResult?.SubStatusCode, + Resource = storeResponseStatistic.RequestResourceType.ToString(), + Operation = storeResponseStatistic.RequestOperationType.ToString(), + }; + + } + + public List GetRequests() + { + List requestInfoList = new List(); + this.GetErroredRequests(requestInfoList); + this.GetHighLatencyRequests(requestInfoList); + + return requestInfoList; + } + + internal static bool IsHighLatency(double latency) + { + return + latency >= ClientTelemetryOptions.NetworkLatencyThreshold.TotalMilliseconds; + } + + /// + /// This method will return true if the request is failed with User or Server Exception and not excluded from telemetry. + /// otherwise return false + /// + /// true/false + internal static bool IsUserOrServerError(int statusCode) + { + return statusCode >= 400 && statusCode <= 599; + } + + internal static bool IsStatusCodeNotExcluded(int statusCode, int subStatusCode) + { + return !(ClientTelemetryOptions.ExcludedStatusCodes.Contains(statusCode) && subStatusCode == 0); + } + } +} diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/Sampler/DataSampler.cs b/Microsoft.Azure.Cosmos/src/Telemetry/Sampler/DataSampler.cs new file mode 100644 index 0000000000..b01e723365 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Telemetry/Sampler/DataSampler.cs @@ -0,0 +1,84 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Telemetry +{ + using System; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.OrderBy; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using Newtonsoft.Json.Linq; + + /// + /// Sampler to select top N unique records and return true/false on the basis of elements already selected. + /// + internal sealed class DataSampler + { + public static List OrderAndSample(List requestInfoList, IComparer comparer) + { + // It will store final result + List sampledData = new List(capacity: requestInfoList.Count); + + // Processing (Grouping, Sorting will happen in this collection) + IDictionary> sampledRawData = new Dictionary>(); + + foreach (RequestInfo requestInfo in requestInfoList) + { + // Get a unique key identifier for an object + int key = requestInfo.GetHashCodeForSampler(); + + // Check if similar object is already present otherwise create a new list and add + if (sampledRawData.TryGetValue(key, out List groupedData)) + { + groupedData.Add(requestInfo); + sampledRawData[key] = groupedData; + } + else + { + sampledRawData.Add(key, new List() { requestInfo }); + } + } + + // If list is greater than threshold then sort it and get top N objects otherwise add list as it is + foreach (List sampledRequestInfo in sampledRawData.Values) + { + if (sampledRequestInfo.Count > ClientTelemetryOptions.NetworkRequestsSampleSizeThreshold) + { + sampledRequestInfo.Sort(comparer); + sampledData.AddRange(sampledRequestInfo.GetRange( + index: 0, + count: ClientTelemetryOptions.NetworkRequestsSampleSizeThreshold)); + } + else + { + sampledData.AddRange(sampledRequestInfo); + } + } + + return sampledData; + } + + } + + internal class DataLatencyComparer : IComparer + { + public static DataLatencyComparer Instance = new DataLatencyComparer(); + public int Compare(RequestInfo a, RequestInfo b) + { + return b.GetP99Latency().CompareTo(a.GetP99Latency()); + } + } + + internal class DataSampleCountComparer : IComparer + { + public static DataSampleCountComparer Instance = new DataSampleCountComparer(); + public int Compare(RequestInfo a, RequestInfo b) + { + return b.GetSampleCount().CompareTo(a.GetSampleCount()); + } + } + +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs deleted file mode 100644 index b7e5d1f08e..0000000000 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientTelemetryTests.cs +++ /dev/null @@ -1,134 +0,0 @@ -//------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -//------------------------------------------------------------ - -namespace Microsoft.Azure.Cosmos.Tests -{ - using System; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using HdrHistogram; - using Newtonsoft.Json; - using Microsoft.Azure.Cosmos.Telemetry; - using System.Collections.Generic; - using Microsoft.Azure.Cosmos.Telemetry.Models; - - /// - /// Tests for . - /// - [TestClass] - public class ClientTelemetryTests - { - [TestCleanup] - public void Cleanup() - { - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, null); - } - - [TestMethod] - public void CheckMetricsAggregationLogic() - { - MetricInfo metrics = new MetricInfo("metricsName", "unitName"); - - LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, - long.MaxValue, - 5); - - histogram.RecordValue(10); - histogram.RecordValue(20); - histogram.RecordValue(30); - histogram.RecordValue(40); - - metrics.SetAggregators(histogram); - - Assert.AreEqual(40, metrics.Max); - Assert.AreEqual(10, metrics.Min); - Assert.AreEqual(4, metrics.Count); - Assert.AreEqual(25, metrics.Mean); - - Assert.AreEqual(20, metrics.Percentiles[ClientTelemetryOptions.Percentile50]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile90]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile95]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile99]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile999]); - } - - [TestMethod] - public void CheckMetricsAggregationLogicWithAdjustment() - { - MetricInfo metrics = new MetricInfo("metricsName", "unitName"); - long adjustmentFactor = 1000; - - LongConcurrentHistogram histogram = new LongConcurrentHistogram(1, - long.MaxValue, - 5); - - histogram.RecordValue(10 * adjustmentFactor); - histogram.RecordValue(20 * adjustmentFactor); - histogram.RecordValue(30 * adjustmentFactor); - histogram.RecordValue(40 * adjustmentFactor); - - metrics.SetAggregators(histogram, adjustmentFactor); - - Assert.AreEqual(40, metrics.Max); - Assert.AreEqual(10, metrics.Min); - Assert.AreEqual(4, metrics.Count); - - Assert.AreEqual(25, metrics.Mean); - - Assert.AreEqual(20, metrics.Percentiles[ClientTelemetryOptions.Percentile50]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile90]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile95]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile99]); - Assert.AreEqual(40, metrics.Percentiles[ClientTelemetryOptions.Percentile999]); - } - - [TestMethod] - public void CheckJsonSerializerContract() - { - string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", - processId: "", - userAgent: null, - connectionMode: ConnectionMode.Direct, - preferredRegions: null, - aggregationIntervalInSec: 10), ClientTelemetryOptions.JsonSerializerSettings); - Assert.AreEqual("{\"clientId\":\"clientId\",\"processId\":\"\",\"connectionMode\":\"DIRECT\",\"aggregationIntervalInSec\":10,\"systemInfo\":[]}", json); - } - - [TestMethod] - public void CheckJsonSerializerContractWithPreferredRegions() - { - List preferredRegion = new List - { - "region1" - }; - string json = JsonConvert.SerializeObject(new ClientTelemetryProperties(clientId: "clientId", - processId: "", - userAgent: null, - connectionMode: ConnectionMode.Direct, - preferredRegions: preferredRegion, - aggregationIntervalInSec: 1), ClientTelemetryOptions.JsonSerializerSettings); - Assert.AreEqual("{\"clientId\":\"clientId\",\"processId\":\"\",\"connectionMode\":\"DIRECT\",\"preferredRegions\":[\"region1\"],\"aggregationIntervalInSec\":1,\"systemInfo\":[]}", json); - } - - [TestMethod] - [ExpectedException(typeof(FormatException))] - public void CheckMisconfiguredTelemetry_should_fail() - { - Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, "non-boolean"); - using CosmosClient client = MockCosmosUtil.CreateMockCosmosClient(); - } - - [TestMethod] - [DataRow(200, 0 ,1, false)] - [DataRow(404, 0, 1, false)] - [DataRow(404, 1002, 1, true)] - [DataRow(409, 0, 1, false)] - [DataRow(409, 1002, 1, true)] - [DataRow(503, 2001, 1, true)] - [DataRow(200, 0, 6, true)] - public void CheckEligibleStatistics(int statusCode, int subStatusCode, int latencyInMs, bool expectedFlag) - { - Assert.AreEqual(expectedFlag, ClientTelemetryOptions.IsEligible(statusCode, subStatusCode, TimeSpan.FromMilliseconds(latencyInMs))); - } - } -} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs index 48cb0d1e42..4a6b077baa 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs @@ -119,10 +119,10 @@ public void CheckJsonSerializerContractWithPreferredRegions() } [TestMethod] - [DataRow(100, 50, 200)] // When operation, cacherefresh and request info is there in payload + [DataRow(150, 50, 200)] // When operation, cacherefresh and request info is there in payload [DataRow(0, 50, 0)] // When only cacherefresh info is there in payload - [DataRow(100, 50, 0)] // When only operation and cacherefresh info is there in payload - [DataRow(100, 0, 0)] // When only operation info is there in payload + [DataRow(150, 50, 0)] // When only operation and cacherefresh info is there in payload + [DataRow(150, 0, 0)] // When only operation info is there in payload public async Task CheckIfPayloadIsDividedCorrectlyAsync(int expectedOperationInfoSize, int expectedCacheRefreshInfoSize, int expectedRequestInfoSize) { Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, "http://dummy.telemetry.endpoint/"); @@ -147,6 +147,7 @@ public async Task CheckIfPayloadIsDividedCorrectlyAsync(int expectedOperationInf string payloadJson = request.Content.ReadAsStringAsync().Result; Assert.IsTrue(payloadJson.Length <= ClientTelemetryOptions.PayloadSizeThreshold, "Payload Size is " + payloadJson.Length); + Console.WriteLine(payloadJson); ClientTelemetryProperties propertiesToSend = JsonConvert.DeserializeObject(payloadJson); Assert.AreEqual(7, propertiesToSend.SystemInfo.Count, "System Info is not correct"); @@ -162,9 +163,10 @@ public async Task CheckIfPayloadIsDividedCorrectlyAsync(int expectedOperationInf Mock.Of()); ConcurrentDictionary operationInfoSnapshot - = new ConcurrentDictionary(); + = new ConcurrentDictionary (); - for (int i = 0; i < (expectedOperationInfoSize/2); i++) + int numberOfMetricsInOperationSection = 2; + for (int i = 0; i < (expectedOperationInfoSize/ numberOfMetricsInOperationSection); i++) { OperationInfo opeInfo = new OperationInfo(Regions.WestUS, 0, @@ -179,12 +181,12 @@ public async Task CheckIfPayloadIsDividedCorrectlyAsync(int expectedOperationInf LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, ClientTelemetryOptions.RequestLatencyMax, ClientTelemetryOptions.RequestLatencyPrecision); - latency.RecordValue(10l); + latency.RecordValue(10); LongConcurrentHistogram requestcharge = new LongConcurrentHistogram(ClientTelemetryOptions.RequestChargeMin, ClientTelemetryOptions.RequestChargeMax, ClientTelemetryOptions.RequestChargePrecision); - requestcharge.RecordValue(11l); + requestcharge.RecordValue(11); operationInfoSnapshot.TryAdd(opeInfo, (latency, requestcharge)); } @@ -207,13 +209,12 @@ ConcurrentDictionary cacheRefreshInfo LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, ClientTelemetryOptions.RequestLatencyMax, ClientTelemetryOptions.RequestLatencyPrecision); - latency.RecordValue(10l); + latency.RecordValue(10); cacheRefreshInfoSnapshot.TryAdd(crInfo, latency); } - ConcurrentDictionary requestInfoInfoSnapshot - = new ConcurrentDictionary(); + List requestInfoList = new List(); for (int i = 0; i < expectedRequestInfoSize; i++) { RequestInfo reqInfo = new RequestInfo @@ -227,19 +228,24 @@ ConcurrentDictionary requestInfoInfoSnapsh SubStatusCode = 0 }; - LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, - ClientTelemetryOptions.RequestLatencyMax, - ClientTelemetryOptions.RequestLatencyPrecision); - latency.RecordValue(10l); + MetricInfo metricInfo = new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit); - requestInfoInfoSnapshot.TryAdd(reqInfo, latency); - } + LongConcurrentHistogram histogram = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision); + histogram.RecordValue(TimeSpan.FromMinutes(1).Ticks); + + metricInfo.SetAggregators(histogram, ClientTelemetryOptions.TicksToMsFactor); + reqInfo.Metrics.Add(metricInfo); + requestInfoList.Add(reqInfo); ; + } + await processor.ProcessAndSendAsync( clientTelemetryProperties, operationInfoSnapshot, cacheRefreshInfoSnapshot, - requestInfoInfoSnapshot, + requestInfoList, new CancellationToken()); Assert.AreEqual(expectedOperationInfoSize, actualOperationInfoSize, "Operation Info is not correct"); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DataSamplerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DataSamplerTests.cs new file mode 100644 index 0000000000..d6ad3dbb8c --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DataSamplerTests.cs @@ -0,0 +1,119 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tests.Telemetry +{ + using System; + using System.Collections.Generic; + using System.Diagnostics; + using System.Linq; + using Microsoft.Azure.Cosmos.Telemetry; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using Microsoft.Azure.Documents; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class DataSamplerTests + { + [TestMethod] + public void TestNetworkRequestSamplerForThreshold() + { + int numberOfElementsInEachGroup = ClientTelemetryOptions.NetworkRequestsSampleSizeThreshold; + int numberOfGroups = 5; + + List requestInfoList = new List(); + + for (int counter = 0; counter < 100; counter++) + { + RequestInfo requestInfo = new RequestInfo() + { + DatabaseName = "dbId " + (counter % numberOfGroups), // To repeat similar elements + ContainerName = "containerId", + Uri = "rntbd://host/partition/replica", + StatusCode = 429, + SubStatusCode = 1002, + Resource = ResourceType.Document.ToResourceTypeString(), + Operation = OperationType.Create.ToOperationTypeString(), + Metrics = new List() + { + new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit) + { + Percentiles = new Dictionary() + { + { ClientTelemetryOptions.Percentile50, 10 }, + { ClientTelemetryOptions.Percentile90, 20 }, + { ClientTelemetryOptions.Percentile95, 30 }, + { ClientTelemetryOptions.Percentile99, Random.Shared.Next(1, 100) }, + { ClientTelemetryOptions.Percentile999, 50 } + }, + Count = Random.Shared.Next(1, 100) + } + } + }; + requestInfoList.Add(requestInfo); + } + + List sampleDataByLatency = DataSampler.OrderAndSample(requestInfoList, DataLatencyComparer.Instance); + Assert.AreEqual(numberOfGroups * numberOfElementsInEachGroup, sampleDataByLatency.Count); + + List sampleDataBySampleCount = DataSampler.OrderAndSample(requestInfoList, DataSampleCountComparer.Instance); + Assert.AreEqual(numberOfGroups * numberOfElementsInEachGroup, sampleDataBySampleCount.Count); + } + + [TestMethod] + public void TestNetworkRequestSamplerWithoutData() + { + List requestInfoList = new List(); + + Assert.AreEqual(0, DataSampler.OrderAndSample(requestInfoList, DataSampleCountComparer.Instance).Count); + Assert.AreEqual(0, DataSampler.OrderAndSample(requestInfoList, DataLatencyComparer.Instance).Count); + } + + [TestMethod] + public void TestNetworkRequestSamplerForLessThanThresholdSize() + { + int numberOfElementsInEachGroup = ClientTelemetryOptions.NetworkRequestsSampleSizeThreshold; + int numberOfGroups = 3; + + List requestInfoList = new List(); + + for (int counter = 0; counter < 10; counter++) + { + RequestInfo requestInfo = new RequestInfo() + { + DatabaseName = "dbId " + (counter % numberOfGroups), // To repeat similar elements + ContainerName = "containerId", + Uri = "rntbd://host/partition/replica", + StatusCode = 429, + SubStatusCode = 1002, + Resource = ResourceType.Document.ToResourceTypeString(), + Operation = OperationType.Create.ToOperationTypeString(), + Metrics = new List() + { + new MetricInfo(ClientTelemetryOptions.RequestLatencyName, ClientTelemetryOptions.RequestLatencyUnit) + { + Percentiles = new Dictionary() + { + { ClientTelemetryOptions.Percentile50, 10 }, + { ClientTelemetryOptions.Percentile90, 20 }, + { ClientTelemetryOptions.Percentile95, 30 }, + { ClientTelemetryOptions.Percentile99, Random.Shared.Next(1, 100) }, + { ClientTelemetryOptions.Percentile999, 50 } + }, + Count = Random.Shared.Next(1, 100) + } + } + }; + requestInfoList.Add(requestInfo); + } + + List sampleDataByLatency = DataSampler.OrderAndSample(requestInfoList, DataLatencyComparer.Instance); + Assert.AreEqual(10, sampleDataByLatency.Count); + + List sampleDataBySampleCount = DataSampler.OrderAndSample(requestInfoList, DataSampleCountComparer.Instance); + Assert.AreEqual(10, sampleDataBySampleCount.Count); + } + + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs index 698b99524e..c04c0d6faf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs @@ -5,10 +5,7 @@ namespace Microsoft.Azure.Cosmos.Tests.Telemetry { using System; - using System.Collections.Generic; - using System.Linq; using System.Net; - using System.Text; using System.Threading.Tasks; using Cosmos.Telemetry; using Cosmos.Telemetry.Diagnostics; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/NetworkDataRecorderTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/NetworkDataRecorderTest.cs new file mode 100644 index 0000000000..c08282cd0f --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/NetworkDataRecorderTest.cs @@ -0,0 +1,92 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Tests.Telemetry +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Security.AccessControl; + using System.Text; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.Telemetry; + using Microsoft.Azure.Cosmos.Telemetry.Models; + using Microsoft.Azure.Documents; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; + + [TestClass] + public class NetworkDataRecorderTest + { + [TestMethod] + public void TestRecordWithErroredAndHighLatencyRequests() + { + NetworkDataRecorder recorder = new NetworkDataRecorder(); + + List stats = new List() + { + new StoreResponseStatistics( + requestStartTime: DateTime.Now, + requestResponseTime: DateTime.Now.AddMilliseconds(10), + storeResult: StoreResult.CreateForTesting(storeResponse: new StoreResponse() + { + Status = 200 + }).Target, + resourceType: Documents.ResourceType.Document, + operationType: OperationType.Create, + requestSessionToken: default, + locationEndpoint: new Uri("https://dummy.url")), + + new StoreResponseStatistics( + requestStartTime: DateTime.Now, + requestResponseTime: DateTime.Now.AddMilliseconds(10), + storeResult: StoreResult.CreateForTesting(storeResponse: new StoreResponse() + { + Status = 401 + }).Target, + resourceType: Documents.ResourceType.Document, + operationType: OperationType.Create, + requestSessionToken: default, + locationEndpoint: new Uri("https://dummy.url")) + }; + + recorder.Record(stats, "databaseId", "containerId"); + + List highLatencyRequests = new List(); + recorder.GetHighLatencyRequests(highLatencyRequests); + Assert.AreEqual(1, highLatencyRequests.Count); + + List erroredRequests = new List(); + recorder.GetErroredRequests(erroredRequests); + Assert.AreEqual(1, erroredRequests.Count); + + // you can get the values only once + List requests = new List(); + recorder.GetHighLatencyRequests(requests); + recorder.GetErroredRequests(requests); + + Assert.AreEqual(0, requests.Count); + } + + [TestMethod] + [DataRow(200, 0, 1, false)] + [DataRow(404, 0, 1, false)] + [DataRow(404, 1002, 1, true)] + [DataRow(409, 0, 1, false)] + [DataRow(409, 1002, 1, true)] + [DataRow(503, 2001, 1, true)] + [DataRow(200, 0, 6, true)] + public void CheckEligibleStatistics(int statusCode, int subStatusCode, int latencyInMs, bool expectedFlag) + { + Assert.AreEqual(expectedFlag, NetworkDataRecorderTest.IsEligible(statusCode, subStatusCode, TimeSpan.FromMilliseconds(latencyInMs))); + } + + private static bool IsEligible(int statusCode, int subStatusCode, TimeSpan latencyInMs) + { + return + NetworkDataRecorder.IsStatusCodeNotExcluded(statusCode, subStatusCode) && + (NetworkDataRecorder.IsUserOrServerError(statusCode) || NetworkDataRecorder.IsHighLatency(latencyInMs.TotalMilliseconds)); + } + } +} From 6553a70b3ff7bf9a46486297bd115947e318ae10 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 30 Mar 2023 00:30:11 +0530 Subject: [PATCH 080/164] [Internal] Emulator Test : Fixes test when running with distributed tracing enabled. (#3751) * enable DT for everything * try1 * code refactoring * fix pipeline * try 2 * Revert "try 2" This reverts commit 61643f9b4dcd2ab1898fd68b111897bed0bc6bcf. * Revert "fix pipeline" This reverts commit 4b217f5f6a087b1dd889b804fd8b477accd46419. * Revert "code refactoring" This reverts commit d1ff0ddc17ad655360988d171bd033617752f91f. * Revert "try1" This reverts commit bf9c41b43684f59719c3673d6f9c7450bbdc5142. * lazy factory and threadsafe * scope factory in function * try non static * add flag * fix test * add consoles * more console with fix * fix tests * temporarily enable dt * fuix tests * dispose listener * fix tests * remove delay * revert flag change * dynamically get number of test in trace class --- .../EndToEndTraceWriterBaselineTests.cs | 129 +++++++++++------- .../Utils/Util.cs | 7 +- 2 files changed, 82 insertions(+), 54 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index e81eda0d01..c32c756121 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -24,7 +24,8 @@ namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; using static Microsoft.Azure.Cosmos.SDK.EmulatorTests.TransportClientHelper; - + using AzureCore = global::Azure.Core.Pipeline; + [VisualStudio.TestTools.UnitTesting.TestClass] [TestCategory("UpdateContract")] public sealed class EndToEndTraceWriterBaselineTests : BaselineTests @@ -41,10 +42,14 @@ public sealed class EndToEndTraceWriterBaselineTests : BaselineTests m.GetCustomAttributes(typeof(TestMethodAttribute), false).Length > 0).Count(); + + private static int MethodCount = 0; + + [ClassInitialize] public static async Task ClassInitAsync(TestContext context) { - testListener = Util.ConfigureOpenTelemetryAndCustomListeners(); + EndToEndTraceWriterBaselineTests.testListener = Util.ConfigureOpenTelemetryAndCustomListeners(); client = Microsoft.Azure.Cosmos.SDK.EmulatorTests.TestCommon.CreateCosmosClient( useGateway: false, @@ -87,30 +92,41 @@ public static async Task ClassInitAsync(TestContext context) EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } - - [ClassCleanup()] + + [TestCleanup] + public async Task CleanUp() + { + await EndToEndTraceWriterBaselineTests.ClassCleanupAsync(); + } + public static async Task ClassCleanupAsync() { - if(database != null) - { - await EndToEndTraceWriterBaselineTests.database.DeleteStreamAsync(); - } + EndToEndTraceWriterBaselineTests.MethodCount++; - Util.DisposeOpenTelemetryAndCustomListeners(); + if (EndToEndTraceWriterBaselineTests.MethodCount == EndToEndTraceWriterBaselineTests.TotalTestMethod) + { + if (database != null) + { + await EndToEndTraceWriterBaselineTests.database.DeleteStreamAsync(); + } + + EndToEndTraceWriterBaselineTests.client?.Dispose(); + EndToEndTraceWriterBaselineTests.bulkClient?.Dispose(); + EndToEndTraceWriterBaselineTests.miscCosmosClient?.Dispose(); - EndToEndTraceWriterBaselineTests.client?.Dispose(); - EndToEndTraceWriterBaselineTests.bulkClient?.Dispose(); - EndToEndTraceWriterBaselineTests.miscCosmosClient?.Dispose(); + Util.DisposeOpenTelemetryAndCustomListeners(); - await Task.Delay(5000); + EndToEndTraceWriterBaselineTests.testListener.Dispose(); + + } } - + private static void AssertAndResetActivityInformation() { AssertActivity.AreEqualAcrossListeners(); CustomOtelExporter.CollectedActivities = new(); - testListener?.ResetAttributes(); + EndToEndTraceWriterBaselineTests.testListener?.ResetAttributes(); } [TestMethod] @@ -147,10 +163,9 @@ public async Task ReadFeedAsync() trace: traceForest, startLineNumber: startLineNumber, endLineNumber: endLineNumber, - oTelActivities: testListener?.GetRecordedAttributes())); + oTelActivities: EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); - } //---------------------------------------------------------------- @@ -178,7 +193,7 @@ public async Task ReadFeedAsync() trace: traceForest, startLineNumber: startLineNumber, endLineNumber: endLineNumber, - oTelActivities: testListener?.GetRecordedAttributes())); + oTelActivities: EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -209,7 +224,7 @@ public async Task ReadFeedAsync() trace: traceForest, startLineNumber: startLineNumber, endLineNumber: endLineNumber, - oTelActivities: testListener?.GetRecordedAttributes())); + oTelActivities: EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -235,7 +250,7 @@ public async Task ReadFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ReadFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("ReadFeed Public API Typed", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -277,7 +292,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -309,7 +324,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed Typed", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -342,7 +357,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed Public API", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed Public API", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -375,7 +390,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("ChangeFeed Public API Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("ChangeFeed Public API Typed", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -436,7 +451,7 @@ public async Task ChangeFeedAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Change Feed Estimator", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Change Feed Estimator", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -472,7 +487,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -497,7 +512,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query Typed", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -523,7 +538,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -549,7 +564,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API Typed", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API Typed", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -578,7 +593,7 @@ public async Task QueryAsync() Documents.ServiceInteropWrapper.AssembliesExist = currentLazy; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query - Without ServiceInterop", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query - Without ServiceInterop", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -606,7 +621,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API with FeedRanges", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -634,7 +649,7 @@ public async Task QueryAsync() ITrace traceForest = TraceJoiner.JoinTraces(traces); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Query Public API Typed with FeedRanges", traceForest, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Query Public API Typed with FeedRanges", traceForest, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -650,9 +665,17 @@ public async Task ValidateInvalidCredentialsTraceAsync() string endpoint = Utils.ConfigurationManager.AppSettings["GatewayEndpoint"]; AzureKeyCredential masterKeyCredential = new AzureKeyCredential(authKey); + + // It is not baseline test hence disable distributed tracing for this test + CosmosClientOptions clientOptions = new CosmosClientOptions() + { + IsDistributedTracingEnabled = false + }; + using (CosmosClient client = new CosmosClient( endpoint, - masterKeyCredential)) + masterKeyCredential, + clientOptions)) { try @@ -705,7 +728,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -723,7 +746,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -749,7 +772,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -791,7 +814,7 @@ public async Task TypedPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -826,7 +849,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Write", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -844,7 +867,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Read", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -870,7 +893,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Replace", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -915,7 +938,7 @@ public async Task StreamPointOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)itemResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Delete", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -964,7 +987,7 @@ public async Task PointOperationsExceptionsAsync() } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Operation with Request Timeout", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Operation with Request Timeout", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1016,7 +1039,7 @@ public async Task PointOperationsExceptionsAsync() } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Operation With Throttle", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Operation With Throttle", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1096,7 +1119,7 @@ void interceptor(Uri uri, Documents.ResourceOperation operation, Documents.Docum } endLineNumber = GetLineNumber(); - inputs.Add(new Input($"Point Operation With Forbidden + Max Count = {maxCount}", trace, startLineNumber, endLineNumber, testListener.GetRecordedAttributes())); + inputs.Add(new Input($"Point Operation With Forbidden + Max Count = {maxCount}", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1147,7 +1170,7 @@ void interceptor(Uri uri, Documents.ResourceOperation operation, Documents.Docum } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Point Operation with Service Unavailable", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Point Operation with Service Unavailable", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1198,7 +1221,7 @@ public async Task BatchOperationsAsync() ITrace trace = ((CosmosTraceDiagnostics)response.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Batch Operation", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Batch Operation", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1248,7 +1271,7 @@ public async Task BulkOperationsAsync() foreach (ITrace trace in traces) { - inputs.Add(new Input("Bulk Operation", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Bulk Operation", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); } EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); @@ -1302,7 +1325,7 @@ public async Task BulkOperationsAsync() endLineNumber = GetLineNumber(); - inputs.Add(new Input("Bulk Operation With Throttle", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Bulk Operation With Throttle", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1334,7 +1357,7 @@ public async Task MiscellanousAsync() await databaseResponse.Database.DeleteAsync(); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1353,7 +1376,7 @@ public async Task MiscellanousAsync() await databaseResponse.Database.DeleteAsync(); endLineNumber = GetLineNumber(); - inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Custom Handler", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1394,7 +1417,7 @@ public async Task ReadManyAsync() } endLineNumber = GetLineNumber(); - inputs.Add(new Input("Read Many Stream Api", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Read Many Stream Api", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } @@ -1409,7 +1432,7 @@ public async Task ReadManyAsync() ITrace trace = ((CosmosTraceDiagnostics)feedResponse.Diagnostics).Value; endLineNumber = GetLineNumber(); - inputs.Add(new Input("Read Many Typed Api", trace, startLineNumber, endLineNumber, testListener?.GetRecordedAttributes())); + inputs.Add(new Input("Read Many Typed Api", trace, startLineNumber, endLineNumber, EndToEndTraceWriterBaselineTests.testListener?.GetRecordedAttributes())); EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index 8c71a6b168..96254aca79 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -22,7 +22,8 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenTelemetry; using OpenTelemetry.Trace; - + using AzureCore = global::Azure.Core.Pipeline; + internal enum DocumentClientType { Gateway, @@ -542,6 +543,8 @@ internal static CustomListener ConfigureOpenTelemetryAndCustomListeners() { AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); + AzureCore.ActivityExtensions.ResetFeatureSwitch(); + // Open Telemetry Listener Util.OTelTracerProvider = Sdk.CreateTracerProviderBuilder() .AddCustomOtelExporter() // use any exporter here @@ -567,6 +570,8 @@ internal static void DisposeOpenTelemetryAndCustomListeners() Util.TestListener = null; AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", false); + + AzureCore.ActivityExtensions.ResetFeatureSwitch(); } /// From 67dc262090fc66b5b8d80c6012baa926f3fa19ca Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Thu, 30 Mar 2023 11:19:27 -0700 Subject: [PATCH 081/164] Release: Adds SDK version and changelog for 3.32.3 (#3788) * Adding contract and version bump * Adding changelog --- Directory.Build.props | 4 +- .../contracts/API_3.32.3-preview.txt | 1531 +++++++++++++++++ .../contracts/API_3.32.3.txt | 1478 ++++++++++++++++ changelog.md | 7 + 4 files changed, 3018 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.3-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.32.3.txt diff --git a/Directory.Build.props b/Directory.Build.props index 39004a08ab..e51eae5f3f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.32.2 - 3.32.2 + 3.32.3 + 3.32.3 preview 3.30.4 2.0.1 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.3-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.3-preview.txt new file mode 100644 index 0000000000..69b7a4b83e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.3-preview.txt @@ -0,0 +1,1531 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.32.3.txt b/Microsoft.Azure.Cosmos/contracts/API_3.32.3.txt new file mode 100644 index 0000000000..5218206b0e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.32.3.txt @@ -0,0 +1,1478 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index a8a156b922..a41dc7f438 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,13 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.32.3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.3) - 2023-03-30 +### [3.32.3-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.3-preview) - 2023-03-30 + +#### Fixed + +- [#3787](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3787) Connectivity: Fixes ConnectionBroken and adds support for Burst Capacity + ### [3.32.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.2) - 2023-03-10 ### [3.32.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.2-preview) - 2023-03-10 From a6972422d51ea5d430238bac9f285ff1c7f2dc8a Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Mon, 3 Apr 2023 11:42:22 -0700 Subject: [PATCH 082/164] SummaryDiagnostics: Refactors Code to Remove Dependency of HttpResponseHeadersWrapper to fetch Sub Status Codes (#3792) * Code changes to fetch sub status code from http response/ content headers. * Code changes to address review comments. * Code changes to return the first element from the sub status list. * Code changes to update first or default. --- .../Tracing/TraceData/SummaryDiagnostics.cs | 25 +++++++++++--- .../SummaryDiagnosticsTests.cs | 33 +++++++++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs index 1838cb72c5..3a50b96841 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/SummaryDiagnostics.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Cosmos.Tracing.TraceData using System; using System.Collections.Generic; using System.Globalization; + using System.Linq; using Microsoft.Azure.Cosmos.Json; using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; @@ -73,10 +74,7 @@ private void AggregateGatewayStatistics(IReadOnlyList + /// Gets the sub status code as a comma separated value from the http response message headers. + /// If the sub status code header is not found, then returns null. + /// + /// An instance of . + /// A string containing the sub status code. + private static string GetSubStatusCodes( + HttpResponseStatistics httpResponseStatistics) + { + return httpResponseStatistics + .HttpResponseMessage + .Headers + .TryGetValues( + name: Documents.WFConstants.BackendHeaders.SubStatus, + values: out IEnumerable httpResponseHeaderValues) ? + httpResponseHeaderValues.FirstOrDefault() : + null; + } } } \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs index ae94a7220d..1948411400 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/SummaryDiagnosticsTests.cs @@ -128,5 +128,38 @@ public async Task DirectPointOperationsWithTransportErrors() Assert.AreEqual(summaryDiagnostics.DirectRequestsSummary.Value[(410, (int)SubStatusCodes.TransportGenerated410)], 3); Assert.AreEqual(summaryDiagnostics.DirectRequestsSummary.Value[(201, 0)], 1); } + + /// + /// Test to validate that when a read operation is done on a database and a container that + /// does not exists, then the should capture the sub status + /// codes successfully. + /// + [TestMethod] + [Owner("dkunda")] + public async Task SummaryDiagnostics_WhenContainerDoesNotExists_ShouldRecordSubStatusCode() + { + string partitionKey = "/pk"; + int notFoundStatusCode = 404, notFoundSubStatusCode = 1003; + using CosmosClient cosmosClient = TestCommon.CreateCosmosClient(useGateway: false); + + try + { + Container container = cosmosClient.GetContainer( + databaseId: Guid.NewGuid().ToString(), + containerId: Guid.NewGuid().ToString()); + + ItemResponse readResponse = await container.ReadItemAsync( + partitionKey, + new Cosmos.PartitionKey(partitionKey)); + } + catch (CosmosException ex) + { + ITrace trace = ((CosmosTraceDiagnostics)ex.Diagnostics).Value; + SummaryDiagnostics summaryDiagnostics = new(trace); + + Assert.IsNotNull(value: summaryDiagnostics); + Assert.IsTrue(condition: summaryDiagnostics.GatewayRequestsSummary.Value.ContainsKey((notFoundStatusCode, notFoundSubStatusCode))); + } + } } } \ No newline at end of file From e41eea5ad6db54e51e953552bfccf751c0de291f Mon Sep 17 00:00:00 2001 From: Justine Cocchi Date: Tue, 4 Apr 2023 07:50:11 -0700 Subject: [PATCH 083/164] [Internal] Documentation: Fixes API name to NoSQL (#3795) --- .../src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj | 2 +- .../src/Microsoft.Azure.Cosmos.Encryption.csproj | 2 +- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 2 +- README.md | 4 ++-- changelog.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index d368f399bd..54755c89ef 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -10,7 +10,7 @@ $(CustomEncryptionVersion) Microsoft Corporation Microsoft - This is an internal library that provides an implementation for client-side encryption for Azure Cosmos DB's SQL API for multi-tenant use case. For more information, refer to https://aka.ms/CosmosCustomClientEncryption + This is an internal library that provides an implementation for client-side encryption for Azure Cosmos DB for NoSQL for multi-tenant use case. For more information, refer to https://aka.ms/CosmosCustomClientEncryption © Microsoft Corporation. All rights reserved. Microsoft Azure Cosmos DB client-side encryption library for multi-tenant Microsoft.Azure.Cosmos.Encryption.Custom diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index 9fe41b765f..f58b171cd5 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -12,7 +12,7 @@ $([System.DateTime]::Now.ToString(yyyyMMdd)) Microsoft Corporation Microsoft - This library provides an implementation for client-side encryption for Azure Cosmos's SQL API. For more information, refer to https://aka.ms/CosmosClientEncryption + This library provides an implementation for client-side encryption for Azure Cosmos DB for NoSQL. For more information, refer to https://aka.ms/CosmosClientEncryption © Microsoft Corporation. All rights reserved. Microsoft Azure Cosmos DB client-side encryption library Microsoft.Azure.Cosmos.Encryption diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 0b21867bf7..a33142b79b 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -3,7 +3,7 @@ Microsoft Corporation Microsoft(R) Azure Cosmos - This client library enables client applications to connect to Azure Cosmos via the SQL API. Azure Cosmos is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/. + This client library enables client applications to connect to Azure Cosmos DB for NoSQL. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/. © Microsoft Corporation. All rights reserved. en-US $([System.DateTime]::Now.ToString(yyyyMMdd)) diff --git a/README.md b/README.md index 1d39e6e204..f1dcffa7b9 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ # Microsoft Azure Cosmos DB .NET SDK Version 3 -This client library enables client applications to connect to Azure Cosmos via the SQL API. Azure Cosmos is a globally distributed, multi-model database service. For more information, refer to https://azure.microsoft.com/services/cosmos-db/. +This client library enables client applications to connect to Azure Cosmos DB for NoSQL. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to https://azure.microsoft.com/services/cosmos-db/. ```csharp CosmosClient client = new CosmosClient("https://mycosmosaccount.documents.azure.com:443/", "mysupersecretkey"); @@ -45,7 +45,7 @@ using (FeedIterator feedIterator = container.GetItemQueryIterator Date: Tue, 4 Apr 2023 13:37:19 -0700 Subject: [PATCH 084/164] [Internal] CTL: Fixes docker image pipeline (#3794) --- azure-pipelines-ctl-publishing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-ctl-publishing.yml b/azure-pipelines-ctl-publishing.yml index b3b9e10fb9..862d125aa1 100644 --- a/azure-pipelines-ctl-publishing.yml +++ b/azure-pipelines-ctl-publishing.yml @@ -1,5 +1,5 @@ variables: - VmImage: 'ubuntu-18.04' + VmImage: 'ubuntu-latest' jobs: - job: BuildDockerImage From ae6bcf313b83ff58c3bb703c1dee6a4b9b1e8820 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 5 Apr 2023 03:51:25 +0530 Subject: [PATCH 085/164] [Internal] AI Integration : Refactors useragent attribute name as per Otel conventions (#3784) Co-authored-by: Fabian Meiswinkel --- .../OpenTelemetryAttributeKeys.cs | 2 +- ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 202 +++++++++--------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 44 ++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 12 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 ++--- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 14 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- .../Tracing/AssertActivity.cs | 2 +- 12 files changed, 195 insertions(+), 195 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs index e7c4d96cc2..755e1e3a66 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs @@ -20,7 +20,7 @@ internal sealed class OpenTelemetryAttributeKeys // Cosmos Db Specific public const string ClientId = "db.cosmosdb.client_id"; public const string MachineId = "db.cosmosdb.machine_id"; - public const string UserAgent = "db.cosmosdb.user_agent"; + public const string UserAgent = "user_agent.original"; // Compliant with open telemetry conventions public const string ConnectionMode = "db.cosmosdb.connection_mode"; public const string OperationType = "db.cosmosdb.operation_type"; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index d468fe87f5..ad1a3f1288 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -129,7 +129,7 @@ } ] }]]> - Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeBatchdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeBatchdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index 041523ff8a..09d8c3ce63 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -153,16 +153,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -311,16 +311,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -469,16 +469,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -627,16 +627,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -785,16 +785,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -943,16 +943,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1101,16 +1101,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1259,16 +1259,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1417,16 +1417,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1575,16 +1575,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2324,7 +2324,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index dccb7fe5d0..2e20bceb1c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -952,11 +952,11 @@ } ] }]]> - Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1569,11 +1569,11 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2167,11 +2167,11 @@ } ] }]]> - Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2785,11 +2785,11 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3066,8 +3066,8 @@ } ] }]]> - Operation.Change Feed Estimator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Change Feed Estimator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 832dfee446..348925a1f6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -107,8 +107,8 @@ } ] }]]> - Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -207,8 +207,8 @@ } ] }]]> - Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 200ad02660..a8b686d679 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -148,7 +148,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -390,7 +390,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -615,7 +615,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -872,7 +872,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1193,7 +1193,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1347,7 +1347,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 876d37dc63..18aa6d67d8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -574,10 +574,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1180,10 +1180,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1767,10 +1767,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2374,10 +2374,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3048,10 +3048,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3644,10 +3644,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4260,10 +4260,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 44a8a04a51..1ceef081c6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -536,10 +536,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1104,10 +1104,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1653,10 +1653,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2222,10 +2222,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 9a96ef9751..7229f78197 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -542,12 +542,12 @@ } ] }]]> - Operation.ReadManyItemsStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadManyItemsStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1112,7 +1112,7 @@ } ] }]]> - Operation.ReadManyItemsAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadManyItemsAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 25a01f6b94..f0dec5b7bd 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -89,7 +89,7 @@ } ] }]]> - Operation.CreateItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.CreateItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -178,7 +178,7 @@ } ] }]]> - Operation.ReadItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -275,7 +275,7 @@ } ] }]]> - Operation.ReplaceItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReplaceItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -367,7 +367,7 @@ } ] }]]> - Operation.DeleteItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.DeleteItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index 4dfceee978..6b57caad95 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -109,7 +109,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -203,7 +203,7 @@ } ] }]]> - Operation.ReadItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -310,7 +310,7 @@ } ] }]]> - Operation.ReplaceItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReplaceItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -406,7 +406,7 @@ } ] }]]> - Operation.DeleteItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iddb.cosmosdb.user_agentdb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.DeleteItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index d19b330d98..c46d8b035a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -39,7 +39,7 @@ public static void IsValid(Activity activity) "net.peer.name", "db.cosmosdb.client_id", "db.cosmosdb.machine_id", - "db.cosmosdb.user_agent", + "user_agent.original", "db.cosmosdb.connection_mode", "db.cosmosdb.operation_type", "db.cosmosdb.container", From 2b693948a02a2206984a6c423c3d9a3e560026d8 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Thu, 6 Apr 2023 15:05:15 -0700 Subject: [PATCH 086/164] HttpClient: Adds Properties to the Http messages if available (#3803) * Passing properties * test --- .../src/GatewayStoreClient.cs | 8 +++ .../GatewayStoreModelTest.cs | 61 +++++++++++++++++++ 2 files changed, 69 insertions(+) diff --git a/Microsoft.Azure.Cosmos/src/GatewayStoreClient.cs b/Microsoft.Azure.Cosmos/src/GatewayStoreClient.cs index c779dc7855..e151ffcd94 100644 --- a/Microsoft.Azure.Cosmos/src/GatewayStoreClient.cs +++ b/Microsoft.Azure.Cosmos/src/GatewayStoreClient.cs @@ -320,6 +320,14 @@ private async ValueTask PrepareRequestMessageAsync( } } + if (request.Properties != null) + { + foreach (KeyValuePair property in request.Properties) + { + requestMessage.Properties.Add(property); + } + } + // add activityId Guid activityId = System.Diagnostics.Trace.CorrelationManager.ActivityId; Debug.Assert(activityId != Guid.Empty); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs index 43078d1866..36b350a751 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs @@ -161,6 +161,67 @@ public async Task TestRetries() } + /// + /// Verifies that if the DCE has Properties set, the HttpRequestMessage has them too. Used on ThinClient. + /// + [TestMethod] + public async Task PassesPropertiesFromDocumentServiceRequest() + { + IDictionary properties = new Dictionary() + { + {"property1", Guid.NewGuid() }, + {"property2", Guid.NewGuid().ToString() } + }; + + Func> sendFunc = request => + { + Assert.AreEqual(properties.Count, request.Properties.Count); + foreach (KeyValuePair item in properties) + { + Assert.AreEqual(item.Value, request.Properties[item.Key]); + } + + return Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK) ); + }; + + Mock mockDocumentClient = new Mock(); + mockDocumentClient.Setup(client => client.ServiceEndpoint).Returns(new Uri("https://foo")); + + using GlobalEndpointManager endpointManager = new GlobalEndpointManager(mockDocumentClient.Object, new ConnectionPolicy()); + ISessionContainer sessionContainer = new SessionContainer(string.Empty); + DocumentClientEventSource eventSource = DocumentClientEventSource.Instance; + HttpMessageHandler messageHandler = new MockMessageHandler(sendFunc); + using GatewayStoreModel storeModel = new GatewayStoreModel( + endpointManager, + sessionContainer, + ConsistencyLevel.Eventual, + eventSource, + null, + MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler))); + + using (new ActivityScope(Guid.NewGuid())) + { + using (DocumentServiceRequest request = + DocumentServiceRequest.Create( + Documents.OperationType.Query, + Documents.ResourceType.Document, + new Uri("https://foo.com/dbs/db1/colls/coll1", UriKind.Absolute), + new MemoryStream(Encoding.UTF8.GetBytes("content1")), + AuthorizationTokenType.PrimaryMasterKey, + null)) + { + // Add properties to the DCE + request.Properties = new Dictionary(); + foreach (KeyValuePair property in properties) + { + request.Properties.Add(property.Key, property.Value); + } + + await storeModel.ProcessMessageAsync(request); + } + } + } + [TestMethod] public async Task TestApplySessionForMasterOperation() { From 4222cefad2df3c06d13fb629ae0c1f4b3937d08c Mon Sep 17 00:00:00 2001 From: Scott Addie <10702007+scottaddie@users.noreply.github.com> Date: Thu, 6 Apr 2023 17:31:29 -0500 Subject: [PATCH 087/164] Documentation: Refactors SQL API reference to NoSQL API (#3793) Co-authored-by: Kiran Kumar Kolli --- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index a33142b79b..7ba4e9213d 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -3,7 +3,7 @@ Microsoft Corporation Microsoft(R) Azure Cosmos - This client library enables client applications to connect to Azure Cosmos DB for NoSQL. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/. + This client library enables client applications to connect to Azure Cosmos DB via the NoSQL API. Azure Cosmos DB is a globally distributed, multi-model database service. For more information, refer to http://azure.microsoft.com/services/cosmos-db/. © Microsoft Corporation. All rights reserved. en-US $([System.DateTime]::Now.ToString(yyyyMMdd)) From fce970237f1f1b5c5b7d88488761b61dd3e766d4 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Fri, 7 Apr 2023 05:45:12 +0530 Subject: [PATCH 088/164] [Internal] Perf test: Refactors code to re-enable performance tests (#3785) * enable perf tests * updated json * upgrade benchmark * update results * updated benchmark results --- .../Contracts/BenchmarkResults.json | 144 +++++++++--------- .../Contracts/PerformanceValidation.cs | 2 +- ...soft.Azure.Cosmos.Performance.Tests.csproj | 2 +- 3 files changed, 74 insertions(+), 74 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json index b54d4f0624..c97e0b5b2c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json @@ -1,79 +1,79 @@ { - "MasterKeyAuthorizationBenchmark.CreateSignatureGeneration;": 534.0, - "MasterKeyAuthorizationBenchmark.ReadSignatureGeneration;": 532.0, - "MockedItemBenchmark.CreateItem;[Type=OfT]": 45302.0, - "MockedItemBenchmark.CreateItem;[Type=OfTCustom]": 45320.0, - "MockedItemBenchmark.CreateItem;[Type=OfTWithClientTelemetryEnabled]": 48140.0, - "MockedItemBenchmark.CreateItem;[Type=OfTWithDiagnosticsToString]": 83798.0, - "MockedItemBenchmark.CreateItem;[Type=Stream]": 29766.0, - "MockedItemBenchmark.DeleteItemExists;[Type=OfT]": 37154.0, - "MockedItemBenchmark.DeleteItemExists;[Type=OfTCustom]": 37154.0, - "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithClientTelemetryEnabled]": 39840.0, - "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithDiagnosticsToString]": 74758.0, - "MockedItemBenchmark.DeleteItemExists;[Type=Stream]": 29872.0, - "MockedItemBenchmark.DeleteItemNotExists;[Type=OfT]": 42786.0, - "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTCustom]": 43144.0, - "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 44694.0, - "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithDiagnosticsToString]": 80098.0, - "MockedItemBenchmark.DeleteItemNotExists;[Type=Stream]": 37610.0, + "MasterKeyAuthorizationBenchmark.CreateSignatureGeneration;": 534, + "MasterKeyAuthorizationBenchmark.ReadSignatureGeneration;": 544, + "MockedItemBenchmark.CreateItem;[Type=OfT]": 36356, + "MockedItemBenchmark.CreateItem;[Type=OfTCustom]": 36362, + "MockedItemBenchmark.CreateItem;[Type=OfTWithClientTelemetryEnabled]": 36359.5, + "MockedItemBenchmark.CreateItem;[Type=OfTWithDiagnosticsToString]": 57472.25, + "MockedItemBenchmark.CreateItem;[Type=Stream]": 24673.25, + "MockedItemBenchmark.DeleteItemExists;[Type=OfT]": 32308.5, + "MockedItemBenchmark.DeleteItemExists;[Type=OfTCustom]": 32328, + "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithClientTelemetryEnabled]": 32321.25, + "MockedItemBenchmark.DeleteItemExists;[Type=OfTWithDiagnosticsToString]": 53231.25, + "MockedItemBenchmark.DeleteItemExists;[Type=Stream]": 24696, + "MockedItemBenchmark.DeleteItemNotExists;[Type=OfT]": 42172.5, + "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTCustom]": 42174.75, + "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 42166.5, + "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithDiagnosticsToString]": 56695.5, + "MockedItemBenchmark.DeleteItemNotExists;[Type=Stream]": 37610, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfT]": 13342232, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTCustom]": 13341058, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTWithClientTelemetryEnabled]": 13355160, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTWithDiagnosticsToString]": 13612338, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=Stream]": 5920952, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfT]": 2241814.0, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTCustom]": 2241810.0, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithClientTelemetryEnabled]": 2244658.0, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithDiagnosticsToString]": 2310842.0, - "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=Stream]": 1005038.0, - "MockedItemBenchmark.ReadFeed;[Type=OfT]": 560692.0, - "MockedItemBenchmark.ReadFeed;[Type=OfTCustom]": 571334.0, - "MockedItemBenchmark.ReadFeed;[Type=OfTWithClientTelemetryEnabled]": 565196.0, - "MockedItemBenchmark.ReadFeed;[Type=OfTWithDiagnosticsToString]": 609704.0, - "MockedItemBenchmark.ReadFeed;[Type=Stream]": 39140.0, - "MockedItemBenchmark.ReadItemExists;[Type=OfT]": 38622.0, - "MockedItemBenchmark.ReadItemExists;[Type=OfTCustom]": 37992.0, - "MockedItemBenchmark.ReadItemExists;[Type=OfTWithClientTelemetryEnabled]": 39918.0, - "MockedItemBenchmark.ReadItemExists;[Type=OfTWithDiagnosticsToString]": 74370.0, - "MockedItemBenchmark.ReadItemExists;[Type=Stream]": 31018.0, - "MockedItemBenchmark.ReadItemNotExists;[Type=OfT]": 43438.0, - "MockedItemBenchmark.ReadItemNotExists;[Type=OfTCustom]": 43860.0, - "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 45502.0, - "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithDiagnosticsToString]": 83760.0, - "MockedItemBenchmark.ReadItemNotExists;[Type=Stream]": 38266.0, - "MockedItemBenchmark.UpdateItem;[Type=OfT]": 46690.0, - "MockedItemBenchmark.UpdateItem;[Type=OfTCustom]": 45532.0, - "MockedItemBenchmark.UpdateItem;[Type=OfTWithClientTelemetryEnabled]": 48372.0, - "MockedItemBenchmark.UpdateItem;[Type=OfTWithDiagnosticsToString]": 84694.0, - "MockedItemBenchmark.UpdateItem;[Type=Stream]": 30026.0, - "MockedItemBenchmark.UpsertItem;[Type=OfT]": 45448.0, - "MockedItemBenchmark.UpsertItem;[Type=OfTCustom]": 45458.0, - "MockedItemBenchmark.UpsertItem;[Type=OfTWithClientTelemetryEnabled]": 48298.0, - "MockedItemBenchmark.UpsertItem;[Type=OfTWithDiagnosticsToString]": 83938.0, - "MockedItemBenchmark.UpsertItem;[Type=Stream]": 29934.0, - "MockedItemBulkBenchmark.CreateItem;[Type=OfT]": 1196168.0, - "MockedItemBulkBenchmark.CreateItem;[Type=OfTCustom]": 1195808.0, - "MockedItemBulkBenchmark.CreateItem;[Type=OfTWithClientTelemetryEnabled]": 1235418.0, - "MockedItemBulkBenchmark.CreateItem;[Type=OfTWithDiagnosticsToString]": 1231120.0, - "MockedItemBulkBenchmark.CreateItem;[Type=Stream]": 772810.0, - "MockedItemBulkBenchmark.DeleteItem;[Type=OfT]": 1187168.0, - "MockedItemBulkBenchmark.DeleteItem;[Type=OfTCustom]": 1187224.0, - "MockedItemBulkBenchmark.DeleteItem;[Type=OfTWithClientTelemetryEnabled]": 1226488.0, - "MockedItemBulkBenchmark.DeleteItem;[Type=OfTWithDiagnosticsToString]": 1222124.0, - "MockedItemBulkBenchmark.DeleteItem;[Type=Stream]": 771414.0, - "MockedItemBulkBenchmark.ReadItem;[Type=OfT]": 1186594.0, - "MockedItemBulkBenchmark.ReadItem;[Type=OfTCustom]": 1187192.0, - "MockedItemBulkBenchmark.ReadItem;[Type=OfTWithClientTelemetryEnabled]": 1226502.0, - "MockedItemBulkBenchmark.ReadItem;[Type=OfTWithDiagnosticsToString]": 1222342.0, - "MockedItemBulkBenchmark.ReadItem;[Type=Stream]": 770894.0, - "MockedItemBulkBenchmark.UpdateItem;[Type=OfT]": 1196464.0, - "MockedItemBulkBenchmark.UpdateItem;[Type=OfTCustom]": 1195778.0, - "MockedItemBulkBenchmark.UpdateItem;[Type=OfTWithClientTelemetryEnabled]": 1235738.0, - "MockedItemBulkBenchmark.UpdateItem;[Type=OfTWithDiagnosticsToString]": 1231486.0, - "MockedItemBulkBenchmark.UpdateItem;[Type=Stream]": 773284.0, - "MockedItemBulkBenchmark.UpsertItem;[Type=OfT]": 1196210.0, - "MockedItemBulkBenchmark.UpsertItem;[Type=OfTCustom]": 1195590.0, - "MockedItemBulkBenchmark.UpsertItem;[Type=OfTWithClientTelemetryEnabled]": 1235596.0, - "MockedItemBulkBenchmark.UpsertItem;[Type=OfTWithDiagnosticsToString]": 1231380.0, - "MockedItemBulkBenchmark.UpsertItem;[Type=Stream]": 773312.0 + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfT]": 2241814, + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTCustom]": 2241810, + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithClientTelemetryEnabled]": 2244658, + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=OfTWithDiagnosticsToString]": 2310842, + "MockedItemBenchmark.QuerySinglePartitionOnePage;[Type=Stream]": 1005038, + "MockedItemBenchmark.ReadFeed;[Type=OfT]": 560692, + "MockedItemBenchmark.ReadFeed;[Type=OfTCustom]": 555716, + "MockedItemBenchmark.ReadFeed;[Type=OfTWithClientTelemetryEnabled]": 550898.25, + "MockedItemBenchmark.ReadFeed;[Type=OfTWithDiagnosticsToString]": 573734.5, + "MockedItemBenchmark.ReadFeed;[Type=Stream]": 33434, + "MockedItemBenchmark.ReadItemExists;[Type=OfT]": 33630.5, + "MockedItemBenchmark.ReadItemExists;[Type=OfTCustom]": 33636.25, + "MockedItemBenchmark.ReadItemExists;[Type=OfTWithClientTelemetryEnabled]": 33627.75, + "MockedItemBenchmark.ReadItemExists;[Type=OfTWithDiagnosticsToString]": 47961.25, + "MockedItemBenchmark.ReadItemExists;[Type=Stream]": 26018.25, + "MockedItemBenchmark.ReadItemNotExists;[Type=OfT]": 43489.25, + "MockedItemBenchmark.ReadItemNotExists;[Type=OfTCustom]": 43490, + "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 43489.25, + "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithDiagnosticsToString]": 57420.25, + "MockedItemBenchmark.ReadItemNotExists;[Type=Stream]": 39044, + "MockedItemBenchmark.UpdateItem;[Type=OfT]": 36591, + "MockedItemBenchmark.UpdateItem;[Type=OfTCustom]": 36594.25, + "MockedItemBenchmark.UpdateItem;[Type=OfTWithClientTelemetryEnabled]": 36587.25, + "MockedItemBenchmark.UpdateItem;[Type=OfTWithDiagnosticsToString]": 57649, + "MockedItemBenchmark.UpdateItem;[Type=Stream]": 24894.75, + "MockedItemBenchmark.UpsertItem;[Type=OfT]": 36577.25, + "MockedItemBenchmark.UpsertItem;[Type=OfTCustom]": 36583.75, + "MockedItemBenchmark.UpsertItem;[Type=OfTWithClientTelemetryEnabled]": 36578.5, + "MockedItemBenchmark.UpsertItem;[Type=OfTWithDiagnosticsToString]": 57732.5, + "MockedItemBenchmark.UpsertItem;[Type=Stream]": 24878.5, + "MockedItemBulkBenchmark.CreateItem;[Type=OfT]": 1196168, + "MockedItemBulkBenchmark.CreateItem;[Type=OfTCustom]": 1195808, + "MockedItemBulkBenchmark.CreateItem;[Type=OfTWithClientTelemetryEnabled]": 1235418, + "MockedItemBulkBenchmark.CreateItem;[Type=OfTWithDiagnosticsToString]": 1231120, + "MockedItemBulkBenchmark.CreateItem;[Type=Stream]": 772810, + "MockedItemBulkBenchmark.DeleteItem;[Type=OfT]": 1187168, + "MockedItemBulkBenchmark.DeleteItem;[Type=OfTCustom]": 1187224, + "MockedItemBulkBenchmark.DeleteItem;[Type=OfTWithClientTelemetryEnabled]": 1226488, + "MockedItemBulkBenchmark.DeleteItem;[Type=OfTWithDiagnosticsToString]": 1222124, + "MockedItemBulkBenchmark.DeleteItem;[Type=Stream]": 771414, + "MockedItemBulkBenchmark.ReadItem;[Type=OfT]": 1186594, + "MockedItemBulkBenchmark.ReadItem;[Type=OfTCustom]": 1187192, + "MockedItemBulkBenchmark.ReadItem;[Type=OfTWithClientTelemetryEnabled]": 1226502, + "MockedItemBulkBenchmark.ReadItem;[Type=OfTWithDiagnosticsToString]": 1222342, + "MockedItemBulkBenchmark.ReadItem;[Type=Stream]": 770894, + "MockedItemBulkBenchmark.UpdateItem;[Type=OfT]": 1196464, + "MockedItemBulkBenchmark.UpdateItem;[Type=OfTCustom]": 1195778, + "MockedItemBulkBenchmark.UpdateItem;[Type=OfTWithClientTelemetryEnabled]": 1235738, + "MockedItemBulkBenchmark.UpdateItem;[Type=OfTWithDiagnosticsToString]": 1231486, + "MockedItemBulkBenchmark.UpdateItem;[Type=Stream]": 773284, + "MockedItemBulkBenchmark.UpsertItem;[Type=OfT]": 1196210, + "MockedItemBulkBenchmark.UpsertItem;[Type=OfTCustom]": 1195590, + "MockedItemBulkBenchmark.UpsertItem;[Type=OfTWithClientTelemetryEnabled]": 1235596, + "MockedItemBulkBenchmark.UpsertItem;[Type=OfTWithDiagnosticsToString]": 1231380, + "MockedItemBulkBenchmark.UpsertItem;[Type=Stream]": 773312 } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/PerformanceValidation.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/PerformanceValidation.cs index af3d77e5a4..ad7e43ab4a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/PerformanceValidation.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/PerformanceValidation.cs @@ -125,7 +125,7 @@ public static int ValidateSummaryResultsAgainstBaseline(SortedDictionary - + From 2f2e8fbd32fb672253413c1f237a03801810619a Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Fri, 7 Apr 2023 14:18:20 -0700 Subject: [PATCH 089/164] HttpClient: Adds detection of DNS changes through use of SocketsHttpHandler for .NET 6 and above (#3762) * initial commit * removed unneeded usings * added validation callback, still needs tests * nits + fixes * added additional test * test change * removed unneeded Dispose calls * removed unnneed dispose calls * requested changes * added pooledConnectionLifetime as client option * nit Co-authored-by: Kevin Pilch * Update Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs Co-authored-by: Matias Quaranta * Update Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs Co-authored-by: Matias Quaranta * suggested changes * remove test, reorder usings * updated contracts * removed all non XXXAPI.json changes from UpdateContracts run * removed public surface, added random timespan * removed change from unrelated file * Update Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs Co-authored-by: Matias Quaranta * added thread safe random method * nit * fixed merge mistake * added reflection failsafe/error tracing * nits * added back removed if * fixed formatting * changed random method, fixed serverCertificateCustomValidation --------- Co-authored-by: Kevin Pilch Co-authored-by: Matias Quaranta --- .../src/HttpClient/CosmosHttpClientCore.cs | 97 +++++++++++++++++-- .../ClientTests.cs | 19 +++- .../CosmosClientOptionsUnitTests.cs | 2 +- .../CosmosHttpClientCoreTests.cs | 65 +++++++++++-- 4 files changed, 164 insertions(+), 19 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs index a48666f16d..0fde01afb5 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs @@ -5,17 +5,17 @@ namespace Microsoft.Azure.Cosmos { using System; using System.Collections.Generic; - using System.Diagnostics; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Http.Headers; using System.Net.Security; + using System.Reflection; using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.Core.Trace; using Microsoft.Azure.Cosmos.Resource.CosmosExceptions; - using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Cosmos.Tracing.TraceData; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Collections; @@ -99,7 +99,87 @@ public static CosmosHttpClient CreateWithConnectionPolicy( eventSource: eventSource); } - public static HttpMessageHandler CreateHttpClientHandler(int gatewayModeMaxConnectionLimit, IWebProxy webProxy, Func serverCertificateCustomValidationCallback) + public static HttpMessageHandler CreateHttpClientHandler( + int gatewayModeMaxConnectionLimit, + IWebProxy webProxy, + Func serverCertificateCustomValidationCallback) + { + // TODO: Remove type check and use #if NET6_0_OR_GREATER when multitargetting is possible + Type socketHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http"); + + if (socketHandlerType != null) + { + try + { + return CosmosHttpClientCore.CreateSocketsHttpHandlerHelper(gatewayModeMaxConnectionLimit, webProxy, serverCertificateCustomValidationCallback); + } + catch (Exception e) + { + DefaultTrace.TraceError("Failed to create SocketsHttpHandler: {0}", e); + } + } + + return CosmosHttpClientCore.CreateHttpClientHandlerHelper(gatewayModeMaxConnectionLimit, webProxy, serverCertificateCustomValidationCallback); + } + + public static HttpMessageHandler CreateSocketsHttpHandlerHelper( + int gatewayModeMaxConnectionLimit, + IWebProxy webProxy, + Func serverCertificateCustomValidationCallback) + { + // TODO: Remove Reflection when multitargetting is possible + Type socketHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http"); + + object socketHttpHandler = Activator.CreateInstance(socketHandlerType); + + PropertyInfo pooledConnectionLifetimeInfo = socketHandlerType.GetProperty("PooledConnectionLifetime"); + + //Sets the timeout for unused connections to a random time between 5 minutes and 5 minutes and 30 seconds. + //This is to avoid the issue where a large number of connections are closed at the same time. + TimeSpan connectionTimeSpan = TimeSpan.FromMinutes(5) + TimeSpan.FromSeconds(30 * CustomTypeExtensions.GetRandomNumber().NextDouble()); + pooledConnectionLifetimeInfo.SetValue(socketHttpHandler, connectionTimeSpan); + + // Proxy is only set by users and can cause not supported exception on some platforms + if (webProxy != null) + { + PropertyInfo webProxyInfo = socketHandlerType.GetProperty("Proxy"); + webProxyInfo.SetValue(socketHttpHandler, webProxy); + } + + // https://docs.microsoft.com/en-us/archive/blogs/timomta/controlling-the-number-of-outgoing-connections-from-httpclient-net-core-or-full-framework + try + { + PropertyInfo maxConnectionsPerServerInfo = socketHandlerType.GetProperty("MaxConnectionsPerServer"); + maxConnectionsPerServerInfo.SetValue(socketHttpHandler, gatewayModeMaxConnectionLimit); + } + // MaxConnectionsPerServer is not supported on some platforms. + catch (PlatformNotSupportedException) + { + } + + if (serverCertificateCustomValidationCallback != null) + { + //Get SslOptions Property + PropertyInfo sslOptionsInfo = socketHandlerType.GetProperty("SslOptions"); + object sslOptions = sslOptionsInfo.GetValue(socketHttpHandler); + + //Set SslOptions Property with custom certificate validation + PropertyInfo remoteCertificateValidationCallbackInfo = sslOptions.GetType().GetProperty("RemoteCertificateValidationCallback"); + remoteCertificateValidationCallbackInfo.SetValue( + sslOptions, + new RemoteCertificateValidationCallback((object _, X509Certificate certificate, X509Chain x509Chain, SslPolicyErrors sslPolicyErrors) => serverCertificateCustomValidationCallback( + certificate is { } ? new X509Certificate2(certificate) : null, + x509Chain, + sslPolicyErrors))); + } + + return (HttpMessageHandler)socketHttpHandler; + } + + public static HttpMessageHandler CreateHttpClientHandlerHelper( + int gatewayModeMaxConnectionLimit, + IWebProxy webProxy, + Func serverCertificateCustomValidationCallback) { HttpClientHandler httpClientHandler = new HttpClientHandler(); @@ -112,17 +192,18 @@ public static HttpMessageHandler CreateHttpClientHandler(int gatewayModeMaxConne // https://docs.microsoft.com/en-us/archive/blogs/timomta/controlling-the-number-of-outgoing-connections-from-httpclient-net-core-or-full-framework try { - httpClientHandler.MaxConnectionsPerServer = gatewayModeMaxConnectionLimit; - if (serverCertificateCustomValidationCallback != null) - { - httpClientHandler.ServerCertificateCustomValidationCallback = (_, certificate2, x509Chain, sslPolicyErrors) => serverCertificateCustomValidationCallback(certificate2, x509Chain, sslPolicyErrors); - } + httpClientHandler.MaxConnectionsPerServer = gatewayModeMaxConnectionLimit; } // MaxConnectionsPerServer is not supported on some platforms. catch (PlatformNotSupportedException) { } + if (serverCertificateCustomValidationCallback != null) + { + httpClientHandler.ServerCertificateCustomValidationCallback = (_, certificate2, x509Chain, sslPolicyErrors) => serverCertificateCustomValidationCallback(certificate2, x509Chain, sslPolicyErrors); + } + return httpClientHandler; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs index 1f419c4eb8..c8a9a0aff7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTests.cs @@ -486,7 +486,6 @@ public async Task Verify_CertificateCallBackGetsCalled_ForTCP_HTTP() { await database?.DeleteStreamAsync(); } - } [TestMethod] @@ -878,7 +877,7 @@ public async Task HttpClientConnectionLimitTest() )) { CosmosHttpClient cosmosHttpClient = cosmosClient.DocumentClient.httpClient; - HttpClientHandler httpClientHandler = (HttpClientHandler)cosmosHttpClient.HttpMessageHandler; + SocketsHttpHandler httpClientHandler = (SocketsHttpHandler)cosmosHttpClient.HttpMessageHandler; Assert.AreEqual(gatewayConnectionLimit, httpClientHandler.MaxConnectionsPerServer); Cosmos.Database database = await cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()); @@ -895,7 +894,7 @@ public async Task HttpClientConnectionLimitTest() await Task.WhenAll(creates); - // Clean up the database and container + // Clean up the database await database.DeleteAsync(); } @@ -907,6 +906,20 @@ public async Task HttpClientConnectionLimitTest() $"Before connections: {JsonConvert.SerializeObject(excludeConnections)}; After connections: {JsonConvert.SerializeObject(afterConnections)}"); } + [TestMethod] + public void PooledConnectionLifetimeTest() + { + //Create Cosmos Client + using CosmosClient cosmosClient = new CosmosClient( + accountEndpoint: "https://localhost:8081", + authKeyOrResourceToken: Convert.ToBase64String(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString()))); + + //Assert type of message handler + Type socketHandlerType = Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http"); + Type clientMessageHandlerType = cosmosClient.ClientContext.DocumentClient.httpClient.HttpMessageHandler.GetType(); + Assert.AreEqual(socketHandlerType, clientMessageHandlerType); + } + public static IReadOnlyList GetActiveConnections() { string testPid = Process.GetCurrentProcess().Id.ToString(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs index 986b9cc997..efb06d7cc5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs @@ -398,7 +398,7 @@ public void VerifyHttpClientHandlerIsSet() CosmosClient cosmosClient = cosmosClientBuilder.Build(); CosmosHttpClient cosmosHttpClient = cosmosClient.DocumentClient.httpClient; - HttpClientHandler handler = (HttpClientHandler)cosmosHttpClient.HttpMessageHandler; + SocketsHttpHandler handler = (SocketsHttpHandler)cosmosHttpClient.HttpMessageHandler; Assert.IsTrue(object.ReferenceEquals(webProxy, handler.Proxy)); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs index 3ac919bf83..0d475ca370 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs @@ -4,18 +4,20 @@ namespace Microsoft.Azure.Cosmos.Tests { - using System.Threading.Tasks; - using Microsoft.VisualStudio.TestTools.UnitTesting; - using Microsoft.Azure.Documents; using System; - using System.Net.Http; + using System.Collections.Generic; + using System.IO; using System.Net; + using System.Net.Http; + using System.Net.Security; + using System.Security.Cryptography; + using System.Security.Cryptography.X509Certificates; using System.Threading; - using System.IO; - using System.Net.Sockets; - using System.Collections.Generic; + using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Cosmos.Tracing.TraceData; + using Microsoft.Azure.Documents; + using Microsoft.VisualStudio.TestTools.UnitTesting; [TestClass] public class CosmosHttpClientCoreTests @@ -410,6 +412,55 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); } + [TestMethod] + public void CreateSocketsHttpHandlerCreatesCorrectValueType() + { + int gatewayLimit = 10; + IWebProxy webProxy = null; + Func serverCertificateCustomValidationCallback = (certificate2, x509Chain, sslPolicyErrors) => false; + + HttpMessageHandler handler = CosmosHttpClientCore.CreateSocketsHttpHandlerHelper( + gatewayLimit, + webProxy, + serverCertificateCustomValidationCallback); + + Assert.AreEqual(Type.GetType("System.Net.Http.SocketsHttpHandler, System.Net.Http"), handler.GetType()); + SocketsHttpHandler socketsHandler = (SocketsHttpHandler)handler; + + Assert.IsTrue(TimeSpan.FromMinutes(5.5) >= socketsHandler.PooledConnectionLifetime); + Assert.IsTrue(TimeSpan.FromMinutes(5) <= socketsHandler.PooledConnectionLifetime); + Assert.AreEqual(webProxy, socketsHandler.Proxy); + Assert.AreEqual(gatewayLimit, socketsHandler.MaxConnectionsPerServer); + + //Create cert for test + X509Certificate2 x509Certificate2 = new CertificateRequest("cn=www.test", ECDsa.Create(), HashAlgorithmName.SHA256).CreateSelfSigned(DateTime.Now, DateTime.Now.AddYears(1)); + X509Chain x509Chain = new X509Chain(); + SslPolicyErrors sslPolicyErrors = new SslPolicyErrors(); + Assert.IsFalse(socketsHandler.SslOptions.RemoteCertificateValidationCallback.Invoke(new object(), x509Certificate2, x509Chain, sslPolicyErrors)); + } + + [TestMethod] + public void CreateHttpClientHandlerCreatesCorrectValueType() + { + int gatewayLimit = 10; + IWebProxy webProxy = null; + Func serverCertificateCustomValidationCallback = (certificate2, x509Chain, sslPolicyErrors) => false; + + HttpMessageHandler handler = CosmosHttpClientCore.CreateHttpClientHandlerHelper(gatewayLimit, webProxy, serverCertificateCustomValidationCallback); + + Assert.AreEqual(Type.GetType("System.Net.Http.HttpClientHandler, System.Net.Http"), handler.GetType()); + HttpClientHandler clientHandler = (HttpClientHandler)handler; + + Assert.AreEqual(webProxy, clientHandler.Proxy); + Assert.AreEqual(gatewayLimit, clientHandler.MaxConnectionsPerServer); + + //Create cert for test + X509Certificate2 x509Certificate2 = new CertificateRequest("cn=www.test", ECDsa.Create(), HashAlgorithmName.SHA256).CreateSelfSigned(DateTime.Now, DateTime.Now.AddYears(1)); + X509Chain x509Chain = new X509Chain(); + SslPolicyErrors sslPolicyErrors = new SslPolicyErrors(); + Assert.IsFalse(clientHandler.ServerCertificateCustomValidationCallback.Invoke(new HttpRequestMessage(), x509Certificate2, x509Chain, sslPolicyErrors)); + } + private class MockMessageHandler : HttpMessageHandler { private readonly Func> sendFunc; From 789f70183a2323259d6518eb7d463aca38f4ae08 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Sat, 8 Apr 2023 11:05:59 -0700 Subject: [PATCH 090/164] [Internal] Tests: Fixes Open Telemetry attributes for ReadMany test (#3805) * Fixing test * New baseline * Undo some changes --- .../EndToEndTraceWriterBaselineTests.ReadManyAsync.xml | 10 ---------- .../Tracing/EndToEndTraceWriterBaselineTests.cs | 4 +++- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 7229f78197..a7cc47631a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -543,16 +543,6 @@ ] }]]> Operation.ReadManyItemsStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index c32c756121..e14188d92a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -92,7 +92,7 @@ public static async Task ClassInitAsync(TestContext context) EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); } - + [TestCleanup] public async Task CleanUp() { @@ -1405,6 +1405,8 @@ public async Task ReadManyAsync() itemList.Add(("id" + i, new PartitionKey(i.ToString()))); } + EndToEndTraceWriterBaselineTests.AssertAndResetActivityInformation(); + //---------------------------------------------------------------- // Read Many Stream //---------------------------------------------------------------- From 2b6fdb7d818115b88a992d0370e77d1a8aaf0e19 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Tue, 11 Apr 2023 00:42:35 +0530 Subject: [PATCH 091/164] [Internal] Client Telemetry: Refactors code to run client telemetry data processing task in background. (#3783) * first draft * remove failure count test * refactporing * code refactor * create task with timeout * fix test * code refactoring * fix timeout code * space fix * not failing if processor is taking time * fix procrsser test * code refactor * refactor and test fix --- .../src/Telemetry/ClientTelemetry.cs | 78 ++++++++----- .../src/Telemetry/ClientTelemetryOptions.cs | 6 +- .../ClientTelemetryTests.cs | 27 ----- .../Telemetry/ClientTelemetryTests.cs | 108 +++++++++++++++++- 4 files changed, 155 insertions(+), 64 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs index 8a83778fdb..dde7d5a7c5 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetry.cs @@ -19,7 +19,6 @@ namespace Microsoft.Azure.Cosmos.Telemetry using Microsoft.Azure.Cosmos.Tracing.TraceData; using Microsoft.Azure.Documents; using Util; - using static Microsoft.Azure.Cosmos.Tracing.TraceData.ClientSideRequestStatisticsTraceDatum; /// /// This class collects and send all the telemetry information. @@ -29,8 +28,6 @@ namespace Microsoft.Azure.Cosmos.Telemetry /// internal class ClientTelemetry : IDisposable { - private const int allowedNumberOfFailures = 3; - private static readonly TimeSpan observingWindow = ClientTelemetryOptions.GetScheduledTimeSpan(); private readonly ClientTelemetryProperties clientTelemetryInfo; @@ -39,7 +36,6 @@ internal class ClientTelemetry : IDisposable private readonly NetworkDataRecorder networkDataRecorder; private readonly CancellationTokenSource cancellationTokenSource; - private readonly GlobalEndpointManager globalEndpointManager; private Task telemetryTask; @@ -50,8 +46,6 @@ internal class ClientTelemetry : IDisposable private ConcurrentDictionary cacheRefreshInfoMap = new ConcurrentDictionary(); - private int numberOfFailures = 0; - /// /// Only for Mocking in tests /// @@ -123,7 +117,6 @@ internal ClientTelemetry( aggregationIntervalInSec: (int)observingWindow.TotalSeconds); this.networkDataRecorder = new NetworkDataRecorder(); - this.cancellationTokenSource = new CancellationTokenSource(); } @@ -137,9 +130,9 @@ private void StartObserverTask() /// /// Task which does below operations , periodically - /// 1. Set Account information (one time at the time of initialization) - /// 2. Load VM metedata information (one time at the time of initialization) - /// 3. Calculate and Send telemetry Information to juno service (never ending task)/// + /// 1. Set Account information (one time during initialization) + /// 2. Load VM metedata information (one time during initialization) + /// 3. Calculate and Send telemetry Information to Client Telemetry Service (never ending task)/// /// Async Task private async Task EnrichAndSendAsync() { @@ -149,18 +142,12 @@ private async Task EnrichAndSendAsync() { while (!this.cancellationTokenSource.IsCancellationRequested) { - if (this.numberOfFailures == allowedNumberOfFailures) - { - this.Dispose(); - break; - } - if (string.IsNullOrEmpty(this.clientTelemetryInfo.GlobalDatabaseAccountName)) { AccountProperties accountProperties = await ClientTelemetryHelper.SetAccountNameAsync(this.globalEndpointManager); this.clientTelemetryInfo.GlobalDatabaseAccountName = accountProperties.Id; } - + await Task.Delay(observingWindow, this.cancellationTokenSource.Token); this.clientTelemetryInfo.DateTimeUtc = DateTime.UtcNow.ToString(ClientTelemetryOptions.DateFormat); @@ -180,24 +167,28 @@ private async Task EnrichAndSendAsync() ConcurrentDictionary cacheRefreshInfoSnapshot = Interlocked.Exchange(ref this.cacheRefreshInfoMap, new ConcurrentDictionary()); - + + List requestInfoSnapshot = this.networkDataRecorder.GetRequests(); + try { - await this.processor - .ProcessAndSendAsync( - clientTelemetryInfo: this.clientTelemetryInfo, - operationInfoSnapshot: operationInfoSnapshot, - cacheRefreshInfoSnapshot: cacheRefreshInfoSnapshot, - requestInfoSnapshot: this.networkDataRecorder.GetRequests(), - cancellationToken: this.cancellationTokenSource.Token); - - this.numberOfFailures = 0; + CancellationTokenSource cancellationToken = new CancellationTokenSource(ClientTelemetryOptions.ClientTelemetryProcessorTimeOut); + Task processorTask = Task.Run(() => this.processor + .ProcessAndSendAsync( + clientTelemetryInfo: this.clientTelemetryInfo, + operationInfoSnapshot: operationInfoSnapshot, + cacheRefreshInfoSnapshot: cacheRefreshInfoSnapshot, + requestInfoSnapshot: requestInfoSnapshot, + cancellationToken: cancellationToken.Token), cancellationToken.Token); + + // Initiating Telemetry Data Processor task which will serialize and send telemetry information to Client Telemetry Service + // Not disposing this task. If we dispose a client then, telemetry job(telemetryTask) should stop but processor task(processorTask) should make best effort to finish the job in background. + _ = ClientTelemetry.RunProcessorTaskAsync(this.clientTelemetryInfo.DateTimeUtc, processorTask, ClientTelemetryOptions.ClientTelemetryProcessorTimeOut); + } catch (Exception ex) { - this.numberOfFailures++; - - DefaultTrace.TraceError("Telemetry Job Processor failed with error : {0}", ex); + DefaultTrace.TraceError("Exception while initiating processing task : {0} with telemetry date as {1}", ex.Message, this.clientTelemetryInfo.DateTimeUtc); } } } @@ -209,6 +200,33 @@ await this.processor DefaultTrace.TraceInformation("Telemetry Job Stopped."); } + /// + /// This Task makes sure, processing task is timing out after 5 minute of timeout + /// + /// + /// + /// + internal static async Task RunProcessorTaskAsync(string telemetryDate, Task processingTask, TimeSpan timeout) + { + using (CancellationTokenSource tokenForDelayTask = new CancellationTokenSource()) + { + Task delayTask = Task.Delay(timeout, tokenForDelayTask.Token); + + Task resultTask = await Task.WhenAny(processingTask, delayTask); + if (resultTask == delayTask) + { + DefaultTrace.TraceVerbose($"Processor task with date as {telemetryDate} is canceled as it did not finish in {timeout}"); + // Operation cancelled + throw new OperationCanceledException($"Processor task with date as {telemetryDate} is canceled as it did not finish in {timeout}"); + } + else + { + // Cancel the timer task so that it does not fire + tokenForDelayTask.Cancel(); + } + } + } + /// /// Collects Cache Telemetry Information. /// diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs index 47232a187e..2aeaadca63 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/ClientTelemetryOptions.cs @@ -79,13 +79,12 @@ internal static class ClientTelemetryOptions internal const double Percentile99 = 99.0; internal const double Percentile999 = 99.9; internal const string DateFormat = "yyyy-MM-ddTHH:mm:ssZ"; - internal const string EnvPropsClientTelemetrySchedulingInSeconds = "COSMOS.CLIENT_TELEMETRY_SCHEDULING_IN_SECONDS"; internal const string EnvPropsClientTelemetryEnabled = "COSMOS.CLIENT_TELEMETRY_ENABLED"; internal const string EnvPropsClientTelemetryVmMetadataUrl = "COSMOS.VM_METADATA_URL"; internal const string EnvPropsClientTelemetryEndpoint = "COSMOS.CLIENT_TELEMETRY_ENDPOINT"; internal const string EnvPropsClientTelemetryEnvironmentName = "COSMOS.ENVIRONMENT_NAME"; - + internal static readonly ResourceType AllowedResourceTypes = ResourceType.Document; // Why 5 sec? As of now, if any network request is taking more than 5 millisecond sec, we will consider it slow request this value can be revisited in future internal static readonly TimeSpan NetworkLatencyThreshold = TimeSpan.FromMilliseconds(5); @@ -101,7 +100,8 @@ internal static class ClientTelemetryOptions internal static readonly int NetworkTelemetrySampleSize = 200; internal static int PayloadSizeThreshold = 1024 * 1024 * 2; // 2MB - + internal static TimeSpan ClientTelemetryProcessorTimeOut = TimeSpan.FromMinutes(5); + private static Uri clientTelemetryEndpoint; private static string environmentName; private static TimeSpan scheduledTimeSpan = TimeSpan.Zero; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs index 7e924ffd53..30edc7ebf7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientTelemetryTests.cs @@ -1075,33 +1075,6 @@ private static void AssertCacheRefreshInfoInformation( } } - [TestMethod] - public async Task CheckMisconfiguredTelemetryEndpoint_should_stop_the_job() - { - int retryCounter = 0; - HttpClientHandlerHelper customHttpHandler = new HttpClientHandlerHelper - { - RequestCallBack = (request, cancellation) => - { - if (request.RequestUri.AbsoluteUri.Equals(ClientTelemetryOptions.GetClientTelemetryEndpoint().AbsoluteUri)) - { - retryCounter++; - throw new Exception("Exception while sending telemetry"); - } - - return null; - } - }; - - Container container = await this.CreateClientAndContainer( - mode: ConnectionMode.Direct, - customHttpHandler: customHttpHandler); - - await Task.Delay(TimeSpan.FromMilliseconds(5000)); // wait for 5 sec, ideally telemetry would be sent 5 times but client telemetry endpoint is not functional (in this test), it should try 3 times maximum and after that client telemetry job should be stopped. - - Assert.AreEqual(3, retryCounter); - } - private static ItemBatchOperation CreateItem(string itemId) { var testItem = new { id = itemId, Status = itemId }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs index 4a6b077baa..9308d22806 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/ClientTelemetryTests.cs @@ -30,6 +30,7 @@ public class ClientTelemetryTests public void Cleanup() { Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEnabled, null); + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, null); } [TestMethod] @@ -147,7 +148,6 @@ public async Task CheckIfPayloadIsDividedCorrectlyAsync(int expectedOperationInf string payloadJson = request.Content.ReadAsStringAsync().Result; Assert.IsTrue(payloadJson.Length <= ClientTelemetryOptions.PayloadSizeThreshold, "Payload Size is " + payloadJson.Length); - Console.WriteLine(payloadJson); ClientTelemetryProperties propertiesToSend = JsonConvert.DeserializeObject(payloadJson); Assert.AreEqual(7, propertiesToSend.SystemInfo.Count, "System Info is not correct"); @@ -245,14 +245,114 @@ await processor.ProcessAndSendAsync( clientTelemetryProperties, operationInfoSnapshot, cacheRefreshInfoSnapshot, - requestInfoList, - new CancellationToken()); + requestInfoList, + new CancellationTokenSource(ClientTelemetryOptions.ClientTelemetryProcessorTimeOut).Token); Assert.AreEqual(expectedOperationInfoSize, actualOperationInfoSize, "Operation Info is not correct"); Assert.AreEqual(expectedCacheRefreshInfoSize, actualCacheRefreshInfoSize, "Cache Refresh Info is not correct"); Assert.AreEqual(expectedRequestInfoSize, actualRequestInfoSize, "Request Info is not correct"); } - + + [TestMethod] + public async Task ClientTelmetryProcessor_should_timeout() + { + Environment.SetEnvironmentVariable(ClientTelemetryOptions.EnvPropsClientTelemetryEndpoint, "http://dummy.telemetry.endpoint/"); + + string data = File.ReadAllText("Telemetry/ClientTelemetryPayloadWithoutMetrics.json", Encoding.UTF8); + ClientTelemetryProperties clientTelemetryProperties = JsonConvert.DeserializeObject(data); + + int actualOperationInfoSize = 0; + int actualCacheRefreshInfoSize = 0; + + Mock mockHttpHandler = new Mock(); + _ = mockHttpHandler.Setup(x => x.SendAsync( + It.IsAny(), + It.IsAny())) + .Callback( + (request, cancellationToken) => + { + string payloadJson = request.Content.ReadAsStringAsync().Result; + Assert.IsTrue(payloadJson.Length <= ClientTelemetryOptions.PayloadSizeThreshold, "Payload Size is " + payloadJson.Length); + + ClientTelemetryProperties propertiesToSend = JsonConvert.DeserializeObject(payloadJson); + + actualOperationInfoSize += propertiesToSend.OperationInfo?.Count ?? 0; + actualCacheRefreshInfoSize += propertiesToSend.CacheRefreshInfo?.Count ?? 0; + }) + .Returns(Task.FromResult(new HttpResponseMessage(HttpStatusCode.OK))); + + ClientTelemetryProcessor processor = new ClientTelemetryProcessor( + MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(new HttpHandlerHelper(mockHttpHandler.Object))), + Mock.Of()); + + ConcurrentDictionary operationInfoSnapshot + = new ConcurrentDictionary(); + + for (int i = 0; i < 20; i++) + { + OperationInfo opeInfo = new OperationInfo(Regions.WestUS, + 0, + Documents.ConsistencyLevel.Session.ToString(), + "databaseName" + i, + "containerName", + Documents.OperationType.Read, + Documents.ResourceType.Document, + 200, + 0); + + LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision); + latency.RecordValue(10); + + LongConcurrentHistogram requestcharge = new LongConcurrentHistogram(ClientTelemetryOptions.RequestChargeMin, + ClientTelemetryOptions.RequestChargeMax, + ClientTelemetryOptions.RequestChargePrecision); + requestcharge.RecordValue(11); + + operationInfoSnapshot.TryAdd(opeInfo, (latency, requestcharge)); + } + + ConcurrentDictionary cacheRefreshInfoSnapshot + = new ConcurrentDictionary(); + for (int i = 0; i < 10; i++) + { + CacheRefreshInfo crInfo = new CacheRefreshInfo(Regions.WestUS, + 10, + Documents.ConsistencyLevel.Session.ToString(), + "databaseName" + i, + "containerName", + Documents.OperationType.Read, + Documents.ResourceType.Document, + 200, + 1002, + "dummycache"); + + LongConcurrentHistogram latency = new LongConcurrentHistogram(ClientTelemetryOptions.RequestLatencyMin, + ClientTelemetryOptions.RequestLatencyMax, + ClientTelemetryOptions.RequestLatencyPrecision); + latency.RecordValue(10); + + cacheRefreshInfoSnapshot.TryAdd(crInfo, latency); + } + + Task processorTask = Task.Run(async () => + { + CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(1)); + await Task.Delay(1000, cts.Token); // Making this task wait to ensure that processir is taking more time. + await processor.ProcessAndSendAsync(clientTelemetryProperties, + operationInfoSnapshot, + cacheRefreshInfoSnapshot, + default, + cts.Token); + }); + + await Assert.ThrowsExceptionAsync(() => ClientTelemetry.RunProcessorTaskAsync( + telemetryDate: DateTime.Now.ToString(), + processingTask: processorTask, + timeout: TimeSpan.FromTicks(1))); + } + [TestMethod] [ExpectedException(typeof(FormatException))] public void CheckMisconfiguredTelemetry_should_fail() From 33dea8a333239a63be8700da1d982bde99d17da8 Mon Sep 17 00:00:00 2001 From: Amaan-Haque <54414760+Amaan-Haque@users.noreply.github.com> Date: Tue, 11 Apr 2023 21:09:22 +0530 Subject: [PATCH 092/164] Patch: Adds Move Operation (#3389) * Basic changes to introduce move operator * Added "from" object in patch spec operation. Added testcase block. * Fixed testcase. * Changes made to address comments' * Added comment regarding enum mutations * Formatted comment Co-authored-by: Matias Quaranta * Moved summary location. * Ran UpdateContracts.ps1 --------- Co-authored-by: Amaan Haque Co-authored-by: Amaan Haque Co-authored-by: Matias Quaranta --- .../src/Patch/PatchConstants.cs | 4 ++ .../src/Patch/PatchOperation.cs | 22 ++++++++++ .../src/Patch/PatchOperationCore{T}.cs | 43 +++++++++++++------ .../src/Patch/PatchOperationType.cs | 8 +++- .../src/Patch/PatchOperationsJsonConverter.cs | 7 ++- .../Batch/BatchSinglePartitionKeyTests.cs | 6 ++- .../CosmosItemTests.cs | 17 +++++++- .../Contracts/DotNetSDKAPI.json | 33 ++++++++++++++ 8 files changed, 122 insertions(+), 18 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Patch/PatchConstants.cs b/Microsoft.Azure.Cosmos/src/Patch/PatchConstants.cs index fd0cd79215..b06ad841b4 100644 --- a/Microsoft.Azure.Cosmos/src/Patch/PatchConstants.cs +++ b/Microsoft.Azure.Cosmos/src/Patch/PatchConstants.cs @@ -13,6 +13,7 @@ public static class PropertyNames public const string OperationType = "op"; public const string Path = "path"; public const string Value = "value"; + public const string From = "from"; } public static class PatchSpecAttributes @@ -28,6 +29,7 @@ public static class OperationTypeNames public const string Replace = "replace"; public const string Set = "set"; public const string Increment = "incr"; + public const string Move = "move"; } public static string ToEnumMemberString(this PatchOperationType patchOperationType) @@ -44,6 +46,8 @@ public static string ToEnumMemberString(this PatchOperationType patchOperationTy return PatchConstants.OperationTypeNames.Set; case PatchOperationType.Increment: return PatchConstants.OperationTypeNames.Increment; + case PatchOperationType.Move: + return PatchConstants.OperationTypeNames.Move; default: throw new ArgumentException($"Unknown Patch operation type '{patchOperationType}'."); } diff --git a/Microsoft.Azure.Cosmos/src/Patch/PatchOperation.cs b/Microsoft.Azure.Cosmos/src/Patch/PatchOperation.cs index 16448c7f9f..412dec2334 100644 --- a/Microsoft.Azure.Cosmos/src/Patch/PatchOperation.cs +++ b/Microsoft.Azure.Cosmos/src/Patch/PatchOperation.cs @@ -25,6 +25,12 @@ public abstract class PatchOperation [JsonProperty(PropertyName = PatchConstants.PropertyNames.Path)] public abstract string Path { get; } + /// + /// Source location reference (used in case of move) + /// + [JsonProperty(PropertyName = PatchConstants.PropertyNames.From)] + public virtual string From { get; set; } = null; + /// /// Serializes the value parameter, if specified for the PatchOperation. /// @@ -134,5 +140,21 @@ public static PatchOperation Increment( path, value); } + + /// + /// Create to move an object/value. + /// + /// The source location of the object/value. + /// Target location reference. + /// PatchOperation instance for specified input. + public static PatchOperation Move( + string from, + string path) + { + return new PatchOperationCore( + PatchOperationType.Move, + path, + from); + } } } diff --git a/Microsoft.Azure.Cosmos/src/Patch/PatchOperationCore{T}.cs b/Microsoft.Azure.Cosmos/src/Patch/PatchOperationCore{T}.cs index bb87570242..c560cbae7b 100644 --- a/Microsoft.Azure.Cosmos/src/Patch/PatchOperationCore{T}.cs +++ b/Microsoft.Azure.Cosmos/src/Patch/PatchOperationCore{T}.cs @@ -10,23 +10,40 @@ namespace Microsoft.Azure.Cosmos internal sealed class PatchOperationCore : PatchOperation { /// - /// Initializes a new instance of the class. - /// - /// Specifies the type of Patch operation. - /// Specifies the path to target location. - /// Specifies the value to be used. +        /// Initializes a new instance of the class. +        /// +        /// Specifies the type of Patch operation. +        /// Specifies the path to target location. +        /// Specifies the value to be used. In case of move operations it will be a string specifying the source +        /// location. public PatchOperationCore( - PatchOperationType operationType, - string path, - T value) + PatchOperationType operationType, + string path, + T value) { this.OperationType = operationType; - this.Path = string.IsNullOrWhiteSpace(path) - ? throw new ArgumentNullException(nameof(path)) - : path; - this.Value = value; + if (operationType == PatchOperationType.Move) + { + this.Path = string.IsNullOrWhiteSpace(path) + ? throw new ArgumentNullException(nameof(path)) + : path; + if (!(value is String valueAsString)) + { + throw new ArgumentException( + $"Parameter {nameof(value)} must be of type String for patch operation type {nameof(PatchOperationType.Move)}"); + } + this.From = string.IsNullOrWhiteSpace(valueAsString) + ? throw new ArgumentNullException(nameof(value)) + : valueAsString; + } + else + { + this.Path = string.IsNullOrWhiteSpace(path) + ? throw new ArgumentNullException(nameof(path)) + : path; + this.Value = value; + } } - public override T Value { get; } public override PatchOperationType OperationType { get; } diff --git a/Microsoft.Azure.Cosmos/src/Patch/PatchOperationType.cs b/Microsoft.Azure.Cosmos/src/Patch/PatchOperationType.cs index 7504492126..d98d35f832 100644 --- a/Microsoft.Azure.Cosmos/src/Patch/PatchOperationType.cs +++ b/Microsoft.Azure.Cosmos/src/Patch/PatchOperationType.cs @@ -9,7 +9,7 @@ namespace Microsoft.Azure.Cosmos using Newtonsoft.Json.Converters; /// - /// Type of Patch operation. + /// Describes the list of Patch supported operation types. /// /// /// For more information, see Partial document update in Azure Cosmos DB: Supported operations @@ -47,5 +47,11 @@ public enum PatchOperationType /// [EnumMember(Value = PatchConstants.OperationTypeNames.Increment)] Increment, + + /// + /// Operation to move a object/value. + /// + [EnumMember(Value = PatchConstants.OperationTypeNames.Move)] + Move, } } diff --git a/Microsoft.Azure.Cosmos/src/Patch/PatchOperationsJsonConverter.cs b/Microsoft.Azure.Cosmos/src/Patch/PatchOperationsJsonConverter.cs index 6cb9c8fa45..04419a5765 100644 --- a/Microsoft.Azure.Cosmos/src/Patch/PatchOperationsJsonConverter.cs +++ b/Microsoft.Azure.Cosmos/src/Patch/PatchOperationsJsonConverter.cs @@ -88,7 +88,12 @@ public override void WriteJson( writer.WritePropertyName(PatchConstants.PropertyNames.Path); writer.WriteValue(operation.Path); - if (operation.TrySerializeValueParameter(this.userSerializer, out Stream valueStream)) + if (operation.OperationType == PatchOperationType.Move) + { + writer.WritePropertyName(PatchConstants.PropertyNames.From); + writer.WriteValue(operation.From); + } + else if (operation.TrySerializeValueParameter(this.userSerializer, out Stream valueStream)) { string valueParam; using (valueStream) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs index 675ed6b20e..b2b1ffb217 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Batch/BatchSinglePartitionKeyTests.cs @@ -693,7 +693,8 @@ public async Task BatchCustomSerializerUsedForPatchAsync() DateTime patchDate = new DateTime(2020, 07, 01, 01, 02, 03); List patchOperations = new List() { - PatchOperation.Add("/date", patchDate) + PatchOperation.Add("/date", patchDate), + PatchOperation.Move("/date", "/TodayDate") }; BatchCore batch = (BatchCore)new BatchCore((ContainerInlineCore)customSerializationContainer, BatchTestBase.GetPartitionKey(this.PartitionKey1)) @@ -719,7 +720,8 @@ public async Task BatchCustomSerializerUsedForPatchAsync() Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); Assert.IsNotNull(response.Resource); - Assert.IsTrue(dateJson.Contains(response.Resource["date"].ToString())); + Assert.IsNull(response.Resource["date"]); + Assert.IsTrue(dateJson.Contains(response.Resource["TodayDate"].ToString())); } private async Task RunCrudAsync(bool isStream, bool isSchematized, bool useEpk, Container container) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs index c5d6347dd1..b237c68c2a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemTests.cs @@ -1984,7 +1984,6 @@ public async Task ItemPatchSuccessTest() patchOperations.Clear(); patchOperations.Add(PatchOperation.Add("/children/0/cost", 1)); - //patchOperations.Add(PatchOperation.Set("/random", value)); // with content response response = await containerInternal.PatchItemAsync( id: testItem.id, @@ -2006,6 +2005,22 @@ public async Task ItemPatchSuccessTest() Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); Assert.IsNotNull(response.Resource); Assert.AreEqual(null, response.Resource.children[0].id); + + patchOperations.Clear(); + patchOperations.Add(PatchOperation.Add("/children/1/description","Child#1")); + patchOperations.Add(PatchOperation.Move("/children/0/description", "/description")); + patchOperations.Add(PatchOperation.Move("/children/1/description", "/children/0/description")); + // with content response + response = await containerInternal.PatchItemAsync( + id: testItem.id, + partitionKey: new Cosmos.PartitionKey(testItem.pk), + patchOperations: patchOperations); + + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + Assert.IsNotNull(response.Resource); + Assert.AreEqual("testSet", response.Resource.description); + Assert.AreEqual("Child#1", response.Resource.children[0].description); + Assert.IsNull(response.Resource.children[1].description); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 3cf5c017c2..3eee7f406b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -5745,6 +5745,11 @@ "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.PatchOperation Increment(System.String, Int64);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Microsoft.Azure.Cosmos.PatchOperation Move(System.String, System.String)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.PatchOperation Move(System.String, System.String);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.PatchOperation Remove(System.String)": { "Type": "Method", "Attributes": [], @@ -5772,6 +5777,20 @@ ], "MethodInfo": "Microsoft.Azure.Cosmos.PatchOperationType OperationType;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.PatchOperationType get_OperationType();IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "System.String From[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"from\")]": { + "Type": "Property", + "Attributes": [ + "JsonPropertyAttribute" + ], + "MethodInfo": "System.String From;CanRead:True;CanWrite:True;System.String get_From();IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_From(System.String);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.String get_From()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.String get_From();IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "System.String get_Path()": { "Type": "Method", "Attributes": [], @@ -5783,6 +5802,13 @@ "JsonPropertyAttribute" ], "MethodInfo": "System.String Path;CanRead:True;CanWrite:False;System.String get_Path();IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_From(System.String)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_From(System.String);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} @@ -5827,6 +5853,13 @@ ], "MethodInfo": "Microsoft.Azure.Cosmos.PatchOperationType Increment;IsInitOnly:False;IsStatic:True;" }, + "Microsoft.Azure.Cosmos.PatchOperationType Move[System.Runtime.Serialization.EnumMemberAttribute(Value = \"move\")]": { + "Type": "Field", + "Attributes": [ + "EnumMemberAttribute" + ], + "MethodInfo": "Microsoft.Azure.Cosmos.PatchOperationType Move;IsInitOnly:False;IsStatic:True;" + }, "Microsoft.Azure.Cosmos.PatchOperationType Remove[System.Runtime.Serialization.EnumMemberAttribute(Value = \"remove\")]": { "Type": "Field", "Attributes": [ From 31b1ff330a4b0983f8e29a1156faaa0c702584d5 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Tue, 11 Apr 2023 11:48:29 -0700 Subject: [PATCH 093/164] [Internal] Pipelines: Adds nightly build to produce packages (#3802) * Support cleaning * wire previous content delete * as text * with variable * another test * param with types * as string * no delete * no quotes * undoing * re-adding quotes * testing empty * trying another test * readding version * fixing publishing artifacts * fixing parameter * Fixing official pipeline * version 5 * fixing main pipeline * test with true * using start time * nightly preview * passing parameters to pack * Fixing nuget version * arguments on the nuget pack * folder structure * testing v5 * Using only content * Removing currentDate --- .../src/Microsoft.Azure.Cosmos.csproj | 3 +- azure-pipelines-nightly.yml | 72 ++++++------------- azure-pipelines-official.yml | 3 +- azure-pipelines.yml | 1 - templates/nuget-pack.yml | 67 ++++++++++------- 5 files changed, 63 insertions(+), 83 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 7ba4e9213d..6a5be8ccbb 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -9,8 +9,9 @@ $([System.DateTime]::Now.ToString(yyyyMMdd)) $(ClientOfficialVersion) $(ClientPreviewVersion) - nightly-$(CurrentDate) $(ClientPreviewSuffixVersion) + nightly-$(CurrentDate) + $(VersionSuffix)-nightly-$(CurrentDate) $(ClientVersion) $(ClientVersion)-$(VersionSuffix) $(ClientVersion) diff --git a/azure-pipelines-nightly.yml b/azure-pipelines-nightly.yml index 8db3ff01e6..04a53968aa 100644 --- a/azure-pipelines-nightly.yml +++ b/azure-pipelines-nightly.yml @@ -13,64 +13,32 @@ schedules: variables: - ReleaseArguments: ' --filter "TestCategory!=Quarantine" --verbosity normal ' VmImage: windows-latest # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops - BuildConfiguration: Release - IsNightly: true - + BuildConfiguration: Release + Packaging.EnableSBOMSigning: true stages: - stage: - displayName: Gate + displayName: Generate nightly GA jobs: - - template: templates/static-tools.yml - parameters: - BuildConfiguration: $(BuildConfiguration) - VmImage: $(VmImage) - - - - template: templates/build-test.yml + - template: templates/nuget-pack.yml parameters: - BuildConfiguration: $(BuildConfiguration) - Arguments: $(ReleaseArguments) /p:IsNightly=true /p:GeneratePackageOnBuild=true + BuildConfiguration: Release + Arguments: /p:IsNightly=true VmImage: $(VmImage) - - + ReleasePackage: true + OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos' + BlobVersion: 'nightly' + CleanupFolder: true - stage: - displayName: Publish + displayName: Generate nightly preview jobs: - - job: - pool: - vmImage: $(VmImage) - - steps: - - task: DotNetCoreCLI@2 - displayName: Build Microsoft.Azure.Cosmos - inputs: - command: build - configuration: $(BuildConfiguration) - nugetConfigPath: NuGet.config - projects: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj - arguments: --configuration $(BuildConfiguration) - versioningScheme: OFF - - - task: DotNetCoreCLI@2 - displayName: Pack Microsoft.Azure.Cosmos - inputs: - command: pack - configuration: $(BuildConfiguration) - searchPatternPack: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj - arguments: --configuration $(BuildConfiguration) - versioningScheme: OFF - - - task: DotNetCoreCLI@2 - displayName: Push Microsoft.Azure.Cosmos - inputs: - command: push - configuration: $(BuildConfiguration) - searchPatternPack: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj - arguments: --configuration $(BuildConfiguration) - packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg' - nuGetFeedType: 'internal' - publishVstsFeed: '4000bd49-81c3-47f2-94d8-d1392b95c228/04efb628-f46d-4b48-ac4d-5af5b1c75043' #azure-cosmos-dotnet - versioningScheme: OFF + - template: templates/nuget-pack.yml + parameters: + BuildConfiguration: Release + Arguments: /p:IsNightly=true /p:IsPreview=true + VmImage: $(VmImage) + ReleasePackage: true + OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos' + BlobVersion: 'nightly-preview' + CleanupFolder: true \ No newline at end of file diff --git a/azure-pipelines-official.yml b/azure-pipelines-official.yml index 1aff6dbfd2..510bf5f6f8 100644 --- a/azure-pipelines-official.yml +++ b/azure-pipelines-official.yml @@ -29,8 +29,7 @@ stages: - template: templates/nuget-pack.yml parameters: BuildConfiguration: Release - Arguments: $(ReleaseArguments) VmImage: $(VmImage) ReleasePackage: true OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos' - BlobVersion: variables['BlobVersion'] + BlobVersion: $(BlobVersion) \ No newline at end of file diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 98490f0a62..aae5115a5e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,6 @@ jobs: - template: templates/nuget-pack.yml parameters: BuildConfiguration: Release - Arguments: $(ReleaseArguments) VmImage: $(VmImage) ReleasePackage: false OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/Release/Microsoft.Azure.Cosmos' diff --git a/templates/nuget-pack.yml b/templates/nuget-pack.yml index 874676d3e1..095b1b52ff 100644 --- a/templates/nuget-pack.yml +++ b/templates/nuget-pack.yml @@ -1,13 +1,27 @@ # File: templates/nuget-pack.yml parameters: - BuildConfiguration: '' - Arguments: '' - VmImage: '' # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops - OS: 'Windows' - OutputPath: '' - ReleasePackage: false - BlobVersion: '' + - name: BuildConfiguration + type: string + default: '' + - name: Arguments + type: string + default: '' + - name: VmImage + type: string + default: '' + - name: OutputPath + type: string + default: '' + - name: BlobVersion + type: string + default: '' + - name: ReleasePackage + type: boolean + default: false + - name: CleanupFolder + type: boolean + default: false jobs: - job: GenerateNugetPackages @@ -23,7 +37,7 @@ jobs: configuration: $(BuildConfiguration) nugetConfigPath: NuGet.config projects: Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj - arguments: --configuration ${{ parameters.BuildConfiguration }} -p:Optimize=true + arguments: --configuration ${{ parameters.BuildConfiguration }} -p:Optimize=true ${{ parameters.Arguments }} versioningScheme: OFF - task: DotNetCoreCLI@2 @@ -32,7 +46,7 @@ jobs: command: custom projects: 'Microsoft.Azure.Cosmos\src\Microsoft.Azure.Cosmos.csproj' custom: pack - arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --no-restore -o "${{ parameters.OutputPath }}"' + arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"' - ${{ if eq(parameters.ReleasePackage, true) }}: - task: DotNetCoreCLI@2 @@ -41,26 +55,25 @@ jobs: command: custom projects: 'Microsoft.Azure.Cosmos\src\Microsoft.Azure.Cosmos.csproj' custom: pack - arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --include-symbols /p:SymbolPackageFormat=snupkg --no-restore -o "${{ parameters.OutputPath }}"' + arguments: '-v detailed -c ${{ parameters.BuildConfiguration }} --no-build --include-symbols /p:SymbolPackageFormat=snupkg ${{ parameters.Arguments }} --no-restore -o "${{ parameters.OutputPath }}"' - task: AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0 inputs: BuildDropPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos' - - task: AzureFileCopy@2 - displayName: ' Copy Artifacts to Azure SDK Release blob storage' - condition: and(succeeded(),ne(${{ parameters.BlobVersion }}, '')) - inputs: - SourcePath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos' - azureSubscription: azuresdkpartnerdrops - Destination: AzureBlob - storage: azuresdkpartnerdrops - ContainerName: 'drops' - BlobPrefix: 'cosmosdb/csharp/$(BlobVersion)' - - - task: PublishBuildArtifacts@1 - displayName: 'Publish Artifacts: Microsoft.Azure.Cosmos' - inputs: - artifactName: Microsoft.Azure.Cosmos + - ${{ if ne(parameters.BlobVersion, '') }}: + - task: AzureFileCopy@5 + displayName: 'Copy Artifacts to Azure SDK Release blob storage' + condition: succeeded() + inputs: + SourcePath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos/**' + azureSubscription: azuresdkpartnerdrops + Destination: AzureBlob + storage: azuresdkpartnerdrops + ContainerName: 'drops' + BlobPrefix: 'cosmosdb/csharp/${{ parameters.BlobVersion }}' + CleanTargetBeforeCopy: ${{ parameters.CleanupFolder }} - - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0 - displayName: 'Component Detection' + - task: PublishBuildArtifacts@1 + displayName: 'Publish Artifacts: Microsoft.Azure.Cosmos' + inputs: + artifactName: Microsoft.Azure.Cosmos From bfbb43e6b835f921cb17fec0c1f25a84b0430065 Mon Sep 17 00:00:00 2001 From: aavasthy <113193425+aavasthy@users.noreply.github.com> Date: Tue, 18 Apr 2023 07:33:59 -0700 Subject: [PATCH 094/164] [Internal] OpenTelemetry: Direct Package update and replacing diagnostic files (#3797) * Direct Package update and replacing dagnostic files * Resolve merge conflicts * Running updateCOnstracts script * Removed LinqTranslationWithCustomSerializerBaseline file * Adding isDistributedTracingEnabled flag * Running update contracts * Running update contracts * Running update contracts * fix test * Code cleanup for test fix * Code cleanup for test fix * Making regex expression readable * Adding comment for regex expression --------- Co-authored-by: Sourabh Jain --- Directory.Build.props | 2 +- .../ChangeFeedProcessorUserException.cs | 2 +- Microsoft.Azure.Cosmos/src/DocumentClient.cs | 17 +- .../OSS/Azure.Core/AppContextSwitchHelper.cs | 44 -- .../src/OSS/Azure.Core/DiagnosticScope.cs | 664 ------------------ .../OSS/Azure.Core/DiagnosticScopeFactory.cs | 61 -- .../src/Resource/ClientContextCore.cs | 3 +- .../CosmosExceptions/CosmosException.cs | 2 +- .../CosmosNullReferenceException.cs | 2 +- .../CosmosObjectDisposedException.cs | 2 +- .../CosmosOperationCanceledException.cs | 2 +- .../OpenTelemetryCoreRecorder.cs | 2 +- .../OpenTelemetryRecorderFactory.cs | 5 +- ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- ...riterBaselineTests.BulkOperationsAsync.xml | 202 +++--- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 44 +- ...eWriterBaselineTests.MiscellanousAsync.xml | 8 +- ...neTests.PointOperationsExceptionsAsync.xml | 12 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 56 +- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 32 +- ...TraceWriterBaselineTests.ReadManyAsync.xml | 4 +- ...selineTests.StreamPointOperationsAsync.xml | 8 +- ...aselineTests.TypedPointOperationsAsync.xml | 8 +- .../Tracing/AssertActivity.cs | 1 + .../Tracing/CustomListener.cs | 24 +- .../EndToEndTraceWriterBaselineTests.cs | 1 - .../Utils/Util.cs | 6 +- 27 files changed, 235 insertions(+), 981 deletions(-) delete mode 100644 Microsoft.Azure.Cosmos/src/OSS/Azure.Core/AppContextSwitchHelper.cs delete mode 100644 Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScope.cs delete mode 100644 Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScopeFactory.cs diff --git a/Directory.Build.props b/Directory.Build.props index e51eae5f3f..40b25a6e73 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.32.3 3.32.3 preview - 3.30.4 + 3.30.6 2.0.1 2.0.1 preview diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Exceptions/ChangeFeedProcessorUserException.cs b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Exceptions/ChangeFeedProcessorUserException.cs index b62eba6ec7..b3b4f51932 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Exceptions/ChangeFeedProcessorUserException.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeedProcessor/Exceptions/ChangeFeedProcessorUserException.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.Cosmos { using System; using System.Runtime.Serialization; - using global::Azure.Core.Pipeline; + using global::Azure.Core; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Telemetry.Diagnostics; diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index cbd4e06674..451166618d 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -167,6 +167,9 @@ internal partial class DocumentClient : IDisposable, IAuthorizationTokenProvider //RemoteCertificateValidationCallback internal RemoteCertificateValidationCallback remoteCertificateValidationCallback; + //Distributed Tracing Flag + internal bool isDistributedTracingEnabled; + //SessionContainer. internal ISessionContainer sessionContainer; @@ -426,6 +429,7 @@ internal DocumentClient(Uri serviceEndpoint, /// Flag to allow Quorum Read with Eventual Consistency Account /// /// This delegate responsible for validating the third party certificate. + /// This is distributed tracing flag /// /// The service endpoint can be obtained from the Azure Management Portal. /// If you are connecting using one of the Master Keys, these can be obtained along with the endpoint from the Azure Management Portal @@ -452,7 +456,8 @@ internal DocumentClient(Uri serviceEndpoint, IStoreClientFactory storeClientFactory = null, bool isLocalQuorumConsistency = false, string cosmosClientId = null, - RemoteCertificateValidationCallback remoteCertificateValidationCallback = null) + RemoteCertificateValidationCallback remoteCertificateValidationCallback = null, + bool isDistributedTracingEnabled = false) { if (sendingRequestEventArgs != null) { @@ -485,7 +490,8 @@ internal DocumentClient(Uri serviceEndpoint, enableCpuMonitor: enableCpuMonitor, storeClientFactory: storeClientFactory, cosmosClientId: cosmosClientId, - remoteCertificateValidationCallback: remoteCertificateValidationCallback); + remoteCertificateValidationCallback: remoteCertificateValidationCallback, + isDistributedTracingEnabled: isDistributedTracingEnabled); } /// @@ -668,7 +674,8 @@ internal virtual void Initialize(Uri serviceEndpoint, IStoreClientFactory storeClientFactory = null, TokenCredential tokenCredential = null, string cosmosClientId = null, - RemoteCertificateValidationCallback remoteCertificateValidationCallback = null) + RemoteCertificateValidationCallback remoteCertificateValidationCallback = null, + bool isDistributedTracingEnabled = false) { if (serviceEndpoint == null) { @@ -677,6 +684,7 @@ internal virtual void Initialize(Uri serviceEndpoint, this.clientId = cosmosClientId; this.remoteCertificateValidationCallback = remoteCertificateValidationCallback; + this.isDistributedTracingEnabled = isDistributedTracingEnabled; this.queryPartitionProvider = new AsyncLazy(async () => { @@ -6658,7 +6666,8 @@ private void InitializeDirectConnectivity(IStoreClientFactory storeClientFactory enableTcpConnectionEndpointRediscovery: this.ConnectionPolicy.EnableTcpConnectionEndpointRediscovery, addressResolver: this.AddressResolver, rntbdMaxConcurrentOpeningConnectionCount: this.rntbdMaxConcurrentOpeningConnectionCount, - remoteCertificateValidationCallback: this.remoteCertificateValidationCallback ); + remoteCertificateValidationCallback: this.remoteCertificateValidationCallback, + isDistributedTracingEnabled: this.isDistributedTracingEnabled); if (this.transportClientHandlerFactory != null) { diff --git a/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/AppContextSwitchHelper.cs b/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/AppContextSwitchHelper.cs deleted file mode 100644 index d7e25b35c3..0000000000 --- a/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/AppContextSwitchHelper.cs +++ /dev/null @@ -1,44 +0,0 @@ -//------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -//------------------------------------------------------------ - -// This File is copied from Azure.Core repo i.e. https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/src/Shared/AppContextSwitchHelper.cs - -#nullable enable - -namespace Azure.Core -{ - using System; - /// - /// Helper for interacting with AppConfig settings and their related Environment variable settings. - /// - internal static class AppContextSwitchHelper - { - /// - /// Determines if either an AppContext switch or its corresponding Environment Variable is set - /// - /// Name of the AppContext switch. - /// Name of the Environment variable. - /// If the AppContext switch has been set, returns the value of the switch. - /// If the AppContext switch has not been set, returns the value of the environment variable. - /// False if neither is set. - /// - public static bool GetConfigValue(string appContexSwitchName, string environmentVariableName) - { - // First check for the AppContext switch, giving it priority over the environment variable. - if (AppContext.TryGetSwitch(appContexSwitchName, out bool value)) - { - return value; - } - // AppContext switch wasn't used. Check the environment variable. - string? envVar = Environment.GetEnvironmentVariable(environmentVariableName); - if (envVar != null && (envVar.Equals("true", StringComparison.OrdinalIgnoreCase) || envVar.Equals("1"))) - { - return true; - } - - // Default to false. - return false; - } - } -} diff --git a/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScope.cs b/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScope.cs deleted file mode 100644 index ca05f6cabb..0000000000 --- a/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScope.cs +++ /dev/null @@ -1,664 +0,0 @@ -//------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -//------------------------------------------------------------ - -// This File is copied from Azure.Core repo. i.e. https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/src/Shared/DiagnosticScope.cs - -#nullable enable - -namespace Azure.Core.Pipeline -{ - using System; - using System.Collections; - using System.Collections.Concurrent; - using System.Collections.Generic; - using System.Diagnostics; - using System.Globalization; - using System.Linq.Expressions; - using System.Reflection; - - internal readonly struct DiagnosticScope : IDisposable - { - private static readonly ConcurrentDictionary ActivitySources = new (); - - private readonly ActivityAdapter? activityAdapter; - - internal DiagnosticScope(string ns, string scopeName, DiagnosticListener source, ActivityKind kind) - { - object? activitySource = GetActivitySource(ns, scopeName); - - this.IsEnabled = source.IsEnabled() || ActivityExtensions.ActivitySourceHasListeners(activitySource); - - this.activityAdapter = this.IsEnabled ? new ActivityAdapter(activitySource, source, scopeName, kind, null) : null; - } - - internal DiagnosticScope(string scopeName, DiagnosticListener source, object? diagnosticSourceArgs, object? activitySource, ActivityKind kind) - { - this.IsEnabled = source.IsEnabled() || ActivityExtensions.ActivitySourceHasListeners(activitySource); - - this.activityAdapter = this.IsEnabled ? new ActivityAdapter(activitySource, source, scopeName, kind, diagnosticSourceArgs) : null; - } - - public bool IsEnabled { get; } - - /// - /// This method combines client namespace and operation name into an ActivitySource name and creates the activity source. - /// For example: - /// ns: Azure.Storage.Blobs - /// name: BlobClient.DownloadTo - /// result Azure.Storage.Blobs.BlobClient - /// - private static object? GetActivitySource(string ns, string name) - { - if (!ActivityExtensions.SupportsActivitySource()) - { - return null; - } - - int indexOfDot = name.IndexOf(".", StringComparison.OrdinalIgnoreCase); - if (indexOfDot == -1) - { - return null; - } - - string clientName = ns + "." + name.Substring(0, indexOfDot); - - return ActivitySources.GetOrAdd(clientName, static n => ActivityExtensions.CreateActivitySource(n)); - } - - public void AddAttribute(string name, string? value) - { - this.activityAdapter?.AddTag(name, value); - } - - public void AddAttribute(string name, -#if AZURE_NULLABLE - [AllowNull] -#endif - T value) - { - this.AddAttribute(name, value, static v => Convert.ToString(v, CultureInfo.InvariantCulture) ?? string.Empty); - } - - public void AddAttribute(string name, T value, Func format) - { - if (this.activityAdapter != null) - { - var formattedValue = format(value); - this.activityAdapter.AddTag(name, formattedValue); - } - } - - public void AddLink(string traceparent, string tracestate, IDictionary? attributes = null) - { - this.activityAdapter?.AddLink(traceparent, tracestate, attributes); - } - - public void Start() - { - this.activityAdapter?.Start(); - } - - public void SetStartTime(DateTime dateTime) - { - this.activityAdapter?.SetStartTime(dateTime); - } - - public void Dispose() - { - // Reverse the Start order - this.activityAdapter?.Dispose(); - } - - public void Failed(Exception e) - { - this.activityAdapter?.MarkFailed(e); - } - - /// - /// Kind describes the relationship between the Activity, its parents, and its children in a Trace. - /// - public enum ActivityKind - { - /// - /// Default value. - /// Indicates that the Activity represents an internal operation within an application, as opposed to an operations with remote parents or children. - /// - Internal = 0, - - /// - /// Server activity represents request incoming from external component. - /// - Server = 1, - - /// - /// Client activity represents outgoing request to the external component. - /// - Client = 2, - - /// - /// Producer activity represents output provided to external components. - /// - Producer = 3, - - /// - /// Consumer activity represents output received from an external component. - /// - Consumer = 4, - } - - private class DiagnosticActivity : Activity - { -#pragma warning disable 109 // extra new modifier - public new IEnumerable Links { get; set; } = Array.Empty(); -#pragma warning restore 109 - - public DiagnosticActivity(string operationName) - : base(operationName) - { - } - } - - private class ActivityAdapter : IDisposable - { - private readonly DiagnosticSource diagnosticSource; - private readonly object? activitySource; - private readonly string activityName; - private readonly ActivityKind kind; - private object? diagnosticSourceArgs; - - private Activity? currentActivity; - private ICollection>? tagCollection; - private DateTimeOffset startTime; - private List? links; - - public ActivityAdapter(object? activitySource, DiagnosticSource diagnosticSource, string activityName, ActivityKind kind, object? diagnosticSourceArgs) - { - this.activitySource = activitySource; - this.diagnosticSource = diagnosticSource; - this.activityName = activityName; - this.kind = kind; - this.diagnosticSourceArgs = diagnosticSourceArgs; - - switch (this.kind) - { - case ActivityKind.Internal: - this.AddTag("kind", "internal"); - break; - case ActivityKind.Server: - this.AddTag("kind", "server"); - break; - case ActivityKind.Client: - this.AddTag("kind", "client"); - break; - case ActivityKind.Producer: - this.AddTag("kind", "producer"); - break; - case ActivityKind.Consumer: - this.AddTag("kind", "consumer"); - break; - } - } - - public void AddTag(string name, string? value) - { - if (this.currentActivity == null) - { - // Activity is not started yet, add the value to the collection - // that is going to be passed to StartActivity - this.tagCollection ??= ActivityExtensions.CreateTagsCollection() ?? new List>(); - this.tagCollection?.Add(new KeyValuePair(name, value!)); - } - else - { - this.currentActivity?.AddTag(name, value!); - } - } - - private IList? GetActivitySourceLinkCollection() - { - if (this.links == null) - { - return null; - } - - var linkCollection = ActivityExtensions.CreateLinkCollection(); - if (linkCollection == null) - { - return null; - } - - foreach (var activity in this.links) - { - ICollection>? linkTagsCollection = ActivityExtensions.CreateTagsCollection(); - if (linkTagsCollection != null) - { - foreach (var tag in activity.Tags) - { - linkTagsCollection.Add(new KeyValuePair(tag.Key, tag.Value!)); - } - } - - var link = ActivityExtensions.CreateActivityLink(activity.ParentId!, activity.TraceStateString, linkTagsCollection); - if (link != null) - { - linkCollection.Add(link); - } - } - - return linkCollection; - } - - public void AddLink(string traceparent, string tracestate, IDictionary? attributes) - { - var linkedActivity = new Activity("LinkedActivity"); - linkedActivity.SetW3CFormat(); - linkedActivity.SetParentId(traceparent); - linkedActivity.TraceStateString = tracestate; - - if (attributes != null) - { - foreach (var kvp in attributes) - { - linkedActivity.AddTag(kvp.Key, kvp.Value); - } - } - - this.links ??= new List(); - this.links.Add(linkedActivity); - } - - public void Start() - { - this.currentActivity = this.StartActivitySourceActivity(); - - if (this.currentActivity == null) - { - if (!this.diagnosticSource.IsEnabled(this.activityName, this.diagnosticSourceArgs)) - { - return; - } - - this.currentActivity = new DiagnosticActivity(this.activityName) - { - Links = (IEnumerable?)this.links ?? Array.Empty(), - }; - this.currentActivity.SetW3CFormat(); - - if (this.startTime != default) - { - this.currentActivity.SetStartTime(this.startTime.DateTime); - } - - if (this.tagCollection != null) - { - foreach (var tag in this.tagCollection) - { - this.currentActivity.AddTag(tag.Key, (string)tag.Value); - } - } - - this.currentActivity.Start(); - } - - this.diagnosticSource.Write(this.activityName + ".Start", this.diagnosticSourceArgs ?? this.currentActivity); - } - - private Activity? StartActivitySourceActivity() - { - return ActivityExtensions.ActivitySourceStartActivity( - this.activitySource, - this.activityName, - (int)this.kind, - startTime: this.startTime, - tags: this.tagCollection, - links: this.GetActivitySourceLinkCollection()); - } - - public void SetStartTime(DateTime startTime) - { - this.startTime = startTime; - this.currentActivity?.SetStartTime(startTime); - } - - public void MarkFailed(Exception exception) - { - this.diagnosticSource?.Write(this.activityName + ".Exception", exception); - } - - public void Dispose() - { - if (this.currentActivity == null) - { - return; - } - - if (this.currentActivity.Duration == TimeSpan.Zero) - this.currentActivity.SetEndTime(DateTime.UtcNow); - - this.diagnosticSource.Write(this.activityName + ".Stop", this.diagnosticSourceArgs); - - if (!this.currentActivity.TryDispose()) - { - this.currentActivity.Stop(); - } - } - } - } - -#pragma warning disable SA1507 // File can not contain multiple types - /// - /// Until we can reference the 5.0 of System.Diagnostics.DiagnosticSource - /// - internal static class ActivityExtensions - { - static ActivityExtensions() - { - ResetFeatureSwitch(); - } - - private static readonly Type? ActivitySourceType = Type.GetType("System.Diagnostics.ActivitySource, System.Diagnostics.DiagnosticSource"); - private static readonly Type? ActivityKindType = Type.GetType("System.Diagnostics.ActivityKind, System.Diagnostics.DiagnosticSource"); - private static readonly Type? ActivityTagsCollectionType = Type.GetType("System.Diagnostics.ActivityTagsCollection, System.Diagnostics.DiagnosticSource"); - private static readonly Type? ActivityLinkType = Type.GetType("System.Diagnostics.ActivityLink, System.Diagnostics.DiagnosticSource"); - private static readonly Type? ActivityContextType = Type.GetType("System.Diagnostics.ActivityContext, System.Diagnostics.DiagnosticSource"); - - private static readonly ParameterExpression ActivityParameter = Expression.Parameter(typeof(Activity)); - - private static bool SupportsActivitySourceSwitch; - - private static Action? SetIdFormatMethod; - private static Func? GetTraceStateStringMethod; - private static Func? GetIdFormatMethod; - private static Action? ActivityAddTagMethod; - private static Func>?, IList?, DateTimeOffset, Activity?>? ActivitySourceStartActivityMethod; - private static Func? ActivitySourceHasListenersMethod; - private static Func>?, object?>? CreateActivityLinkMethod; - private static Func>?>? CreateTagsCollectionMethod; - - public static void SetW3CFormat(this Activity activity) - { - if (SetIdFormatMethod == null) - { - var method = typeof(Activity).GetMethod("SetIdFormat"); - if (method == null) - { - SetIdFormatMethod = (_, _) => { }; - } - else - { - var idParameter = Expression.Parameter(typeof(int)); - var convertedId = Expression.Convert(idParameter, method.GetParameters()[0].ParameterType); - - SetIdFormatMethod = Expression.Lambda>( - Expression.Call(ActivityParameter, method, convertedId), - ActivityParameter, idParameter).Compile(); - } - } - - SetIdFormatMethod(activity, 2 /* ActivityIdFormat.W3C */); - } - - public static bool IsW3CFormat(this Activity activity) - { - if (GetIdFormatMethod == null) - { - var method = typeof(Activity).GetProperty("IdFormat")?.GetMethod; - if (method == null) - { - GetIdFormatMethod = _ => -1; - } - else - { - GetIdFormatMethod = Expression.Lambda>( - Expression.Convert(Expression.Call(ActivityParameter, method), typeof(int)), - ActivityParameter).Compile(); - } - } - - - int result = GetIdFormatMethod(activity); - - return result == 2 /* ActivityIdFormat.W3C */; - } - - public static string? GetTraceState(this Activity activity) - { - if (GetTraceStateStringMethod == null) - { - var method = typeof(Activity).GetProperty("TraceStateString")?.GetMethod; - if (method == null) - { - GetTraceStateStringMethod = _ => null; - } - else - { - GetTraceStateStringMethod = Expression.Lambda>( - Expression.Call(ActivityParameter, method), - ActivityParameter).Compile(); - } - } - - return GetTraceStateStringMethod(activity); - } - - public static void AddObjectTag(this Activity activity, string name, object value) - { - if (ActivityAddTagMethod == null) - { - var method = typeof(Activity).GetMethod("AddTag", BindingFlags.Instance | BindingFlags.Public, null, new Type[] - { - typeof(string), - typeof(object) - }, null); - - if (method == null) - { - ActivityAddTagMethod = (_, _, _) => { }; - } - else - { - var nameParameter = Expression.Parameter(typeof(string)); - var valueParameter = Expression.Parameter(typeof(object)); - - ActivityAddTagMethod = Expression.Lambda>( - Expression.Call(ActivityParameter, method, nameParameter, valueParameter), - ActivityParameter, nameParameter, valueParameter).Compile(); - } - } - - ActivityAddTagMethod(activity, name, value); - } - - public static bool SupportsActivitySource() - { - return SupportsActivitySourceSwitch && ActivitySourceType != null; - } - - public static ICollection>? CreateTagsCollection() - { - if (CreateTagsCollectionMethod == null) - { - var ctor = ActivityTagsCollectionType?.GetConstructor(Array.Empty()); - if (ctor == null) - { - CreateTagsCollectionMethod = () => null; - } - else - { - CreateTagsCollectionMethod = Expression.Lambda>?>>( - Expression.New(ctor)).Compile(); - } - } - - return CreateTagsCollectionMethod(); - } - - public static object? CreateActivityLink(string traceparent, string? tracestate, ICollection>? tags) - { - if (ActivityLinkType == null) - { - return null; - } - - if (CreateActivityLinkMethod == null) - { - var parseMethod = ActivityContextType?.GetMethod("Parse", BindingFlags.Static | BindingFlags.Public); - var ctor = ActivityLinkType?.GetConstructor(new[] { ActivityContextType!, ActivityTagsCollectionType! }); - - if (parseMethod == null || - ctor == null || - ActivityTagsCollectionType == null || - ActivityContextType == null) - { - CreateActivityLinkMethod = (_, _, _) => null; - } - else - { - var traceparentParameter = Expression.Parameter(typeof(string)); - var tracestateParameter = Expression.Parameter(typeof(string)); - var tagsParameter = Expression.Parameter(typeof(ICollection>)); - - CreateActivityLinkMethod = Expression.Lambda>?, object?>>( - Expression.TryCatch( - Expression.Convert(Expression.New(ctor, - Expression.Call(parseMethod, traceparentParameter, tracestateParameter), - Expression.Convert(tagsParameter, ActivityTagsCollectionType)), typeof(object)), - Expression.Catch(typeof(Exception), Expression.Default(typeof(object)))), - traceparentParameter, tracestateParameter, tagsParameter).Compile(); - } - } - - return CreateActivityLinkMethod(traceparent, tracestate, tags); - } - - public static bool ActivitySourceHasListeners(object? activitySource) - { - if (!SupportsActivitySource()) - { - return false; - } - - if (activitySource == null) - { - return false; - } - - if (ActivitySourceHasListenersMethod == null) - { - var method = ActivitySourceType?.GetMethod("HasListeners", BindingFlags.Instance | BindingFlags.Public); - if (method == null || - ActivitySourceType == null) - { - ActivitySourceHasListenersMethod = _ => false; - } - else - { - var sourceParameter = Expression.Parameter(typeof(object)); - ActivitySourceHasListenersMethod = Expression.Lambda>( - Expression.Call(Expression.Convert(sourceParameter, ActivitySourceType), method), - sourceParameter).Compile(); - } - } - - return ActivitySourceHasListenersMethod.Invoke(activitySource); - } - - public static Activity? ActivitySourceStartActivity(object? activitySource, string activityName, int kind, DateTimeOffset startTime, ICollection>? tags, IList? links) - { - if (activitySource == null) - { - return null; - } - - if (ActivitySourceStartActivityMethod == null) - { - if (ActivityLinkType == null || - ActivitySourceType == null || - ActivityContextType == null || - ActivityKindType == null) - { - ActivitySourceStartActivityMethod = (_, _, _, _, _, _) => null; - } - else - { - var method = ActivitySourceType?.GetMethod("StartActivity", BindingFlags.Instance | BindingFlags.Public, null, new[] - { - typeof(string), - ActivityKindType, - ActivityContextType, - typeof(IEnumerable>), - typeof(IEnumerable<>).MakeGenericType(ActivityLinkType), - typeof(DateTimeOffset) - }, null); - - if (method == null) - { - ActivitySourceStartActivityMethod = (_, _, _, _, _, _) => null; - } - else - { - var sourceParameter = Expression.Parameter(typeof(object)); - var nameParameter = Expression.Parameter(typeof(string)); - var kindParameter = Expression.Parameter(typeof(int)); - var startTimeParameter = Expression.Parameter(typeof(DateTimeOffset)); - var tagsParameter = Expression.Parameter(typeof(ICollection>)); - var linksParameter = Expression.Parameter(typeof(IList)); - var methodParameter = method.GetParameters(); - ActivitySourceStartActivityMethod = Expression.Lambda>?, IList?, DateTimeOffset, Activity?>>( - Expression.Call( - Expression.Convert(sourceParameter, method.DeclaringType!), - method, - nameParameter, - Expression.Convert(kindParameter, methodParameter[1].ParameterType), - Expression.Default(ActivityContextType), - Expression.Convert(tagsParameter, methodParameter[3].ParameterType), - Expression.Convert(linksParameter, methodParameter[4].ParameterType), - Expression.Convert(startTimeParameter, methodParameter[5].ParameterType)), - sourceParameter, nameParameter, kindParameter, tagsParameter, linksParameter, startTimeParameter).Compile(); - } - } - } - - return ActivitySourceStartActivityMethod.Invoke(activitySource, activityName, kind, tags, links, startTime); - } - - public static object? CreateActivitySource(string name) - { - if (ActivitySourceType == null) - { - return null; - } - return Activator.CreateInstance(ActivitySourceType, - name, // name - null); // version - } - - public static IList? CreateLinkCollection() - { - if (ActivityLinkType == null) - { - return null; - } - return Activator.CreateInstance(typeof(List<>).MakeGenericType(ActivityLinkType)) as IList; - } - - public static bool TryDispose(this Activity activity) - { - if (activity is IDisposable disposable) - { - disposable.Dispose(); - return true; - } - - return false; - } - - public static void ResetFeatureSwitch() - { - SupportsActivitySourceSwitch = AppContextSwitchHelper.GetConfigValue( - "Azure.Experimental.EnableActivitySource", - "AZURE_EXPERIMENTAL_ENABLE_ACTIVITY_SOURCE"); - } - } -} diff --git a/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScopeFactory.cs b/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScopeFactory.cs deleted file mode 100644 index 2cddf70d21..0000000000 --- a/Microsoft.Azure.Cosmos/src/OSS/Azure.Core/DiagnosticScopeFactory.cs +++ /dev/null @@ -1,61 +0,0 @@ -//------------------------------------------------------------ -// Copyright (c) Microsoft Corporation. All rights reserved. -//------------------------------------------------------------ - -// This File is copied from Azure.Core repo. i.e. https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/core/Azure.Core/src/Shared/DiagnosticScopeFactory.cs - -#nullable enable - -namespace Azure.Core.Pipeline -{ - using System.Collections.Generic; - using System.Diagnostics; - using System.Threading; - -#pragma warning disable CA1001 // Types that own disposable fields should be disposable - internal class DiagnosticScopeFactory -#pragma warning restore CA1001 // Types that own disposable fields should be disposable - { - private static Dictionary? listeners; - private readonly string? resourceProviderNamespace; - private readonly DiagnosticListener? source; - - public DiagnosticScopeFactory(string clientNamespace, string? resourceProviderNamespace, bool isActivityEnabled) - { - this.resourceProviderNamespace = resourceProviderNamespace; - this.IsActivityEnabled = isActivityEnabled; - if (this.IsActivityEnabled) - { -#pragma warning disable CS8601 // Possible null reference assignment. - var listeners = LazyInitializer.EnsureInitialized>(ref DiagnosticScopeFactory.listeners); -#pragma warning restore CS8601 // Possible null reference assignment. - - lock (listeners!) - { - if (!listeners.TryGetValue(clientNamespace, out this.source)) - { - this.source = new DiagnosticListener(clientNamespace); - listeners[clientNamespace] = this.source; - } - } - } - } - - public bool IsActivityEnabled { get; } - - public DiagnosticScope CreateScope(string name, DiagnosticScope.ActivityKind kind = DiagnosticScope.ActivityKind.Client) - { - if (this.source == null) - { - return default; - } - var scope = new DiagnosticScope(this.source.Name, name, this.source, kind); - - if (this.resourceProviderNamespace != null) - { - scope.AddAttribute("az.namespace", this.resourceProviderNamespace); - } - return scope; - } - } -} diff --git a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs index a9c475615a..d16d1c8bcc 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs @@ -83,7 +83,8 @@ internal static CosmosClientContext Create( handler: httpMessageHandler, sessionContainer: clientOptions.SessionContainer, cosmosClientId: cosmosClient.Id, - remoteCertificateValidationCallback: ClientContextCore.SslCustomValidationCallBack(clientOptions.ServerCertificateCustomValidationCallback)); + remoteCertificateValidationCallback: ClientContextCore.SslCustomValidationCallBack(clientOptions.ServerCertificateCustomValidationCallback), + isDistributedTracingEnabled: clientOptions.IsDistributedTracingEnabled); return ClientContextCore.Create( cosmosClient, diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs index 12db379f0c..9d0856507e 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosException.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos using System; using System.Net; using System.Text; - using global::Azure.Core.Pipeline; + using global::Azure.Core; using Microsoft.Azure.Cosmos.Diagnostics; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tracing; diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs index 4e7aa73f54..cbee4c59ec 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosNullReferenceException.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.Cosmos { using System; using System.Collections; - using global::Azure.Core.Pipeline; + using global::Azure.Core; using Microsoft.Azure.Cosmos.Diagnostics; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tracing; diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosObjectDisposedException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosObjectDisposedException.cs index 64d5018f60..c6f097355d 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosObjectDisposedException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosObjectDisposedException.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos using System; using System.Collections; using System.Globalization; - using global::Azure.Core.Pipeline; + using global::Azure.Core; using Microsoft.Azure.Cosmos.Diagnostics; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tracing; diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosOperationCanceledException.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosOperationCanceledException.cs index e21843656a..010d968bd0 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosOperationCanceledException.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosExceptions/CosmosOperationCanceledException.cs @@ -7,7 +7,7 @@ namespace Microsoft.Azure.Cosmos using System; using System.Collections; using System.Runtime.Serialization; - using global::Azure.Core.Pipeline; + using global::Azure.Core; using Microsoft.Azure.Cosmos.Diagnostics; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tracing; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index 51aa1ee794..c199c0727c 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; using System.Collections.Generic; - using global::Azure.Core.Pipeline; + using global::Azure.Core; /// /// This class is used to add information in an Activity tags ref. https://github.com/Azure/azure-cosmos-dotnet-v3/issues/3058 diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index 6c88b3d5db..51b4666b6f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -5,7 +5,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; - using global::Azure.Core.Pipeline; + using global::Azure.Core; /// /// This class is used to generate Activities with Azure.Cosmos.Operation Source Name @@ -28,7 +28,8 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, { OpenTelemetryRecorderFactory.ScopeFactory ??= new DiagnosticScopeFactory(clientNamespace: OpenTelemetryAttributeKeys.DiagnosticNamespace, resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, - isActivityEnabled: true); + isActivityEnabled: true, + suppressNestedClientActivities: true); // If there is no source then it will return default otherwise a valid diagnostic scope DiagnosticScope scope = OpenTelemetryRecorderFactory diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index ad1a3f1288..90f32b89c9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -129,7 +129,7 @@ } ] }]]> - Operation.ExecuteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeBatchdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ExecuteAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeBatchdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index 09d8c3ce63..b776a8eaae 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -153,16 +153,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -311,16 +311,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -469,16 +469,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -627,16 +627,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -785,16 +785,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -943,16 +943,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1101,16 +1101,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1259,16 +1259,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1417,16 +1417,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1575,16 +1575,16 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2324,7 +2324,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 2e20bceb1c..4189b4bab8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -952,11 +952,11 @@ } ] }]]> - Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1569,11 +1569,11 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2167,11 +2167,11 @@ } ] }]]> - Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2785,11 +2785,11 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3066,9 +3066,7 @@ } ] }]]> - Operation.Change Feed Estimator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. + Operation.Change Feed Estimator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 348925a1f6..591a6af4ac 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -107,8 +107,8 @@ } ] }]]> - Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.DeleteAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -207,8 +207,8 @@ } ] }]]> - Operation.DeleteAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted + Operation.DeleteAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted +Operation.CreateDatabaseAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index a8b686d679..64e7e0c3ed 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -148,7 +148,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -390,7 +390,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -615,7 +615,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -872,7 +872,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1193,7 +1193,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1347,7 +1347,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 18aa6d67d8..d2abebc194 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -574,10 +574,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1180,10 +1180,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1767,10 +1767,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2374,10 +2374,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3048,10 +3048,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -3644,10 +3644,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -4260,10 +4260,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 1ceef081c6..dc6df3eacf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -536,10 +536,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1104,10 +1104,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1653,10 +1653,10 @@ } ] }]]> - Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -2222,10 +2222,10 @@ } ] }]]> - Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US +Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index a7cc47631a..29b36304ec 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -542,7 +542,7 @@ } ] }]]> - Operation.ReadManyItemsStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadManyItemsStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -1102,7 +1102,7 @@ } ] }]]> - Operation.ReadManyItemsAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadManyItemsAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index f0dec5b7bd..18f11acd62 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -89,7 +89,7 @@ } ] }]]> - Operation.CreateItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.CreateItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -178,7 +178,7 @@ } ] }]]> - Operation.ReadItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -275,7 +275,7 @@ } ] }]]> - Operation.ReplaceItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReplaceItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -367,7 +367,7 @@ } ] }]]> - Operation.DeleteItemStreamAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.DeleteItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index 6b57caad95..abeaa41de8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -109,7 +109,7 @@ } ] }]]> - Operation.CreateItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -203,7 +203,7 @@ } ] }]]> - Operation.ReadItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReadItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -310,7 +310,7 @@ } ] }]]> - Operation.ReplaceItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.ReplaceItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. @@ -406,7 +406,7 @@ } ] }]]> - Operation.DeleteItemAsynckindclientaz.namespaceMicrosoft.DocumentDBdb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US + Operation.DeleteItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index c46d8b035a..f4983c10a7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -32,6 +32,7 @@ public static void IsValid(Activity activity) IList expectedTags = new List { "az.namespace", + "az.schema_url", "kind", "db.system", "db.name", diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 1f192bb086..5f98a6191a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -33,15 +33,27 @@ internal class CustomListener : public static ConcurrentBag CollectedActivities { private set; get; } = new(); private static ConcurrentBag CollectedEvents { set; get; } = new(); + private string SourceType { set; get; } + + // Regex is used to match string 'n' against diagnosticNameSpace string + // which is constructed by combining first two parts of name. + // Eg: Azure.Cosmos.Operation where diagnosticNameSpace is Azure.Cosmos and Operation is the sourceType public CustomListener(string name, string eventName) - : this(n => Regex.Match(n, name).Success, eventName) + : this(n => + { + string[] nameParts = name.Split("."); + string diagnosticNameSpace = $"{nameParts[0]}.{nameParts[1]}"; + return Regex.Match(n, diagnosticNameSpace).Success; + }, name.Split(".")[2], eventName) + { } - public CustomListener(Func filter, string eventName) + public CustomListener(Func filter, string sourceType, string eventName) { this.sourceNameFilter = filter; this.eventName = eventName; + this.SourceType = sourceType; DiagnosticListener.AllListeners.Subscribe(this); } @@ -76,6 +88,11 @@ public void OnNext(KeyValuePair value) string stopSuffix = ".Stop"; string exceptionSuffix = ".Exception"; + if(!this.SourceType.Contains("*") && !Activity.Current.OperationName.Contains(this.SourceType)) + { + return; + } + if (value.Key.EndsWith(startSuffix)) { string name = value.Key[..^startSuffix.Length]; @@ -89,7 +106,6 @@ public void OnNext(KeyValuePair value) Links = links.Select(a => new ProducedLink(a.ParentId, a.TraceStateString)).ToList(), LinkedActivities = links.ToList() }; - this.Scopes.Add(scope); } else if (value.Key.EndsWith(stopSuffix)) @@ -100,7 +116,6 @@ public void OnNext(KeyValuePair value) if (producedDiagnosticScope.Activity.Id == Activity.Current.Id) { AssertActivity.IsValid(producedDiagnosticScope.Activity); - CustomListener.CollectedActivities.Add(producedDiagnosticScope.Activity); producedDiagnosticScope.IsCompleted = true; @@ -120,7 +135,6 @@ public void OnNext(KeyValuePair value) { throw new InvalidOperationException("Scope should not be stopped when calling Failed"); } - producedDiagnosticScope.Exception = (Exception)value.Value; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index e14188d92a..ba7e828edf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -24,7 +24,6 @@ namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; using static Microsoft.Azure.Cosmos.SDK.EmulatorTests.TransportClientHelper; - using AzureCore = global::Azure.Core.Pipeline; [VisualStudio.TestTools.UnitTesting.TestClass] [TestCategory("UpdateContract")] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index 96254aca79..59172beb33 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using Microsoft.VisualStudio.TestTools.UnitTesting; using OpenTelemetry; using OpenTelemetry.Trace; - using AzureCore = global::Azure.Core.Pipeline; + using AzureCore = global::Azure.Core; internal enum DocumentClientType { @@ -548,11 +548,11 @@ internal static CustomListener ConfigureOpenTelemetryAndCustomListeners() // Open Telemetry Listener Util.OTelTracerProvider = Sdk.CreateTracerProviderBuilder() .AddCustomOtelExporter() // use any exporter here - .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*") // Right now, it will capture only "Azure.Cosmos.Operation" + .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation") // Right now, it will capture only "Azure.Cosmos.Operation" .Build(); // Custom Listener - Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*", "Azure-Cosmos-Operation-Request-Diagnostics"); + Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", "Azure-Cosmos-Operation-Request-Diagnostics"); return Util.TestListener; From f94869a83016dac97adb315d3ec23bca874e60bc Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Tue, 18 Apr 2023 11:29:19 -0700 Subject: [PATCH 095/164] [Internal] MerlinBot: Adds auto-merge and cleanup automation (#3813) * Add config changes * Polishing automerge config --- .github/fabricbot.json | 75 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/.github/fabricbot.json b/.github/fabricbot.json index 90924da0c3..67aa59fa46 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -102,6 +102,81 @@ } ] } + }, + { + "taskType": "trigger", + "capabilityId": "AutoMerge", + "subCapability": "AutoMerge", + "version": "1.0", + "config": { + "taskName": "PR Automerge", + "allowAutoMergeInstructionsWithoutLabel": false, + "mergeType": "squash", + "deleteBranches": true, + "removeLabelOnPush": true, + "label": "auto-merge", + "requireAllStatuses": false, + "requireSpecificCheckRuns": false, + "usePrDescriptionAsCommitMessage": false, + "minMinutesOpen": "60", + "enforceDMPAsStatus": true + } + }, + { + "taskType": "scheduled", + "capabilityId": "ScheduledSearch", + "subCapability": "ScheduledSearch", + "version": "1.1", + "config": { + "frequency": [ + { + "weekDay": 1, + "hours": [ + 9 + ], + "timezoneOffset": -7 + } + ], + "searchTerms": [ + { + "name": "isOpen", + "parameters": {} + }, + { + "name": "isIssue", + "parameters": {} + }, + { + "name": "hasLabel", + "parameters": { + "label": "needs-more-information" + } + }, + { + "name": "noActivitySince", + "parameters": { + "days": 14 + } + }, + { + "name": "noAssignees", + "parameters": {} + } + ], + "taskName": "Close inactive needs-information", + "actions": [ + { + "name": "addReply", + "parameters": { + "comment": "${issueAuthor} this issue requires more information for the team to be able to help. In case this information is available, please add it and re-open the Issue." + } + }, + { + "name": "closeIssue", + "parameters": {} + } + ] + } } ], "userGroups": [] From afd5904eef28e9d9c3d8d2615192b3a43a4ee5da Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Mon, 24 Apr 2023 13:54:19 -0700 Subject: [PATCH 096/164] Update fabricbot.json (#3824) --- .github/fabricbot.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/fabricbot.json b/.github/fabricbot.json index 67aa59fa46..e400139553 100644 --- a/.github/fabricbot.json +++ b/.github/fabricbot.json @@ -168,7 +168,7 @@ { "name": "addReply", "parameters": { - "comment": "${issueAuthor} this issue requires more information for the team to be able to help. In case this information is available, please add it and re-open the Issue." + "comment": "@${issueAuthor} this issue requires more information for the team to be able to help. In case this information is available, please add it and re-open the Issue." } }, { @@ -180,4 +180,4 @@ } ], "userGroups": [] -} \ No newline at end of file +} From fb80ba8eb2a219fb6c8ce14b601d4153d0f71457 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Tue, 25 Apr 2023 04:42:16 +0530 Subject: [PATCH 097/164] [Internal] Upgrade Resiliency: Adds Logic to Validate `Unknown` Replicas along with `Unhealthy`. (#3820) * Code changes to add aggressive validation logic. * Code changes to enable aggressive validation for all regions. * Code changes to pull in msdata cosmos.direct changes related to aggresive validation logic. * Code changes to make minor cosmetic changes. * Code changes to address review comments. --- Directory.Build.props | 2 +- .../src/Routing/GatewayAddressCache.cs | 37 +++- .../GatewayAddressCacheTests.cs | 200 ++++++++++-------- 3 files changed, 134 insertions(+), 105 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 40b25a6e73..695ad7c92c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.32.3 3.32.3 preview - 3.30.6 + 3.30.8 2.0.1 2.0.1 preview diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index eba425fb0d..d99be609ea 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -549,7 +549,7 @@ await this.GetServerAddressesViaGatewayAsync(request, collectionRid, new[] { par } } - this.ValidateUnhealthyPendingReplicas(transportAddressUris); + this.ValidateReplicaAddresses(transportAddressUris); return mergedAddresses; } @@ -840,12 +840,12 @@ await this.GetServerAddressesViaGatewayAsync( } /// - /// Validates the unhealthy pending replicas by attempting to open the Rntbd connection. This operation - /// will eventually marks the unhealthy pending replicas to healthy, if the rntbd connection attempt made was + /// Validates the unknown or unhealthy-pending replicas by attempting to open the Rntbd connection. This operation + /// will eventually marks the unknown or unhealthy-pending replicas to healthy, if the rntbd connection attempt made was /// successful or unhealthy otherwise. /// /// A read-only list of needs to be validated. - private void ValidateUnhealthyPendingReplicas( + private void ValidateReplicaAddresses( IReadOnlyList addresses) { if (addresses == null) @@ -853,15 +853,13 @@ private void ValidateUnhealthyPendingReplicas( throw new ArgumentNullException(nameof(addresses)); } - IEnumerable addressesNeedToValidation = addresses - .Where(address => address - .GetCurrentHealthState() - .GetHealthStatus() == TransportAddressHealthState.HealthStatus.UnhealthyPending); + IEnumerable addressesNeedToValidateStatus = this.GetAddressesNeededToValidateStatus( + transportAddresses: addresses); - if (addressesNeedToValidation.Any()) + if (addressesNeedToValidateStatus.Any()) { Task openConnectionsInBackgroundTask = Task.Run(async () => await this.openConnectionsHandler.TryOpenRntbdChannelsAsync( - addresses: addressesNeedToValidation.ToList())); + addresses: addressesNeedToValidateStatus)); } } @@ -919,6 +917,25 @@ private static PartitionAddressInformation MergeAddresses( return newAddresses; } + /// + /// Returns a list of needed to validate their health status. Validating + /// a uri is done by opening Rntbd connection to the backend replica, which is a costly operation by nature. Therefore + /// vaidating both Unhealthy and Unknown replicas at the same time could impose a high CPU utilization. To avoid this + /// situation, the RntbdOpenConnectionHandler has good concurrency control mechanism to open the connections gracefully/>. + /// + /// A read only list of s. + /// A list of that needs to validate their status. + private IEnumerable GetAddressesNeededToValidateStatus( + IReadOnlyList transportAddresses) + { + return transportAddresses + .Where(address => address + .GetCurrentHealthState() + .GetHealthStatus() is + TransportAddressHealthState.HealthStatus.Unknown or + TransportAddressHealthState.HealthStatus.UnhealthyPending); + } + protected virtual void Dispose(bool disposing) { if (this.disposedValue) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 809814aef1..2d0d0a5c6a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -379,10 +379,10 @@ await cache.OpenConnectionsAsync( // Assert. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: 3, - expectedSuccessCount: 3); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 1, + expectedTotalReceivedAddressesCount: 3, + expectedTotalSuccessAddressesToOpenCount: 3); } /// @@ -425,10 +425,10 @@ await cache.OpenConnectionsAsync( // Assert. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 3, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: 3, - expectedSuccessCount: 0); + expectedTotalFailedAddressesToOpenCount: 3, + expectedTotalHandlerInvocationCount: 1, + expectedTotalReceivedAddressesCount: 3, + expectedTotalSuccessAddressesToOpenCount: 0); } /// @@ -474,10 +474,10 @@ await cache.OpenConnectionsAsync( // Assert. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 0, - expectedReceivedAddressesCount: 0, - expectedSuccessCount: 0); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 0, + expectedTotalReceivedAddressesCount: 0, + expectedTotalSuccessAddressesToOpenCount: 0); } /// @@ -552,10 +552,10 @@ await globalAddressResolver.OpenConnectionsToAllReplicasAsync( // Assert. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: 3, - expectedSuccessCount: 3); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 1, + expectedTotalReceivedAddressesCount: 3, + expectedTotalSuccessAddressesToOpenCount: 3); } /// @@ -630,10 +630,10 @@ await globalAddressResolver.OpenConnectionsToAllReplicasAsync( // Assert. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 2, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: 3, - expectedSuccessCount: 1); + expectedTotalFailedAddressesToOpenCount: 2, + expectedTotalHandlerInvocationCount: 1, + expectedTotalReceivedAddressesCount: 3, + expectedTotalSuccessAddressesToOpenCount: 1); } /// @@ -721,10 +721,10 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenIn Assert.AreEqual(exceptionMessage, ex.Message); GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 0, - expectedReceivedAddressesCount: 0, - expectedSuccessCount: 0); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 0, + expectedTotalReceivedAddressesCount: 0, + expectedTotalSuccessAddressesToOpenCount: 0); } /// @@ -797,10 +797,10 @@ public async Task GlobalAddressResolver_OpenConnectionsToAllReplicasAsync_WhenNu Assert.IsTrue(ce.Message.Contains("Could not resolve the collection")); GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 0, - expectedReceivedAddressesCount: 0, - expectedSuccessCount: 0); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 0, + expectedTotalReceivedAddressesCount: 0, + expectedTotalSuccessAddressesToOpenCount: 0); } /// @@ -879,10 +879,10 @@ await cache.OpenConnectionsAsync( // Assert. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: addresses.Count, - expectedSuccessCount: addresses.Count); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 1, + expectedTotalReceivedAddressesCount: addresses.Count, + expectedTotalSuccessAddressesToOpenCount: addresses.Count); } /// @@ -960,9 +960,15 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidat .ReplicaTransportAddressUris .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + // Waits until a completion signal from the background task is received. + GatewayAddressCacheTests.WaitForManualResetEventSignal( + manualResetEvent: manualResetEvent, + shouldReset: true); + + // Because the Unknown Replicas are now validated aggresively, the health status should be marked as connected. Assert.IsNotNull(refreshedUri); Assert.AreEqual( - expected: TransportAddressHealthState.HealthStatus.Unknown, + expected: TransportAddressHealthState.HealthStatus.Connected, actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); Assert.AreEqual(4, addressInfo.AllAddresses.Count); @@ -1004,10 +1010,10 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidat mockHttpHandler.VerifyAll(); GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: 1, - expectedSuccessCount: 1); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 2, + expectedTotalReceivedAddressesCount: 6, + expectedTotalSuccessAddressesToOpenCount: 6); } /// @@ -1053,7 +1059,7 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr FakeOpenConnectionHandler fakeOpenConnectionHandler = new ( failIndexesByAttempts: new Dictionary>() { - { 0, new HashSet() { 0 } } + { 0, new HashSet() { 1 } } }, manualResetEvent: manualResetEvent); @@ -1095,9 +1101,22 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr .ReplicaTransportAddressUris .Single(x => x.ToString().Equals(addressTobeMarkedUnhealthy)); + // Waits until a completion signal from the background task is received. + GatewayAddressCacheTests.WaitForManualResetEventSignal( + manualResetEvent: manualResetEvent, + shouldReset: true); + + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 1, + expectedTotalReceivedAddressesCount: 4, + expectedTotalSuccessAddressesToOpenCount: 4); + + // Because the Unknown Replicas are now validated aggresively, the health status should be marked as connected. Assert.IsNotNull(refreshedUri); Assert.AreEqual( - expected: TransportAddressHealthState.HealthStatus.Unknown, + expected: TransportAddressHealthState.HealthStatus.Connected, actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); Assert.AreEqual(4, addressInfo.AllAddresses.Count); @@ -1140,10 +1159,10 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 1, - expectedMethodInvocationCount: 1, - expectedReceivedAddressesCount: 1, - expectedSuccessCount: 0); + expectedTotalFailedAddressesToOpenCount: 1, + expectedTotalHandlerInvocationCount: 2, + expectedTotalReceivedAddressesCount: 6, + expectedTotalSuccessAddressesToOpenCount: 5); // A delay of 2 minute was added to make the replica unhealthy for more than one minute. This // will make sure the unhealthy replica gets a chance to re-validate it's health status. @@ -1167,10 +1186,10 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr Assert.AreEqual(4, addressInfo.AllAddresses.Count); GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 1, - expectedMethodInvocationCount: 2, - expectedReceivedAddressesCount: 1, - expectedSuccessCount: 1); + expectedTotalFailedAddressesToOpenCount: 1, + expectedTotalHandlerInvocationCount: 3, + expectedTotalReceivedAddressesCount: 7, + expectedTotalSuccessAddressesToOpenCount: 6); addressInfo = await cache.TryGetAddressesAsync( request: request, @@ -1194,13 +1213,13 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); // This assertion makes sure that no additional calls were made to the open connection handler after - // since the last address refresh, because all the replicas are now either Unknown or Connected. + // since the last address refresh, because all the replicas at this point should be Connected. GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 1, - expectedMethodInvocationCount: 2, - expectedReceivedAddressesCount: 1, - expectedSuccessCount: 1); + expectedTotalFailedAddressesToOpenCount: 1, + expectedTotalHandlerInvocationCount: 3, + expectedTotalReceivedAddressesCount: 7, + expectedTotalSuccessAddressesToOpenCount: 6); } /// @@ -1290,10 +1309,10 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationDisabled_ShouldNotVal mockHttpHandler.VerifyAll(); GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, - expectedExceptionCount: 0, - expectedMethodInvocationCount: 0, - expectedReceivedAddressesCount: 0, - expectedSuccessCount: 0); + expectedTotalFailedAddressesToOpenCount: 0, + expectedTotalHandlerInvocationCount: 0, + expectedTotalReceivedAddressesCount: 0, + expectedTotalSuccessAddressesToOpenCount: 0); } /// @@ -1320,21 +1339,21 @@ private static void WaitForManualResetEventSignal( /// to match with that of the expected ones. /// /// An instance of the . - /// The expected exception count for the test. - /// The expected method invocation count for the test. - /// The expected received addresses count for the test. - /// The expected successful messages count for the test. + /// The expected total addresses count that are supposed to fail while opening connection for the scenario. + /// The expected total open connection handler method invocation count for the scenario. + /// The expected total received addresses count for the scenario. + /// The expected total addresses count that are supposed to succeed while opening connection for the scenario. private static void AssertOpenConnectionHandlerAttributes( FakeOpenConnectionHandler fakeOpenConnectionHandler, - int expectedExceptionCount, - int expectedMethodInvocationCount, - int expectedReceivedAddressesCount, - int expectedSuccessCount) + int expectedTotalFailedAddressesToOpenCount, + int expectedTotalHandlerInvocationCount, + int expectedTotalReceivedAddressesCount, + int expectedTotalSuccessAddressesToOpenCount) { - Assert.AreEqual(expectedExceptionCount, fakeOpenConnectionHandler.GetExceptionCount()); - Assert.AreEqual(expectedMethodInvocationCount, fakeOpenConnectionHandler.GetMethodInvocationCount()); - Assert.AreEqual(expectedReceivedAddressesCount, fakeOpenConnectionHandler.GetReceivedAddressesCount()); - Assert.AreEqual(expectedSuccessCount, fakeOpenConnectionHandler.GetSuccessfulInvocationCount()); + Assert.AreEqual(expectedTotalFailedAddressesToOpenCount, fakeOpenConnectionHandler.GetTotalExceptionCount()); + Assert.AreEqual(expectedTotalHandlerInvocationCount, fakeOpenConnectionHandler.GetTotalMethodInvocationCount()); + Assert.AreEqual(expectedTotalReceivedAddressesCount, fakeOpenConnectionHandler.GetTotalReceivedAddressesCount()); + Assert.AreEqual(expectedTotalSuccessAddressesToOpenCount, fakeOpenConnectionHandler.GetTotalSuccessfulInvocationCount()); } private class FakeMessageHandler : HttpMessageHandler @@ -1451,22 +1470,22 @@ public FakeOpenConnectionHandler( this.manualResetEvent = manualResetEvent; } - public int GetSuccessfulInvocationCount() + public int GetTotalSuccessfulInvocationCount() { return this.successInvocationCounter; } - public int GetExceptionCount() + public int GetTotalExceptionCount() { return this.exceptionCounter; } - public int GetReceivedAddressesCount() + public int GetTotalReceivedAddressesCount() { return this.totalReceivedAddressesCounter; } - public int GetMethodInvocationCount() + public int GetTotalMethodInvocationCount() { return this.methodInvocationCounter; } @@ -1474,39 +1493,34 @@ public int GetMethodInvocationCount() Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( IEnumerable addresses) { - this.totalReceivedAddressesCounter = addresses.Count(); - for (int i = 0; i < addresses.Count(); i++) + int idx = 0; + this.totalReceivedAddressesCounter += addresses.Count(); + foreach (TransportAddressUri transportAddress in addresses) { if (this.useAttemptBasedFailingIndexs) { - if (this.failIndexesByAttempts.ContainsKey(i) && this.failIndexesByAttempts[i].Contains(this.methodInvocationCounter)) + if (this.failIndexesByAttempts.ContainsKey(idx) && this.failIndexesByAttempts[idx].Contains(this.methodInvocationCounter)) { - this.ExecuteFailureCondition( - addresses: addresses.ToList(), - index: i); + this.ExecuteFailureCondition(transportAddress); } else { - this.ExecuteSuccessCondition( - addresses: addresses.ToList(), - index: i); + this.ExecuteSuccessCondition(transportAddress); } } else { - if (this.failingIndexes.Contains(i)) + if (this.failingIndexes.Contains(idx)) { - this.ExecuteFailureCondition( - addresses: addresses.ToList(), - index: i); + this.ExecuteFailureCondition(transportAddress); } else { - this.ExecuteSuccessCondition( - addresses: addresses.ToList(), - index: i); + this.ExecuteSuccessCondition(transportAddress); } } + + idx++; } this.methodInvocationCounter++; @@ -1515,18 +1529,16 @@ Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( } private void ExecuteSuccessCondition( - IReadOnlyList addresses, - int index) + TransportAddressUri address) { - addresses[index].SetConnected(); + address.SetConnected(); this.successInvocationCounter++; } private void ExecuteFailureCondition( - IReadOnlyList addresses, - int index) + TransportAddressUri address) { - addresses[index].SetUnhealthy(); + address.SetUnhealthy(); this.exceptionCounter++; } } From 5d4f7c152edcc5671ca5da71818eeb73c84f6ca3 Mon Sep 17 00:00:00 2001 From: Baltima <130716409+Baltima@users.noreply.github.com> Date: Tue, 25 Apr 2023 21:19:33 +0300 Subject: [PATCH 098/164] Serialization: Fixes call to CosmosSerializer.FromStream on Gateway mode when EnableContentResponseOnWrite is false (#3814) * Do not call serializer if ResponseMessage.Content is empty. * Add unit test * Update unit tests * Remove unused usings --------- Co-authored-by: Matias Quaranta --- .../src/Resource/CosmosResponseFactoryCore.cs | 6 ++ ...ts.cs => CosmosJsonSerializerUnitTests.cs} | 90 ++++++++++++------- 2 files changed, 66 insertions(+), 30 deletions(-) rename Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/{CosmosJsonSeriliazerUnitTests.cs => CosmosJsonSerializerUnitTests.cs} (84%) diff --git a/Microsoft.Azure.Cosmos/src/Resource/CosmosResponseFactoryCore.cs b/Microsoft.Azure.Cosmos/src/Resource/CosmosResponseFactoryCore.cs index 7d9e609ba3..14d405ffc6 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/CosmosResponseFactoryCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/CosmosResponseFactoryCore.cs @@ -276,6 +276,12 @@ public T ToObjectpublic(ResponseMessage responseMessage) return default; } + if (responseMessage.Content.Length == 0) + { + responseMessage.Content.Dispose(); + return default; + } + return this.serializerCore.FromStream(responseMessage.Content); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSerializerUnitTests.cs similarity index 84% rename from Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs rename to Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSerializerUnitTests.cs index 3ff401269b..8b318ad09e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSeriliazerUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosJsonSerializerUnitTests.cs @@ -7,7 +7,6 @@ namespace Microsoft.Azure.Cosmos.Core.Tests using System; using System.Collections.Generic; using System.IO; - using System.Linq; using System.Net; using System.Text; using Microsoft.Azure.Cosmos.CosmosElements; @@ -19,15 +18,15 @@ namespace Microsoft.Azure.Cosmos.Core.Tests using Newtonsoft.Json; [TestClass] - public class CosmosJsonSeriliazerUnitTests + public class CosmosJsonSerializerUnitTests { private readonly ToDoActivity toDoActivity = new ToDoActivity() { - id = "c1d433c1-369d-430e-91e5-14e3ce588f71", - taskNum = 42, - cost = double.MaxValue, - description = "cosmos json serializer", - status = "TBD" + Id = "c1d433c1-369d-430e-91e5-14e3ce588f71", + TaskNum = 42, + Cost = double.MaxValue, + Description = "cosmos json serializer", + Status = "TBD" }; private readonly string toDoActivityJson = @"{""id"":""c1d433c1-369d-430e-91e5-14e3ce588f71"",""taskNum"":42,""cost"":1.7976931348623157E+308,""description"":""cosmos json serializer"",""status"":""TBD""}"; @@ -41,11 +40,11 @@ public void ValidateSerializer() Assert.IsNotNull(stream); ToDoActivity result = cosmosDefaultJsonSerializer.FromStream(stream); Assert.IsNotNull(result); - Assert.AreEqual(this.toDoActivity.id, result.id); - Assert.AreEqual(this.toDoActivity.taskNum, result.taskNum); - Assert.AreEqual(this.toDoActivity.cost, result.cost); - Assert.AreEqual(this.toDoActivity.description, result.description); - Assert.AreEqual(this.toDoActivity.status, result.status); + Assert.AreEqual(this.toDoActivity.Id, result.Id); + Assert.AreEqual(this.toDoActivity.TaskNum, result.TaskNum); + Assert.AreEqual(this.toDoActivity.Cost, result.Cost); + Assert.AreEqual(this.toDoActivity.Description, result.Description); + Assert.AreEqual(this.toDoActivity.Status, result.Status); } } @@ -143,11 +142,11 @@ public void ValidateCustomSerializerSettings() ToDoActivity toDoActivityNoDescription = new ToDoActivity() { - id = "c1d433c1-369d-430e-91e5-14e3ce588f71", - taskNum = 42, - cost = double.MaxValue, - description = null, - status = "TBD" + Id = "c1d433c1-369d-430e-91e5-14e3ce588f71", + TaskNum = 42, + Cost = double.MaxValue, + Description = null, + Status = "TBD" }; string toDoActivityJson = @"{""id"":""c1d433c1-369d-430e-91e5-14e3ce588f71"",""taskNum"":42,""cost"":1.7976931348623157E+308,""status"":""TBD""}"; @@ -175,19 +174,15 @@ public void ValidateResponseFactoryJsonSerializer() ResponseMessage udfResponse = this.CreateResponse(); ResponseMessage itemResponse = this.CreateResponse(); - Mock mockUserJsonSerializer = new Mock(); CosmosSerializerCore serializerCore = new CosmosSerializerCore(mockUserJsonSerializer.Object); - CosmosResponseFactoryInternal cosmosResponseFactory = new CosmosResponseFactoryCore( - serializerCore); - - // Test the user specified response - mockUserJsonSerializer.Setup(x => x.FromStream(itemResponse.Content)).Callback(input => input.Dispose()).Returns(new ToDoActivity()); - mockUserJsonSerializer.Setup(x => x.FromStream(storedProcedureExecuteResponse.Content)).Callback(input => input.Dispose()).Returns(new ToDoActivity()); + CosmosResponseFactoryInternal cosmosResponseFactory = new CosmosResponseFactoryCore(serializerCore); // Verify all the user types use the user specified version ItemResponse itemResponseFromFactory = cosmosResponseFactory.CreateItemResponse(itemResponse); Assert.IsNotNull(itemResponseFromFactory.Diagnostics); + // Verify that FromStream is not called as the stream is empty + mockUserJsonSerializer.Verify(x => x.FromStream(itemResponse.Content), Times.Never); cosmosResponseFactory.CreateStoredProcedureExecuteResponse(storedProcedureExecuteResponse); // Throw if the setups were not called @@ -253,6 +248,27 @@ public void ValidateResponseFactoryJsonSerializer() cosmosResponseFactory.CreateUserDefinedFunctionResponse(udfResponse); } + [TestMethod] + public void ValidateResponseFactoryJsonSerializerWithContent() + { + ResponseMessage itemResponse = this.CreateResponseWithContent(); + + Mock mockUserJsonSerializer = new Mock(); + CosmosSerializerCore serializerCore = new CosmosSerializerCore(mockUserJsonSerializer.Object); + CosmosResponseFactoryInternal cosmosResponseFactory = new CosmosResponseFactoryCore(serializerCore); + + mockUserJsonSerializer.Setup(x => x.FromStream(itemResponse.Content)).Callback(input => input.Dispose()).Returns(new ToDoActivity()); + + // Verify all the user types use the user specified version + ItemResponse itemResponseFromFactory = cosmosResponseFactory.CreateItemResponse(itemResponse); + Assert.IsNotNull(itemResponseFromFactory.Diagnostics); + Assert.IsNotNull(itemResponseFromFactory.Resource); + Assert.AreEqual(HttpStatusCode.OK, itemResponseFromFactory.StatusCode); + + // Throw if the setups were not called + mockUserJsonSerializer.VerifyAll(); + } + [TestMethod] public void ValidateSqlQuerySpecSerializer() { @@ -339,6 +355,15 @@ private ResponseMessage CreateResponse() return cosmosResponse; } + private ResponseMessage CreateResponseWithContent() + { + ResponseMessage cosmosResponse = new ResponseMessage(statusCode: HttpStatusCode.OK) + { + Content = new MemoryStream(Encoding.UTF8.GetBytes(this.toDoActivityJson)) + }; + return cosmosResponse; + } + private ResponseMessage CreateQueryResponse() { List cosmosElements = new List(); @@ -387,13 +412,18 @@ private string GetSerializedToDoActivity() return @"{""id"":""c1d433c1-369d-430e-91e5-14e3ce588f71"",""taskNum"":42,""cost"":1.7976931348623157E+308,""status"":""TBD""}"; } - public class ToDoActivity + private class ToDoActivity { - public string id { get; set; } - public int taskNum { get; set; } - public double cost { get; set; } - public string description { get; set; } - public string status { get; set; } + [JsonProperty("id")] + public string Id { get; set; } + [JsonProperty("taskNum")] + public int TaskNum { get; set; } + [JsonProperty("cost")] + public double Cost { get; set; } + [JsonProperty("description")] + public string Description { get; set; } + [JsonProperty("status")] + public string Status { get; set; } } } } From 0d0ffe07919094d4304443540653fb6aa7c1141b Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 26 Apr 2023 17:28:58 -0700 Subject: [PATCH 099/164] [Internal] Documentation: Adds documentation covering build pipelines (#3822) * Add doc * Move benchmark * Fixing texts --- docs/builds-and-pipelines.md | 73 +++++++++++++++++++++++++++++++++++ templates/build-benchmark.yml | 25 ++++++++++++ templates/build-preview.yml | 28 +------------- 3 files changed, 99 insertions(+), 27 deletions(-) create mode 100644 docs/builds-and-pipelines.md diff --git a/docs/builds-and-pipelines.md b/docs/builds-and-pipelines.md new file mode 100644 index 0000000000..0747982783 --- /dev/null +++ b/docs/builds-and-pipelines.md @@ -0,0 +1,73 @@ +# Build pipelines for the Azure Cosmos DB .NET SDK + +This repository contains 6 pipelines that are used on different scenarios. + +## PR Validation + +[azure-pipelines.yml](../azure-pipelines.yml) defines the checks that are performed during a PR validation, it covers: + +* [Static analysis](../templates/static-tools.yml) +* [Verifying if the state of the SDK package is valid / can we generate a Nuget package](../templates/nuget-pack.yml) +* [Verify if the CTL runner builds](../templates/build-ctl.yml) -> [CTL Runner source](../Microsoft.Azure.Cosmos.Samples/Tools/CTL). +* [Verify if the Samples build](../templates/build-samples.yml) -> [Samples folder source](../Microsoft.Azure.Cosmos.Samples/Usage). +* [Run the Unit and Emulator tests](../templates/build-test.yml) -> For more information about tests, see the [CONTRIBUTING guide](../CONTRIBUTING.md#tests). +* [Verify the project builds with INTERNAL flag](../templates/build-internal.yml) -> INTERNAL is used for service dogfooding and for friends assembly access. +* [Verify the project builds with the PREVIEW flag, Unit tests for PREVIEW pass, Encryption and Benchmark projects for PREVIEW build](../templates/build-preview.yml) -> PREVIEW is used to ship the `-preview` SDK package. +* [Verify the Benchmark project builds, including PREVIEW flag build](../templates/build-benchmark.yml) -> [Benchmark project](../Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/README.md) enables users to execute benchmark runs on their accounts. + +This pipeline executes on Azure Pipelines as [dotnet-v3-ci](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=63). + +## SDK release + +[azure-pipelines-official.yml](../azure-pipelines-official.yml) is used during the release process of a new version: + +* [Static analysis](../templates/static-tools.yml) +* [Run the Unit and Emulator tests](../templates/build-test.yml) -> For more information about tests, see the [CONTRIBUTING guide](../CONTRIBUTING.md#tests). +* [Generate a Nuget package, and a Symbols package, and publish it on the `cosmosdb/csharp/` storage container](../templates/nuget-pack.yml) the Nuget version will be what is defined on [Directory.Build.Props](../Directory.Build.props). Template parameters: ReleasePackage = true, CleanupFolder = false, BlobVersion = `` + +This pipeline executes on Azure Pipelines as [dotnet-v3-release](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=65). + +## Nightly release + +[azure-pipelines-nightly.yml](../azure-pipelines-nightly.yml) is a scheduled run that executes every day at 0:00 UTC and produces two Nuget packages with the content on the `master` branch: + +* A non-preview package with versioning `Microsoft.Azure.Cosmos.X.Y.Z-nightly-DATE` where `X.Y.Z` is the current version from [Directory.Build.Props](../Directory.Build.props) and `DATE` is the current date in `MMDDYYYY` format. +* A preview package with versioning `Microsoft.Azure.Cosmos.X.Y.Z-preview-nightly-DATE` where `X.Y.Z` is the current version from [Directory.Build.Props](../Directory.Build.props) and `DATE` is the current date in `MMDDYYYY` format. + +The pipeline will: + +* [Generate a nightly Nuget package and publish it on the `cosmosdb/csharp/nightly` storage container and delete previous contents](../templates/nuget-pack.yml). Template parameters: ReleasePackage = true, CleanupFolder = true, BlobVersion = nightly. +* [Generate a preview nightly Nuget package and publish it on the `cosmosdb/csharp/nightly-preview` storage container and delete previous contents](../templates/nuget-pack.yml). Template parameters: ReleasePackage = true, CleanupFolder = true, BlobVersion = nightly-preview. + +This pipeline executes on Azure Pipelines as [dotnet-v3-nightly](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=75). + +## Docker image for CTL workloads + +[azure-pipelines-ctl-publishing.yml](../azure-pipelines-ctl-publishing.yml) executes every time a change is merged into `master` and it will: + +* Generate [docker config files](../Microsoft.Azure.Cosmos.Samples/Tools/CTL/Dockerfile). +* Copy the [executable shell file](../Microsoft.Azure.Cosmos.Samples/Tools/CTL/run_ctl.sh). +* Build and publish as a binary [the CTL project](../Microsoft.Azure.Cosmos.Samples/Tools/CTL/CosmosCTL.csproj). +* Execute docker build and publish the image to the team's Azure Container Instances container. + +This pipeline executes on Azure Pipelines as [dotnet-v3-ctl-image-publish](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=64). + +## Encryption packages release + +This repository also includes the [Microsoft.Azure.Cosmos.Encryption](../Microsoft.Azure.Cosmos.Encryption/) and [Microsoft.Azure.Cosmos.Encryption.Custom](../Microsoft.Azure.Cosmos.Encryption.Custom/) projects as satellite packages for client side encryption. + +[azure-pipelines-encryption](../azure-pipelines-encryption.yml) is used during the release process for a new `Microsoft.Azure.Cosmos.Encryption` release: + +* Builds the [Microsoft.Azure.Cosmos.Encryption](../Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj) +* Generate a Nuget package and a Symbols package +* Publish the package on the `cosmosdb/csharp/encryption/` storage container. + +This pipeline executes on Azure Pipelines as [dotnet-v3-encryption-release](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=66). + +[azure-pipelines-encryption-custom](../azure-pipelines-encryption-custom.yml) is used during the release process for a new `Microsoft.Azure.Cosmos.Encryption.Custom` release: + +* Builds the [Microsoft.Azure.Cosmos.Encryption.Custom](../Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj) +* Generate a Nuget package and a Symbols package +* Publish the package on the `cosmosdb/csharp/encryption.custom/` storage container. + +This pipeline executes on Azure Pipelines as [dotnet-v3-encryption-custom-release](https://cosmos-db-sdk-public.visualstudio.com/cosmos-db-sdk-public/_build?definitionId=67). diff --git a/templates/build-benchmark.yml b/templates/build-benchmark.yml index 7e73842ee1..b542231b8c 100644 --- a/templates/build-benchmark.yml +++ b/templates/build-benchmark.yml @@ -31,4 +31,29 @@ jobs: nugetConfigPath: NuGet.config projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln' arguments: -p:Optimize=true -p:OSSProjectRef=true + versioningScheme: OFF +- job: + displayName: Preview CosmosBenchmark ${{ parameters.BuildConfiguration }} + pool: + vmImage: ${{ parameters.VmImage }} + + steps: + - checkout: self # self represents the repo where the initial Pipelines YAML file was found + clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching + + # Add this Command to Include the .NET 6 SDK + - task: UseDotNet@2 + displayName: Use .NET 6.0 + inputs: + packageType: 'sdk' + version: '6.x' + + - task: DotNetCoreCLI@2 + displayName: Build Microsoft.Azure.CosmosBenchmark + inputs: + command: build + configuration: $(parameters.BuildConfiguration) + nugetConfigPath: NuGet.config + projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln' + arguments: -p:Optimize=true -p:IsPreview=true -p:OSSProjectRef=true versioningScheme: OFF \ No newline at end of file diff --git a/templates/build-preview.yml b/templates/build-preview.yml index e9919878ff..5ce991a148 100644 --- a/templates/build-preview.yml +++ b/templates/build-preview.yml @@ -142,30 +142,4 @@ jobs: arguments: ${{ parameters.Arguments }} --configuration ${{ parameters.BuildConfiguration }} /p:IsPreview=true /p:OS=${{ parameters.OS }} publishTestResults: true nugetConfigPath: NuGet.config - testRunTitle: Microsoft.Azure.Cosmos.Tests - -- job: - displayName: Preview CosmosBenchmark ${{ parameters.BuildConfiguration }} - pool: - vmImage: ${{ parameters.VmImage }} - - steps: - - checkout: self # self represents the repo where the initial Pipelines YAML file was found - clean: true # if true, execute `execute git clean -ffdx && git reset --hard HEAD` before fetching - - # Add this Command to Include the .NET 6 SDK - - task: UseDotNet@2 - displayName: Use .NET 6.0 - inputs: - packageType: 'sdk' - version: '6.x' - - - task: DotNetCoreCLI@2 - displayName: Build Microsoft.Azure.CosmosBenchmark - inputs: - command: build - configuration: $(parameters.BuildConfiguration) - nugetConfigPath: NuGet.config - projects: 'Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/CosmosBenchmark.sln' - arguments: -p:Optimize=true -p:IsPreview=true -p:OSSProjectRef=true - versioningScheme: OFF \ No newline at end of file + testRunTitle: Microsoft.Azure.Cosmos.Tests \ No newline at end of file From e872f936caf2f653f7e8fd01e71f3e0ad85691ef Mon Sep 17 00:00:00 2001 From: vipulvishal-ms <110802706+vipulvishal-ms@users.noreply.github.com> Date: Thu, 27 Apr 2023 16:32:17 +0530 Subject: [PATCH 100/164] Client Encryption: Adds release version of Microsoft.Azure.Cosmos to Microsoft.Azure.Cosmos.Encryption.Custom (#3799) * cosmos version change * changing preview to release * resolving code review comments --------- Co-authored-by: Santosh Kulkarni <66682828+kr-santosh@users.noreply.github.com> --- .../src/EncryptionContainer.cs | 16 +++++++++------- ...crosoft.Azure.Cosmos.Encryption.Custom.csproj | 10 ++++++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs index ae0ec2aead..eebf5900cf 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/EncryptionContainer.cs @@ -791,13 +791,6 @@ public override Task> GetFeedRangesAsync( return this.container.GetFeedRangesAsync(cancellationToken); } - public override Task> GetPartitionKeyRangesAsync( - FeedRange feedRange, - CancellationToken cancellationToken = default) - { - return this.container.GetPartitionKeyRangesAsync(feedRange, cancellationToken); - } - public override FeedIterator GetItemQueryStreamIterator( FeedRange feedRange, QueryDefinition queryDefinition, @@ -1010,6 +1003,14 @@ public override async Task> ReadManyItemsAsync( return this.ResponseFactory.CreateItemFeedResponse(responseMessage); } +#if ENCRYPTIONPREVIEW + public override Task> GetPartitionKeyRangesAsync( + FeedRange feedRange, + CancellationToken cancellationToken = default) + { + return this.container.GetPartitionKeyRangesAsync(feedRange, cancellationToken); + } + public override Task DeleteAllItemsByPartitionKeyStreamAsync( Cosmos.PartitionKey partitionKey, RequestOptions requestOptions = null, @@ -1020,6 +1021,7 @@ public override Task DeleteAllItemsByPartitionKeyStreamAsync( requestOptions, cancellationToken); } +#endif private async Task ReadManyItemsHelperAsync( IReadOnlyList<(string id, PartitionKey partitionKey)> items, diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index 54755c89ef..09b92aa37e 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -4,8 +4,6 @@ Microsoft.Azure.Cosmos.Encryption.Custom Microsoft.Azure.Cosmos.Encryption.Custom $(LangVersion) - true - $([System.DateTime]::Now.ToString(yyyyMMdd)) $(CustomEncryptionVersion) Microsoft Corporation @@ -24,8 +22,12 @@ - - + + + + + + From e5972ac0ffd53595b2f1f0f10a3faf913ff882e1 Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Thu, 27 Apr 2023 10:16:32 -0700 Subject: [PATCH 101/164] SDK 3.33.0 : Adds version bump and changelog (#3823) * release 3.30.0 * added changelog * updated changelog * updated changelog * suggested change to changelog * updated changelog --------- Co-authored-by: Matias Quaranta --- Directory.Build.props | 4 +- .../contracts/API_3.33.0-preview.txt | 1540 +++++++++++++++++ .../contracts/API_3.33.0.txt | 1493 ++++++++++++++++ changelog.md | 25 +- 4 files changed, 3059 insertions(+), 3 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.33.0-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.33.0.txt diff --git a/Directory.Build.props b/Directory.Build.props index 695ad7c92c..0a0d59a5b4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.32.3 - 3.32.3 + 3.33.0 + 3.33.0 preview 3.30.8 2.0.1 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.33.0-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.33.0-preview.txt new file mode 100644 index 0000000000..4b3c5c951e --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.33.0-preview.txt @@ -0,0 +1,1540 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public enum PriorityLevel + { + High = 1, + Low = 2, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public Nullable PriorityLevel { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.33.0.txt b/Microsoft.Azure.Cosmos/contracts/API_3.33.0.txt new file mode 100644 index 0000000000..af7ab6eef4 --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.33.0.txt @@ -0,0 +1,1493 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsPrimitive(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index 7188399b52..709a4bfccf 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ ## Recommended version -The **minimum recommended version is [3.31.0](#3.31.0)**. +The **minimum recommended version is [3.33.0](#3.33.0)**. Make sure that your applications, when using the .NET V3 SDK, are using at least the version described here to have all the critical fixes. @@ -13,6 +13,29 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.33.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.33.0-preview) - 2023-04-21 + +### Added + +- [3672](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3672) PriorityBasedExecution: Added PriorityLevel as a RequestOption + +### [3.33.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.33.0) - 2023-04-21 + +#### Fixed +- [3762](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3762) HttpClient: Adds detection of DNS changes through use of SocketsHttpHandler for .NET 6 and above +- [3707](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3707) Diagnostics: Adds startDate in Summary +- [3457](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3457) Documentation: Update Database.ReadAsync description +- [3730](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3730) Query: Fixes System.ArgumentException when using PartitionKey.None on x86, Linux or in Optimistic Direct Execution +- [3775](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3775) Change Feed Processor: Fixes LeaseLostException leaks on notification APIs for Renew scenarios +- [3792](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3792) Diagnostics: Refactors Code to Remove Dependency of HttpResponseHeadersWrapper to fetch Sub Status Codes +- [3793](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3793) Documentation: Refactors SQL API reference to NoSQL API +- [3814](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3814) Serialization: Fixes call to CosmosSerializer.FromStream on Gateway mode when EnableContentResponseOnWrite is false. (Thanks @Baltima) + +#### Added +- [3109](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3109), [3763](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3763) Subpartitioning: Adds support for Prefix Partition Key searches for sub partitioned containers, and APIs for public release and increase REST API version +- [3803](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3803) HttpClient: Adds Properties to the Http messages if available +- [3389](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3389) Patch: Adds Move Operation + ### [3.32.3](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.3) - 2023-03-30 ### [3.32.3-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.32.3-preview) - 2023-03-30 From 7465da2dcf92dc14769149ae7492c3db77024405 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Mon, 1 May 2023 23:59:38 +0530 Subject: [PATCH 102/164] [Internal] Documentation: Adds msdata/direct Sync-up Guide. (#3828) * Code changes to add msdata/direct sync-up documentation. * Code changes to address review comments. * Code changes to address further review comments. * Code changes to address minor review comments. * Removed internal links. --- docs/sync_up_msdata_direct.md | 93 +++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 docs/sync_up_msdata_direct.md diff --git a/docs/sync_up_msdata_direct.md b/docs/sync_up_msdata_direct.md new file mode 100644 index 0000000000..9c416aa65b --- /dev/null +++ b/docs/sync_up_msdata_direct.md @@ -0,0 +1,93 @@ +# Update msdata/direct Repo with Cosmos v3 and Direct Codebase + +## Table of Contents + +* [Background.](#background) +* [Prerequisites.](#prerequisites) +* [Steps Required to Update msdata direct Repo.](#steps-required-to-update-msdata-direct-repo) +* [Validating the sync-up.](#validating-the-sync-up) +* [Submit Pull Request to msdata direct.](#submit-pull-request-to-msdata-direct) +* [Sample Pull Requests to Sync-up msdata direct.](#sample-pull-requests-to-sync-up-msdata-direct) + +## Background + +As a developer on the Cosmos SDK team, we often engage in a task, that requires code changes in both cosmos dotnet sdk v3 repository, as well as in the `msdata` cosmosdb direct codebase (aka `Microsoft.Azure.Cosmos.Direct` namespace). Therefore, sometimes it's utterly challenging to visualize the code changes as a whole, and analyze the impacts. To overcome this, we have created a branch called `msdata/direct` within our cosmos dotnet sdk v3 codebase, that basically mimics the code present in `msdata` repository mentioned above. This simplifies the code changes required to be done in both, provides much better understanding on the overall impacts of the code changes and gives transparency to users in terms of what is the source code for the `Microsoft.Azure.Cosmos.Direct` package. + +## Prerequisites + +Before covering the sync-up process in detail, please follow the below steps to make sure all the required pre-requisites are met. + +### Clone the Azure Cosmos DB .NET SDK Version 3 Repo + +- Clone the azure `cosmos-db dotnet sdk` repo in the local environment, using the below git command: + - git clone https://github.com/Azure/azure-cosmos-dotnet-v3.git + +- Navigate to the directory `azure-cosmos-dotnet-v3` and check out the following branch, `msdata/direct` using the below git commands: + - git pull && git checkout msdata/direct + +### Clone the `CosmosDB` Repo hosted in msdata + +- Clone the CosmosDB repository in the local environment, using the CosmosDB onboarding guide. Please note, building the entire repository is not required for the sync-up process. + +- Navigate to the cloned `CosmosDB` directory and check out the following branch, `master` using the below git commands: + - git pull && git checkout master + +## Steps Required to Update msdata direct Repo + +### Create a Feature Branch for Local Changes. + +The first step to sync up the `msdata/direct` repo is to create a feature branch out of it, where all the required changes could be made. Later on, we will use the feature branch to submit pull request to `msdata/direct`. Please use the following git command to create the feature branch: + +- Stay on the `msdata/direct` branch and run `git checkout -b users//update_msdata_direct_` to create the feature branch. + +### Merging the cosmos db v3 Code into Feature Branch. + +The next step is to port the latest `master` branch code into the newly created feature branch. Please see the below git commands to perform this action: + +- Make sure the `master` branch is up-to-date. +- Stay on the newly created feature branch `users//update_msdata_direct_` and run `git merge master`. +- There are likely to be conflicts during the merge. If that happens, we will need to resolve the conflicts gracefully by accepting the incoming `master` branch changes. + +### Pick the Required Microsoft Azure Cosmos.Direct files into `msdata/direct` repo. + +This is the last part for the sync-up process. Please follow the below steps to copy the required `Microsoft.Cosmos.Direct` files from msdata CosmosDB repo. + +- Open command prompt/windows terminal and navigate to the following directory `Microsoft.Azure.Cosmos\src\direct` inside the cloned cosmos v3 repo. +- Locate and edit the following line in the `msdata_sync.ps1` script with the respective location of the msdata repo: `$baseDir = "\CosmosDB"` +- Run the powershell script using: `.\msdata_sync.ps1`. You will notice the script started copying the required files from the msdata repo, and generating the console logs, like the below: + + ``` + Copying Files: rntbd2 + Copying Files: AccessCondition.cs + Copying Files: AccessConditionType.cs + Copying Files: Address.cs + Copying Files: AddressCacheToken.cs + Copying Files: AddressEnumerator.cs + Copying Files: AddressInformation.cs + Copying Files: AddressSelector.cs + Copying Files: ApiType.cs + Copying Files: Attachment.cs + Copying Files: AuthorizationTokenType.cs + Copying Files: BackoffRetryUtility.cs + Copying Files: BadRequestException.cs + Copying Files: BarrierRequestHelper.cs + ``` + +- Note: There may be instances where some of the files could be missing in the v3 `msdata/direct` repo and the copy may fail with the following error: `Write-Error: SystemSynchronizationScope.cs False`. If that happens, please copy the file manually from the `msdata/CosmosDB` repo and continue running the script all over again. + +## Validating the sync-up + +One of the most important part in the whole `msdata/direct` sync up process is to validate whether the code merges, conflict resolutions and file updates went successfully. To comply with this, please make sure to follow the below steps: + +- Open command prompt/ windows terminal and navigate to the directory where the cosmos v3 code is located, for instance `C:\stash\azure-cosmos-dotnet-v3`. +- Make sure to stay on the newly created feature branch. +- Stay on the same directory mentioned above, and run the following command for a clean build: `dotnet build`. Make sure, the build passes successfully. + +## Submit Pull Request to msdata direct + +Once the feature branch builds successfully, it's time to submit the PR to `msdata/direct` to complete the sync-up process. To do this, please follow `git add`, `git commit` and `git push` commands to push the newly created branch upstream. Once the branch is pushed, please submit the pull request to the `msdata/direct` branch and seek for approvals. + +## Sample Pull Requests to Sync-up msdata direct + +- [[Internal] Msdata/Direct: Refactors msdata branch with latest v3 and direct release](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3726) +- [[Internal] Msdata/Direct: Refactors msdata/direct branch with latest v3 master and Cosmos.Direct v3.30.4](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3776) \ No newline at end of file From 20121c85a1c49f46e5194007de055e5ff79ca297 Mon Sep 17 00:00:00 2001 From: leminh98 Date: Tue, 2 May 2023 08:48:44 -0700 Subject: [PATCH 103/164] Query: Adds TRIM string system function support in LINQ (#3833) * add trim support * Added some test coverage * address reviews --------- Co-authored-by: Minh Le --- .../StringBuiltinFunctions.cs | 43 ++++++ ...ationBaselineTests.TestStringFunctions.xml | 128 ++++++++++++++++-- .../LinqTranslationBaselineTests.cs | 19 ++- 3 files changed, 177 insertions(+), 13 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/StringBuiltinFunctions.cs b/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/StringBuiltinFunctions.cs index 781eb8d20a..b04bd58c3c 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/StringBuiltinFunctions.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/StringBuiltinFunctions.cs @@ -348,6 +348,45 @@ protected override SqlScalarExpression VisitImplicit(MethodCallExpression method } } + private class StringVisitTrim : SqlBuiltinFunctionVisitor + { + public StringVisitTrim() + : base("TRIM", + false, + null) + { + } + + protected override SqlScalarExpression VisitImplicit(MethodCallExpression methodCallExpression, TranslationContext context) + { + bool validInNet = false; + bool validInNetCore = false; + + if (methodCallExpression.Arguments.Count == 1 && + methodCallExpression.Arguments[0].NodeType == ExpressionType.Constant && + methodCallExpression.Arguments[0].Type == typeof(char[])) + { + char[] argumentsExpressions = (char[])((ConstantExpression)methodCallExpression.Arguments[0]).Value; + if (argumentsExpressions.Length == 0) + { + validInNet = true; + } + } + else if (methodCallExpression.Arguments.Count == 0) + { + validInNetCore = true; + } + + if (validInNet || validInNetCore) + { + SqlScalarExpression str = ExpressionToSql.VisitScalarExpression(methodCallExpression.Object, context); + return SqlFunctionCallScalarExpression.CreateBuiltin(SqlFunctionCallScalarExpression.Names.Trim, str); + } + + return null; + } + } + static StringBuiltinFunctions() { StringBuiltinFunctionDefinitions = new Dictionary @@ -415,6 +454,10 @@ static StringBuiltinFunctions() "TrimEnd", new StringVisitTrimEnd() }, + { + "Trim", + new StringVisitTrim() + }, { "StartsWith", new SqlStringWithComparisonVisitor(SqlFunctionCallScalarExpression.Names.Startswith) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringFunctions.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringFunctions.xml index a9fc581461..4ccc9d34ca 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringFunctions.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringFunctions.xml @@ -363,6 +363,28 @@ FROM root]]> + + + + + + doc.StringField.Replace(c, a))]]> + + + + + + + + + doc.StringField.Replace("str", "str2"))]]> + + + @@ -379,34 +401,45 @@ FROM root]]> - - doc.StringField.TrimStart())]]> + + doc.StringField.Trim())]]> - - doc.StringField.Replace(c, a))]]> + + " abc ".Trim())]]> - - doc.StringField.Replace("str", "str2"))]]> + + doc.StringField.Trim(new [] {}))]]> + + + + + + " abc ".Trim(new [] {}))]]> + + + @@ -418,6 +451,83 @@ FROM root]]> + + + + + + " abc ".TrimEnd())]]> + + + + + + + + + doc.StringField.TrimEnd(new [] {}))]]> + + + + + + + + + " abc ".TrimEnd(new [] {}))]]> + + + + + + + + + doc.StringField.TrimStart())]]> + + + + + + + + + " abc ".TrimStart())]]> + + + + + + + + + doc.StringField.TrimStart(new [] {}))]]> + + + + + + + + + " abc ".TrimStart(new [] {}))]]> + + + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs index 14aadd354f..76bd0ffc81 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs @@ -744,15 +744,26 @@ public void TestStringFunctions() new LinqTestInput("IndexOf string w/ startIndex", b => getQuery(b).Select(doc => doc.StringField.IndexOf("str", 0))), // Count new LinqTestInput("Count", b => getQuery(b).Select(doc => doc.StringField.Count())), - // ToLower - new LinqTestInput("ToLower", b => getQuery(b).Select(doc => doc.StringField.ToLower())), - // TrimStart - new LinqTestInput("TrimStart", b => getQuery(b).Select(doc => doc.StringField.TrimStart())), // Replace new LinqTestInput("Replace char", b => getQuery(b).Select(doc => doc.StringField.Replace('c', 'a'))), new LinqTestInput("Replace string", b => getQuery(b).Select(doc => doc.StringField.Replace("str", "str2"))), + // ToLower + new LinqTestInput("ToLower", b => getQuery(b).Select(doc => doc.StringField.ToLower())), + // Trim + new LinqTestInput("Trim", b => getQuery(b).Select(doc => doc.StringField.Trim())), + new LinqTestInput("Trim with Literal", b => getQuery(b).Select(doc => " abc ".Trim())), + new LinqTestInput("Trim with EmptyCharArray", b => getQuery(b).Select(doc => doc.StringField.Trim(new char[]{ }))), + new LinqTestInput("Trim with Literal and EmptyCharArray", b => getQuery(b).Select(doc => " abc ".Trim(new char[]{ }))), // TrimEnd new LinqTestInput("TrimEnd", b => getQuery(b).Select(doc => doc.StringField.TrimEnd())), + new LinqTestInput("TrimEnd with Literal", b => getQuery(b).Select(doc => " abc ".TrimEnd())), + new LinqTestInput("TrimEnd with EmptyCharArray", b => getQuery(b).Select(doc => doc.StringField.TrimEnd(new char[]{ }))), + new LinqTestInput("TrimEnd with Literal and EmptyCharArray", b => getQuery(b).Select(doc => " abc ".TrimEnd(new char[]{ }))), + // TrimStart + new LinqTestInput("TrimStart", b => getQuery(b).Select(doc => doc.StringField.TrimStart())), + new LinqTestInput("TrimStart with Literal", b => getQuery(b).Select(doc => " abc ".TrimStart())), + new LinqTestInput("TrimStart with EmptyCharArray", b => getQuery(b).Select(doc => doc.StringField.TrimStart(new char[]{ }))), + new LinqTestInput("TrimStart with Literal and EmptyCharArray", b => getQuery(b).Select(doc => " abc ".TrimStart(new char[]{ }))), //StartsWith new LinqTestInput("StartsWith", b => getQuery(b).Select(doc => doc.StringField.StartsWith("str"))), new LinqTestInput("String constant StartsWith", b => getQuery(b).Select(doc => "str".StartsWith(doc.StringField))), From 15616d38a619de70a35c99b6de7f6b30b504d17a Mon Sep 17 00:00:00 2001 From: leminh98 Date: Tue, 2 May 2023 10:34:44 -0700 Subject: [PATCH 104/164] Query: Fixes Parsing Error in SQL DOM when CultureInfo is available (#3832) * add fix * Add cultural info to test to verify correct behavior * address pr review to restore to restore culture * fix comment --------- Co-authored-by: Minh Le --- .../src/Query/Core/Parser/CstToAstVisitor.cs | 3 ++- .../Query/Parser/SqlParserBaselineTests.cs | 21 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs index 8ba6c4fc45..7ca3a60a71 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Parser/CstToAstVisitor.cs @@ -8,6 +8,7 @@ namespace Microsoft.Azure.Cosmos.Query.Core.Parser using System.Collections.Generic; using System.Collections.Immutable; using System.Diagnostics.Contracts; + using System.Globalization; using Antlr4.Runtime.Misc; using Antlr4.Runtime.Tree; using Microsoft.Azure.Cosmos.SqlObjects; @@ -963,7 +964,7 @@ private static Number64 GetNumber64ValueFromNode(IParseTree parseTree) } else { - number64 = double.Parse(text); + number64 = double.Parse(text, CultureInfo.InvariantCulture); } return number64; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/SqlParserBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/SqlParserBaselineTests.cs index fbbca5abbc..11f23fab83 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/SqlParserBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/Parser/SqlParserBaselineTests.cs @@ -5,6 +5,9 @@ namespace Microsoft.Azure.Cosmos.Tests.Query.Parser { using System; + using System.Collections.Generic; + using System.Globalization; + using System.Threading; using System.Xml; using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.Query.Core.Parser; @@ -17,6 +20,8 @@ public abstract class SqlParserBaselineTests : BaselineTests parseQueryMonad = SqlQueryParser.Monadic.Parse(input.Query); if (parseQueryMonad.Succeeded) { @@ -26,6 +31,22 @@ public override SqlParserBaselineTestOutput ExecuteTest(SqlParserBaselineTestInp Assert.AreEqual(parseQueryMonad.Result, parseQueryMonad2.Result); } + // Set culture to non-standard (US) to catch any parsing error + foreach (string culture in new List { "en-US", "fr-FR", "jp-JP" }) + { + Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo(culture); + TryCatch parseQueryMonadCulture = SqlQueryParser.Monadic.Parse(input.Query); + if (parseQueryMonadCulture.Succeeded) + { + // Addtional round trip for extra validation + TryCatch parseQueryMonadCulture2 = SqlQueryParser.Monadic.Parse(parseQueryMonad.Result.ToString()); + Assert.IsTrue(parseQueryMonadCulture2.Succeeded); + Assert.AreEqual(parseQueryMonadCulture2.Result, parseQueryMonadCulture2.Result); + } + } + + // return thread to default culture + Thread.CurrentThread.CurrentCulture = defaultCulture; return new SqlParserBaselineTestOutput(parseQueryMonad); } } From 1dcba536ecaed62b559ed6f5cf0bec62d4b63374 Mon Sep 17 00:00:00 2001 From: vipulvishal-ms <110802706+vipulvishal-ms@users.noreply.github.com> Date: Wed, 3 May 2023 19:10:54 +0530 Subject: [PATCH 105/164] Client Encryption: Adds api FetchDataEncryptionKeyWithoutRawKeyAsync and FetchDataEncryptionKeyAsync to get DEK without and with raw key respectively. (#3809) * added raw key to MdeEncryption * adding ray key to Mde Algo * test case changes * resolving code review comments * code optimization to reduce keyvault calls * removed Microsoft.Data.Encryption.Cryptography nuget package * added api for dek with raw key * resolved code review comments * adding change log * code review changes --- Directory.Build.props | 2 +- .../changelog.md | 5 ++ .../src/CosmosDataEncryptionKeyProvider.cs | 17 +++++- .../src/CosmosEncryptor.cs | 8 +-- .../src/DataEncryptionKeyContainerCore.cs | 11 ++-- .../src/DataEncryptionKeyProvider.cs | 14 ++++- .../src/MdeServices/MdeEncryptionAlgorithm.cs | 54 +++++++++++-------- .../EmulatorTests/LegacyEncryptionTests.cs | 6 +-- .../EmulatorTests/MdeCustomEncryptionTests.cs | 48 +++++++++++++++-- .../CosmosEncryptorTests.cs | 4 +- 10 files changed, 127 insertions(+), 42 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0a0d59a5b4..a24f0ab2ac 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ 2.0.1 2.0.1 preview - 1.0.0-preview04 + 1.0.0-preview05 1.1.0-preview3 10.0 $([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md b/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md index a17680a9f8..58fcf1d790 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md @@ -3,6 +3,11 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [1.0.0-preview05](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview05) - 2023-04-27 + +#### Fixes +- [#3809](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3809) Adds api FetchDataEncryptionKeyWithoutRawKeyAsync and FetchDataEncryptionKey to get DEK without and with raw key respectively. + ### [1.0.0-preview04](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview04) - 2022-08-16 #### Fixes diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosDataEncryptionKeyProvider.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosDataEncryptionKeyProvider.cs index 1c8cffce8e..773845aa9e 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosDataEncryptionKeyProvider.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosDataEncryptionKeyProvider.cs @@ -166,11 +166,25 @@ public async Task InitializeAsync( this.container = containerResponse.Container; } + /// + public override async Task FetchDataEncryptionKeyWithoutRawKeyAsync( + string id, + string encryptionAlgorithm, + CancellationToken cancellationToken) + { + return await this.FetchDekAsync(id, encryptionAlgorithm, cancellationToken); + } + /// public override async Task FetchDataEncryptionKeyAsync( string id, string encryptionAlgorithm, CancellationToken cancellationToken) + { + return await this.FetchDekAsync(id, encryptionAlgorithm, cancellationToken, true); + } + + private async Task FetchDekAsync(string id, string encryptionAlgorithm, CancellationToken cancellationToken, bool withRawKey = false) { DataEncryptionKeyProperties dataEncryptionKeyProperties = await this.dataEncryptionKeyContainerCore.FetchDataEncryptionKeyPropertiesAsync( id, @@ -200,7 +214,8 @@ public override async Task FetchDataEncryptionKeyAsync( InMemoryRawDek inMemoryRawDek = await this.dataEncryptionKeyContainerCore.FetchUnwrappedAsync( dataEncryptionKeyProperties, diagnosticsContext: CosmosDiagnosticsContext.Create(null), - cancellationToken: cancellationToken); + cancellationToken: cancellationToken, + withRawKey); return inMemoryRawDek.DataEncryptionKey; } diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosEncryptor.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosEncryptor.cs index 3a325e77b2..462bd56a1f 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosEncryptor.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/CosmosEncryptor.cs @@ -35,14 +35,14 @@ public override async Task DecryptAsync( string encryptionAlgorithm, CancellationToken cancellationToken = default) { - DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync( + DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync( dataEncryptionKeyId, encryptionAlgorithm, cancellationToken); if (dek == null) { - throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync)}."); + throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync)}."); } return dek.DecryptData(cipherText); @@ -55,14 +55,14 @@ public override async Task EncryptAsync( string encryptionAlgorithm, CancellationToken cancellationToken = default) { - DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync( + DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync( dataEncryptionKeyId, encryptionAlgorithm, cancellationToken); if (dek == null) { - throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync)}."); + throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync)}."); } return dek.EncryptData(plainText); diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainerCore.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainerCore.cs index b5f5d340c9..68e5414275 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainerCore.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyContainerCore.cs @@ -335,6 +335,7 @@ internal async Task FetchUnWrappedMdeSupportedLegacyDekAsync( unwrapResult.DataEncryptionKey); return new MdeEncryptionAlgorithm( + unwrapResult.DataEncryptionKey, plaintextDataEncryptionKey, Data.Encryption.Cryptography.EncryptionType.Randomized); } @@ -378,13 +379,14 @@ internal async Task FetchUnWrappedLegacySupportedMdeDekAsync( internal async Task FetchUnwrappedAsync( DataEncryptionKeyProperties dekProperties, CosmosDiagnosticsContext diagnosticsContext, - CancellationToken cancellationToken) + CancellationToken cancellationToken, + bool withRawKey = false) { try { if (string.Equals(dekProperties.EncryptionAlgorithm, CosmosEncryptionAlgorithm.MdeAeadAes256CbcHmac256Randomized)) { - DataEncryptionKey dek = this.InitMdeEncryptionAlgorithm(dekProperties); + DataEncryptionKey dek = this.InitMdeEncryptionAlgorithm(dekProperties, withRawKey); // TTL is not used since DEK is not cached. return new InMemoryRawDek(dek, TimeSpan.FromMilliseconds(0)); @@ -564,7 +566,7 @@ private async Task UnWrapDekMdeEncAlgoAsync( return unwrapResult; } - internal DataEncryptionKey InitMdeEncryptionAlgorithm(DataEncryptionKeyProperties dekProperties) + internal DataEncryptionKey InitMdeEncryptionAlgorithm(DataEncryptionKeyProperties dekProperties, bool withRawKey = false) { if (this.DekProvider.MdeKeyWrapProvider == null) { @@ -576,7 +578,8 @@ internal DataEncryptionKey InitMdeEncryptionAlgorithm(DataEncryptionKeyPropertie dekProperties, Data.Encryption.Cryptography.EncryptionType.Randomized, this.DekProvider.MdeKeyWrapProvider.EncryptionKeyStoreProvider, - this.DekProvider.PdekCacheTimeToLive); + this.DekProvider.PdekCacheTimeToLive, + withRawKey); } private async Task ReadResourceAsync( diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyProvider.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyProvider.cs index 502e14897b..c92df3fa60 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyProvider.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/DataEncryptionKeyProvider.cs @@ -14,7 +14,19 @@ namespace Microsoft.Azure.Cosmos.Encryption.Custom public abstract class DataEncryptionKeyProvider { /// - /// Retrieves the data encryption key for the given id. + /// Retrieves the data encryption key for the given id without rawkey. RawKey will be set to null. + /// + /// Identifier of the data encryption key. + /// Encryption algorithm that the retrieved key will be used with. + /// Token for request cancellation. + /// Data encryption key bytes. + public abstract Task FetchDataEncryptionKeyWithoutRawKeyAsync( + string id, + string encryptionAlgorithm, + CancellationToken cancellationToken); + + /// + /// Retrieves the data encryption key for the given id with RawKey value. /// /// Identifier of the data encryption key. /// Encryption algorithm that the retrieved key will be used with. diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs index d9144a5c4f..68d863114e 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/MdeServices/MdeEncryptionAlgorithm.cs @@ -14,8 +14,10 @@ internal sealed class MdeEncryptionAlgorithm : DataEncryptionKey { private readonly AeadAes256CbcHmac256EncryptionAlgorithm mdeAeadAes256CbcHmac256EncryptionAlgorithm; + private readonly byte[] unwrapKey; + // unused for MDE Algorithm. - public override byte[] RawKey => null; + public override byte[] RawKey { get; } public override string EncryptionAlgorithm => CosmosEncryptionAlgorithm.MdeAeadAes256CbcHmac256Randomized; @@ -32,7 +34,8 @@ public MdeEncryptionAlgorithm( DataEncryptionKeyProperties dekProperties, Data.Encryption.Cryptography.EncryptionType encryptionType, EncryptionKeyStoreProvider encryptionKeyStoreProvider, - TimeSpan? cacheTimeToLive) + TimeSpan? cacheTimeToLive, + bool withRawKey=false) { if (dekProperties == null) { @@ -49,36 +52,39 @@ public MdeEncryptionAlgorithm( dekProperties.EncryptionKeyWrapMetadata.Value, encryptionKeyStoreProvider); - ProtectedDataEncryptionKey protectedDataEncryptionKey; - if (cacheTimeToLive.HasValue) + if (!withRawKey) { - // no caching - if (cacheTimeToLive.Value == TimeSpan.Zero) - { - protectedDataEncryptionKey = new ProtectedDataEncryptionKey( + ProtectedDataEncryptionKey protectedDataEncryptionKey = cacheTimeToLive.HasValue && cacheTimeToLive.Value == TimeSpan.Zero + ? new ProtectedDataEncryptionKey( + dekProperties.Id, + keyEncryptionKey, + dekProperties.WrappedDataEncryptionKey) + : ProtectedDataEncryptionKey.GetOrCreate( dekProperties.Id, keyEncryptionKey, dekProperties.WrappedDataEncryptionKey); - } - else - { - protectedDataEncryptionKey = ProtectedDataEncryptionKey.GetOrCreate( - dekProperties.Id, - keyEncryptionKey, - dekProperties.WrappedDataEncryptionKey); - } + this.mdeAeadAes256CbcHmac256EncryptionAlgorithm = AeadAes256CbcHmac256EncryptionAlgorithm.GetOrCreate( + protectedDataEncryptionKey, + encryptionType); } else { - protectedDataEncryptionKey = ProtectedDataEncryptionKey.GetOrCreate( - dekProperties.Id, - keyEncryptionKey, - dekProperties.WrappedDataEncryptionKey); + byte[] rawKey = keyEncryptionKey.DecryptEncryptionKey(dekProperties.WrappedDataEncryptionKey); + PlaintextDataEncryptionKey plaintextDataEncryptionKey = cacheTimeToLive.HasValue && (cacheTimeToLive.Value == TimeSpan.Zero) + ? new PlaintextDataEncryptionKey( + dekProperties.Id, + rawKey) + : PlaintextDataEncryptionKey.GetOrCreate( + dekProperties.Id, + rawKey); + this.RawKey = rawKey; + this.mdeAeadAes256CbcHmac256EncryptionAlgorithm = AeadAes256CbcHmac256EncryptionAlgorithm.GetOrCreate( + plaintextDataEncryptionKey, + encryptionType); + } - this.mdeAeadAes256CbcHmac256EncryptionAlgorithm = AeadAes256CbcHmac256EncryptionAlgorithm.GetOrCreate( - protectedDataEncryptionKey, - encryptionType); + } /// @@ -90,9 +96,11 @@ public MdeEncryptionAlgorithm( /// Data Encryption Key /// Encryption type public MdeEncryptionAlgorithm( + byte[] rawkey, Data.Encryption.Cryptography.DataEncryptionKey dataEncryptionKey, Data.Encryption.Cryptography.EncryptionType encryptionType) { + this.RawKey = rawkey; this.mdeAeadAes256CbcHmac256EncryptionAlgorithm = AeadAes256CbcHmac256EncryptionAlgorithm.GetOrCreate( dataEncryptionKey, encryptionType); diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/LegacyEncryptionTests.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/LegacyEncryptionTests.cs index 27f4567732..2785f04815 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/LegacyEncryptionTests.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/LegacyEncryptionTests.cs @@ -1747,14 +1747,14 @@ public override async Task DecryptAsync( throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned."); } - DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync( + DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync( dataEncryptionKeyId, encryptionAlgorithm, cancellationToken); if (dek == null) { - throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync)}."); + throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync)}."); } return dek.DecryptData(cipherText); @@ -1766,7 +1766,7 @@ public override async Task EncryptAsync( string encryptionAlgorithm, CancellationToken cancellationToken = default) { - DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync( + DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync( dataEncryptionKeyId, encryptionAlgorithm, cancellationToken); diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/MdeCustomEncryptionTests.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/MdeCustomEncryptionTests.cs index 3b2b8f8d97..e100268ea0 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/MdeCustomEncryptionTests.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/MdeCustomEncryptionTests.cs @@ -20,6 +20,7 @@ namespace Microsoft.Azure.Cosmos.Encryption.EmulatorTests using EncryptionKeyWrapMetadata = Custom.EncryptionKeyWrapMetadata; using DataEncryptionKey = Custom.DataEncryptionKey; using Newtonsoft.Json.Linq; + using System.Buffers.Text; [TestClass] public class MdeCustomEncryptionTests @@ -103,6 +104,47 @@ public async Task EncryptionCreateDek() Assert.AreEqual(dekProperties, readProperties); } + [TestMethod] + public async Task FetchDataEncryptionKeyWithRawKey() + { + CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(new TestEncryptionKeyStoreProvider()); + await dekProvider.InitializeAsync(MdeCustomEncryptionTests.database, MdeCustomEncryptionTests.keyContainer.Id); + DataEncryptionKey k = await dekProvider.FetchDataEncryptionKeyAsync(dekProperties.Id, dekProperties.EncryptionAlgorithm, CancellationToken.None); + Assert.IsNotNull(k.RawKey); + } + + [TestMethod] + public async Task FetchDataEncryptionKeyWithoutRawKey() + { + CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(new TestEncryptionKeyStoreProvider()); + await dekProvider.InitializeAsync(MdeCustomEncryptionTests.database, MdeCustomEncryptionTests.keyContainer.Id); + DataEncryptionKey k = await dekProvider.FetchDataEncryptionKeyWithoutRawKeyAsync(dekProperties.Id, dekProperties.EncryptionAlgorithm, CancellationToken.None); + Assert.IsNull(k.RawKey); + } + + [TestMethod] + [Obsolete] + public async Task FetchDataEncryptionKeyMdeDEKAndLegacyBasedAlgorithm() + { + CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(new TestEncryptionKeyStoreProvider()); + await dekProvider.InitializeAsync(MdeCustomEncryptionTests.database, MdeCustomEncryptionTests.keyContainer.Id); + DataEncryptionKey k = await dekProvider.FetchDataEncryptionKeyAsync(dekProperties.Id, CosmosEncryptionAlgorithm.AEAes256CbcHmacSha256Randomized, CancellationToken.None); + Assert.IsNotNull(k.RawKey); + } + + [TestMethod] + [Obsolete] + public async Task FetchDataEncryptionKeyLegacyDEKAndMdeBasedAlgorithm() + { + string dekId = "legacyDEK"; + DataEncryptionKeyProperties dekProperties = await MdeCustomEncryptionTests.CreateDekAsync(MdeCustomEncryptionTests.dekProvider, dekId, CosmosEncryptionAlgorithm.AEAes256CbcHmacSha256Randomized); + // Use different DEK provider to avoid (unintentional) cache impact + CosmosDataEncryptionKeyProvider dekProvider = new CosmosDataEncryptionKeyProvider(new TestKeyWrapProvider(), new TestEncryptionKeyStoreProvider()); + await dekProvider.InitializeAsync(MdeCustomEncryptionTests.database, MdeCustomEncryptionTests.keyContainer.Id); + DataEncryptionKey k = await dekProvider.FetchDataEncryptionKeyAsync(dekProperties.Id, CosmosEncryptionAlgorithm.MdeAeadAes256CbcHmac256Randomized, CancellationToken.None); + Assert.IsNotNull(k.RawKey); + } + [TestMethod] public async Task EncryptionRewrapDek() { @@ -2190,14 +2232,14 @@ public override async Task DecryptAsync( throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned."); } - DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync( + DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync( dataEncryptionKeyId, encryptionAlgorithm, cancellationToken); if (dek == null) { - throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync)}."); + throw new InvalidOperationException($"Null {nameof(DataEncryptionKey)} returned from {nameof(this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync)}."); } return dek.DecryptData(cipherText); @@ -2209,7 +2251,7 @@ public override async Task EncryptAsync( string encryptionAlgorithm, CancellationToken cancellationToken = default) { - DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyAsync( + DataEncryptionKey dek = await this.DataEncryptionKeyProvider.FetchDataEncryptionKeyWithoutRawKeyAsync( dataEncryptionKeyId, encryptionAlgorithm, cancellationToken); diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/CosmosEncryptorTests.cs b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/CosmosEncryptorTests.cs index 747bf3e295..63c5b370d1 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/CosmosEncryptorTests.cs +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/CosmosEncryptorTests.cs @@ -34,7 +34,7 @@ public static void ClassInitialize(TestContext testContext) CosmosEncryptorTests.mockDataEncryptionKeyProvider = new Mock(); CosmosEncryptorTests.mockDataEncryptionKeyProvider - .Setup(m => m.FetchDataEncryptionKeyAsync(It.IsAny(), It.IsAny(), It.IsAny())) + .Setup(m => m.FetchDataEncryptionKeyWithoutRawKeyAsync(It.IsAny(), It.IsAny(), It.IsAny())) .ReturnsAsync((string dekId, string algo, CancellationToken cancellationToken) => dekId == CosmosEncryptorTests.dekId ? CosmosEncryptorTests.mockDataEncryptionKey.Object : null); @@ -82,7 +82,7 @@ public async Task ValidateEncryptDecrypt() Times.Once); CosmosEncryptorTests.mockDataEncryptionKeyProvider.Verify( - m => m.FetchDataEncryptionKeyAsync( + m => m.FetchDataEncryptionKeyWithoutRawKeyAsync( CosmosEncryptorTests.dekId, CosmosEncryptionAlgorithm.MdeAeadAes256CbcHmac256Randomized, It.IsAny()), Times.Exactly(2)); From 9ba3f7539ee0b4dadb937dd47069f7c9a935ea4c Mon Sep 17 00:00:00 2001 From: Aditya Date: Wed, 3 May 2023 23:00:55 +0000 Subject: [PATCH 106/164] Initial commit (#3826) --- .../src/Linq/TranslationContext.cs | 6 +++ .../BaselineTest/BaselineTests.cs | 4 +- ...nqGeneralBaselineTests.TestLambdaReuse.xml | 38 +++++++++++++++++++ .../LinqGeneralBaselineTests.cs | 21 +++++++++- ...icrosoft.Azure.Cosmos.EmulatorTests.csproj | 6 +++ 5 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestLambdaReuse.xml diff --git a/Microsoft.Azure.Cosmos/src/Linq/TranslationContext.cs b/Microsoft.Azure.Cosmos/src/Linq/TranslationContext.cs index 9205052604..8fc95d8701 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/TranslationContext.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/TranslationContext.cs @@ -119,6 +119,7 @@ public void PopParameter() { ParameterExpression last = this.lambdaParametersStack[this.lambdaParametersStack.Count - 1]; this.lambdaParametersStack.RemoveAt(this.lambdaParametersStack.Count - 1); + this.substitutions.Remove(last); } /// @@ -337,6 +338,11 @@ public Expression Lookup(ParameterExpression parameter) return null; } + internal void Remove(ParameterExpression parameter) + { + this.substitutionTable.Remove(parameter); + } + public const string InputParameterName = "root"; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs index e9fbc54267..62f20f1fe4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/BaselineTests.cs @@ -153,8 +153,8 @@ public void ExecuteTestSuite(IEnumerable inputs, [CallerMemberName] stri Please run the ..\azure-cosmos-dotnet-v3\UpdateContracts.ps1 script to update the baselines. Expected: {baselineTextSuffix}, Actual: {outputTextSuffix}, - OutputPath: {outputPath}, - BaselinePath: {baselinePath}"); + OutputPath: {Path.GetFullPath(outputPath)}, + BaselinePath: {Path.GetFullPath(baselinePath)}"); } /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestLambdaReuse.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestLambdaReuse.xml new file mode 100644 index 0000000000..bd2e168e76 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqGeneralBaselineTests.TestLambdaReuse.xml @@ -0,0 +1,38 @@ + + + + Where with same predicate instance]]> + + + + + + + + + Select with same predicate instance]]> + + + + + + + + + Select -> Where with same predicate instance]]> + new AnonymousType(Int = 10, Result = c)).Where(DisplayClass.predicate2)]]> + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs index a9782bb26b..3fc3aff900 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqGeneralBaselineTests.cs @@ -1272,6 +1272,25 @@ orderby f.FamilyId descending this.ExecuteTestSuite(inputs); } + [TestMethod] + public void TestLambdaReuse() + { + List inputs = new List(); + + System.Linq.Expressions.Expression> predicate = f => f.Int == 5; + inputs.Add(new LinqTestInput("Where -> Where with same predicate instance", b => getQuery(b).Where(predicate).Where(predicate))); + inputs.Add(new LinqTestInput("Where -> Select with same predicate instance", b => getQuery(b).Where(predicate).Select(predicate))); + + System.Linq.Expressions.Expression> predicate2 = f => f.ToString() == "a"; + inputs.Add(new LinqTestInput("Where -> Select -> Where with same predicate instance", + b => getQuery(b) + .Where(predicate2) + .Select(c => new { Int = 10, Result = c }) + .Where(predicate2))); + + this.ExecuteTestSuite(inputs); + } + [TestMethod] public void TestThenByTranslation() { @@ -1922,7 +1941,7 @@ public async Task ValidateLinqQueries() Gender = "female", Grade = 1, Pets = new List() { pet, new Pet() { GivenName = "koko" } }, - Things = new Dictionary() { { "A", "B" }, { "C", "D" } }, + Things = new Dictionary() { { "A", "B" }, { "C", "D" } } }; Address address = new Address { State = "NY", County = "Manhattan", City = "NY" }; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index a504adc855..51891d7e3f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -35,6 +35,7 @@ + @@ -283,6 +284,11 @@ + + + PreserveNewest + + PreserveNewest From 17203a5966e906e0d66d52a95cf4d482add3c51e Mon Sep 17 00:00:00 2001 From: Aditya Date: Thu, 4 May 2023 03:54:27 +0000 Subject: [PATCH 107/164] Query: Adds Computed Property SDK Support (#3761) * Initial commit * Restored settings.json changes. * Update * Addressed comments; still need to be tested using Emulator. * Fixes after test run. * Ignored the computed property tests based on the sync this morning (to allow for preview release). * Suite0 fixes. * Test update. * Suite0 fixes --- .../Settings/ComputedPropertiesDefinition.cs | 60 ++ .../Fluent/Settings/ContainerDefinition.cs | 35 ++ .../src/Resource/Settings/ComputedProperty.cs | 53 ++ .../Resource/Settings/ContainerProperties.cs | 45 ++ .../ComputedPropertyComparer.cs | 45 ++ .../ComputedPropertyTests.cs | 549 ++++++++++++++++++ .../Fluent/ContainerSettingsTests.cs | 188 ++++++ .../Contracts/DotNetPreviewSDKAPI.json | 97 ++++ .../CosmosContainerSettingsTests.cs | 3 + .../ContainerDefinitionForCreateTests.cs | 50 ++ .../SettingsContractTests.cs | 63 +- 11 files changed, 1162 insertions(+), 26 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Fluent/Settings/ComputedPropertiesDefinition.cs create mode 100644 Microsoft.Azure.Cosmos/src/Resource/Settings/ComputedProperty.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyComparer.cs create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyTests.cs diff --git a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ComputedPropertiesDefinition.cs b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ComputedPropertiesDefinition.cs new file mode 100644 index 0000000000..41a6db5168 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ComputedPropertiesDefinition.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ +namespace Microsoft.Azure.Cosmos.Fluent +{ + using System; + using System.Collections.ObjectModel; + + /// + /// Computed Properties fluent definition. + /// + /// +#if PREVIEW + public +#else + internal +#endif + class ComputedPropertiesDefinition + { + private readonly Collection computedProperties = new Collection(); + private readonly T parent; + private readonly Action> attachCallback; + + internal ComputedPropertiesDefinition( + T parent, + Action> attachCallback) + { + this.parent = parent; + this.attachCallback = attachCallback; + } + + /// + /// Adds a computed property to the current + /// + /// Name of the computed property + /// Query for the computed property values + /// An instance of the current + public ComputedPropertiesDefinition WithComputedProperty(string name, string query) + { + this.computedProperties.Add( + new ComputedProperty + { + Name = name, + Query = query + }); + + return this; + } + + /// + /// Applies the current definition to the parent. + /// + /// An instance of the parent. + public T Attach() + { + this.attachCallback(this.computedProperties); + return this.parent; + } + } +} diff --git a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerDefinition.cs b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerDefinition.cs index a1141fc3f0..1678688c41 100644 --- a/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerDefinition.cs +++ b/Microsoft.Azure.Cosmos/src/Fluent/Settings/ContainerDefinition.cs @@ -4,6 +4,8 @@ namespace Microsoft.Azure.Cosmos.Fluent { using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; /// /// Azure Cosmos container fluent definition. @@ -18,6 +20,7 @@ public abstract class ContainerDefinition private IndexingPolicy indexingPolicy; private string timeToLivePropertyPath; private PartitionKeyDefinitionVersion? partitionKeyDefinitionVersion = null; + private Collection computedProperties; /// /// Creates an instance for unit-testing @@ -123,6 +126,28 @@ public IndexingPolicyDefinition WithIndexingPolicy() (indexingPolicy) => this.WithIndexingPolicy(indexingPolicy)); } + /// + /// definition for Azure Cosmos container. + /// + /// An instance of . +#if PREVIEW + public +#else + internal +#endif + ComputedPropertiesDefinition WithComputedProperties() + { + if (this.computedProperties != null) + { + // Overwrite + throw new NotSupportedException(); + } + + return new ComputedPropertiesDefinition( + (T)this, + (computedProperties) => this.WithComputedProperties(computedProperties)); + } + /// /// Applies the current Fluent definition and creates a container configuration. /// @@ -152,6 +177,11 @@ public ContainerProperties Build() containerProperties.PartitionKeyDefinitionVersion = this.partitionKeyDefinitionVersion.Value; } + if (this.computedProperties != null) + { + containerProperties.ComputedProperties = this.computedProperties; + } + containerProperties.ValidateRequiredProperties(); return containerProperties; @@ -161,5 +191,10 @@ private void WithIndexingPolicy(IndexingPolicy indexingPolicy) { this.indexingPolicy = indexingPolicy; } + + private void WithComputedProperties(Collection computedProperties) + { + this.computedProperties = computedProperties; + } } } diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ComputedProperty.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ComputedProperty.cs new file mode 100644 index 0000000000..9eaf5f806b --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ComputedProperty.cs @@ -0,0 +1,53 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos +{ + using System.Collections.Generic; + using Newtonsoft.Json; + using Newtonsoft.Json.Linq; + + /// + /// Represents a computed property definition in a Cosmos DB collection. + /// +#if PREVIEW + public +#else + internal +#endif + sealed class ComputedProperty + { + /// + /// Gets or sets the name of the computed property. + /// + /// + /// The name of the computed property. + /// + /// + /// Name of the computed property should be chosen such that it does not collide with any existing or future document properties. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the query for the computed property. + /// + /// + /// The query used to evaluate the value for the computed property. + /// + /// + /// For example: + /// SELECT VALUE LOWER(c.firstName) FROM c + /// + [JsonProperty(PropertyName = "query")] + public string Query { get; set; } + + /// + /// This contains additional values for scenarios where the SDK is not aware of new fields. + /// This ensures that if resource is read and updated none of the fields will be lost in the process. + /// + [JsonExtensionData] + internal IDictionary AdditionalProperties { get; private set; } + } +} diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs index 94cb93cff5..534f4f033d 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/ContainerProperties.cs @@ -78,6 +78,9 @@ public class ContainerProperties [JsonProperty(PropertyName = "clientEncryptionPolicy", NullValueHandling = NullValueHandling.Ignore)] private ClientEncryptionPolicy clientEncryptionPolicyInternal; + [JsonProperty(PropertyName = "computedProperties", NullValueHandling = NullValueHandling.Ignore)] + private Collection computedProperties; + /// /// This contains additional values for scenarios where the SDK is not aware of new fields. /// This ensures that if resource is read and updated none of the fields will be lost in the process. @@ -286,6 +289,48 @@ public IndexingPolicy IndexingPolicy } } + /// + /// Gets or sets the collection containing objects in the container. + /// + /// + /// The collection containing objects associated with the container. + /// + + /// + /// Gets or sets the collection containing objects in the container. + /// + /// + /// The collection containing objects associated with the container. + /// + [JsonIgnore] +#if PREVIEW + public +#else + internal +#endif + Collection ComputedProperties + { + get + { + if (this.computedProperties == null) + { + this.computedProperties = new Collection(); + } + + return this.computedProperties; + } + + set + { + if (value == null) + { + throw new ArgumentException($"{nameof(value)}"); + } + + this.computedProperties = value; + } + } + /// /// Gets the associated with the container from the Azure Cosmos DB service. /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyComparer.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyComparer.cs new file mode 100644 index 0000000000..486e785978 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyComparer.cs @@ -0,0 +1,45 @@ +namespace Microsoft.Azure.Cosmos +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Diagnostics.CodeAnalysis; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + class ComputedPropertyComparer : IEqualityComparer + { + public static void AssertAreEqual(Collection expected, Collection actual) + { + int expectedCount = expected?.Count ?? 0; + int actualCount = actual?.Count ?? 0; + Assert.AreEqual(expectedCount, actualCount); + + for (int i = 0; i < expectedCount; i++) + { + AssertAreEqual(expected[i], actual[i]); + } + } + + public static void AssertAreEqual(ComputedProperty expected, ComputedProperty actual) + { + ComputedPropertyComparer comparer = new ComputedPropertyComparer(); + Assert.IsTrue(comparer.Equals(expected, actual), $"Expected: {ToString(expected)}{Environment.NewLine}Actual:{ToString(actual)}"); + } + + private static string ToString(ComputedProperty computedProperty) => $@"""Name"":""{computedProperty.Name}"", ""Query"":""{computedProperty.Query}"""; + + public bool Equals(ComputedProperty x, ComputedProperty y) + { + if (x == null) return y == null; + if (y == null) return false; + + return (x.Name?.Equals(y.Name) == true) && + (x.Query?.Equals(y.Query) == true); + } + + public int GetHashCode([DisallowNull] ComputedProperty obj) + { + return obj.GetHashCode(); + } + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyTests.cs new file mode 100644 index 0000000000..a2c7f552ee --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ComputedPropertyTests.cs @@ -0,0 +1,549 @@ +namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Diagnostics; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using global::Azure; + using Microsoft.Azure.Cosmos.CosmosElements; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class ComputedPropertyTests + { + private static readonly CosmosClient cosmosClient; + private static readonly Database database; + + private static readonly ComputedProperty LowerName; + private static readonly ComputedProperty ParentsFullName; + private static readonly Collection AllComputedProperties; + + private static readonly IndexingPolicy IndexAllComputedProperties_IncludeAll; + private static readonly IndexingPolicy IndexAllComputedProperties_ExcludeAll; + private static readonly IndexingPolicy IndexDefault_IncludeAll; + private static readonly IndexingPolicy IndexDefault_ExcludeAll; + + private static readonly string SelectAllComputedPropertiesQuery; + private static readonly List AllComputedPropertiesResult; + private static readonly List EmptyResult; + + static ComputedPropertyTests() + { + cosmosClient = TestCommon.CreateCosmosClient(); + database = cosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()).Result; + + LowerName = new ComputedProperty + { + Name = "lowerLastName", + Query = "SELECT VALUE LOWER(IS_DEFINED(c.lastName) ? c.lastName : c.parents[0].familyName) FROM c" + }; + ParentsFullName = new ComputedProperty + { + Name = "parentsFullName", + Query = "SELECT VALUE CONCAT(CONCAT(c.parents[0].firstName, ' ', c.lastName), ' & ', CONCAT(c.parents[1].firstName, ' ', c.lastName)) FROM c" + }; + AllComputedProperties = new Collection { { LowerName }, { ParentsFullName } }; + + IndexAllComputedProperties_IncludeAll = new IndexingPolicy + { + IncludedPaths = new Collection + { + { new IncludedPath { Path = $"/{LowerName.Name}/*" } }, + { new IncludedPath { Path = $"/{ParentsFullName.Name}/*" } }, + { new IncludedPath { Path = $"/*" } }, + } + }; + IndexAllComputedProperties_ExcludeAll = new IndexingPolicy + { + IncludedPaths = new Collection + { + { new IncludedPath { Path = $"/{LowerName.Name}/*" } }, + { new IncludedPath { Path = $"/{ParentsFullName.Name}/*" } }, + }, + ExcludedPaths = new Collection + { + { new ExcludedPath { Path = $"/*" } } + } + }; + IndexDefault_IncludeAll = new IndexingPolicy + { + IncludedPaths = new Collection + { + { new IncludedPath { Path = $"/*" } }, + } + }; + IndexDefault_ExcludeAll = new IndexingPolicy + { + ExcludedPaths = new Collection + { + { new ExcludedPath { Path = $"/*" } } + } + }; + + SelectAllComputedPropertiesQuery = @"SELECT c.lowerLastName, c.parentsFullName FROM c"; + AllComputedPropertiesResult = new List + { + $@"{{{Environment.NewLine} ""lowerLastName"": ""andersen"",{Environment.NewLine} ""parentsFullName"": ""Thomas Andersen & Mary Kay Andersen""{Environment.NewLine}}}", + $@"{{{Environment.NewLine} ""lowerLastName"": ""wakefield""{Environment.NewLine}}}" + }; + EmptyResult = new List + { + @"{}", + @"{}" + }; + } + + [ClassCleanup] + public static async Task Cleanup() + { + await database?.DeleteAsync(); + } + + [Ignore] + [TestMethod] + public async Task TestComputedProperties() + { + TestVariation[] variations = new TestVariation[] + { + ///////////////// + // Create tests + ///////////////// + new TestVariation + { + Description = "V1: null; V2: Empty", + V1 = new ContainerState + { + ComputedProperties = null, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + }, + V2 = new ContainerState + { + ComputedProperties = new Collection(), + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + } + }, + new TestVariation + { + Description = "V1: default; V2: All computed properties, no indexing", + V1 = new ContainerState(), + V2 = new ContainerState + { + ComputedProperties = AllComputedProperties, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + } + }, + new TestVariation + { + Description = "V1: default; V2: All computed properties, indexed, exclude /*", + V1 = new ContainerState(), + V2 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexAllComputedProperties_ExcludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + } + }, + new TestVariation + { + Description = "V1: default; V2: All computed properties, indexed, include /*", + V1 = new ContainerState(), + V2 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexAllComputedProperties_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + }, + new TestVariation + { + Description = "V1: default; V2: All computed properties, not indexed, exclude /*", + V1 = new ContainerState(), + V2 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexDefault_ExcludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + }, + new TestVariation + { + Description = "V1: default; V2: All computed properties, not indexed, include /*", + V1 = new ContainerState(), + V2 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + } + }, + new TestVariation + { + Description = "V1: one computed property; V2: All computed properties, not indexed, include /*", + V1 = new ContainerState() + { + ComputedProperties = new Collection{ LowerName }, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = new List + { + $@"{{{Environment.NewLine} ""lowerLastName"": ""andersen""{Environment.NewLine}}}", + $@"{{{Environment.NewLine} ""lowerLastName"": ""wakefield""{Environment.NewLine}}}" + } + }, + V2 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + } + }, + + ///////////////// + // Replace tests + ///////////////// + new TestVariation + { + Description = "V1: one computed property; V2: other computed property, not indexed, include /*", + V1 = new ContainerState() + { + ComputedProperties = new Collection{ LowerName }, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = new List + { + $@"{{{Environment.NewLine} ""lowerLastName"": ""andersen""{Environment.NewLine}}}", + $@"{{{Environment.NewLine} ""lowerLastName"": ""wakefield""{Environment.NewLine}}}" + } + }, + V2 = new ContainerState + { + ComputedProperties = new Collection{ ParentsFullName }, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = new List + { + $@"{{{Environment.NewLine} ""parentsFullName"": ""Thomas Andersen & Mary Kay Andersen""{Environment.NewLine}}}", + @"{}" + } + } + }, + new TestVariation + { + Description = "V1: one computed property; V2: updated computed property definition, not indexed, include /*", + V1 = new ContainerState() + { + ComputedProperties = new Collection{ LowerName }, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = new List + { + $@"{{{Environment.NewLine} ""lowerLastName"": ""andersen""{Environment.NewLine}}}", + $@"{{{Environment.NewLine} ""lowerLastName"": ""wakefield""{Environment.NewLine}}}" + } + }, + V2 = new ContainerState + { + ComputedProperties = new Collection + { + new ComputedProperty + { + Name = "lowerLastName", + Query = "SELECT VALUE LOWER(c.lastName) FROM c" + } + }, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = new List + { + $@"{{{Environment.NewLine} ""lowerLastName"": ""andersen""{Environment.NewLine}}}", + @"{}" + } + } + }, + + ///////////////// + // Drop tests + ///////////////// + new TestVariation + { + Description = "V1: All computed properties; V2: null", + V1 = new ContainerState + { + ComputedProperties = AllComputedProperties, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + V2 = new ContainerState + { + ComputedProperties = null, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + } + }, + new TestVariation + { + Description = "V1: All computed properties; V2: only 1 computed property", + V1 = new ContainerState + { + ComputedProperties = AllComputedProperties, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + V2 = new ContainerState + { + ComputedProperties = new Collection{ LowerName }, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = new List + { + $@"{{{Environment.NewLine} ""lowerLastName"": ""andersen""{Environment.NewLine}}}", + $@"{{{Environment.NewLine} ""lowerLastName"": ""wakefield""{Environment.NewLine}}}" + } + } + }, + new TestVariation + { + Description = "V1: All computed properties, indexed, exclude /*; V2: null", + V1 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexAllComputedProperties_ExcludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + V2 = new ContainerState + { + ComputedProperties = null, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + } + }, + new TestVariation + { + Description = "V1: All computed properties, indexed, include /*; V2: null", + V1 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexAllComputedProperties_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + V2 = new ContainerState + { + ComputedProperties = null, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + } + }, + new TestVariation + { + Description = "V1: All computed properties, not indexed, exclude /*; V2: null", + V1 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexDefault_ExcludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + V2 = new ContainerState + { + ComputedProperties = null, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + } + }, + new TestVariation + { + Description = "V1: All computed properties, not indexed, include /*; V2: null", + V1 = new ContainerState + { + ComputedProperties = AllComputedProperties, + IndexingPolicy = IndexDefault_IncludeAll, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = AllComputedPropertiesResult + }, + V2 = new ContainerState + { + ComputedProperties = null, + Query = SelectAllComputedPropertiesQuery, + ExpectedDocuments = EmptyResult + } + } + }; + + int i = 0; + foreach (TestVariation variation in variations) + { + Console.WriteLine($"Variation {i++} : {variation.Description}"); + await this.RunTest(variation); + } + } + + private async Task RunTest(TestVariation variation) + { + Container container = await this.CreateOrReplace(container: null, containerState: variation.V1); + return await this.CreateOrReplace(container, containerState: variation.V2); + } + + private async Task CreateOrReplace(Container container, ContainerState containerState) + { + ContainerProperties containerProperties = new ContainerProperties(container?.Id ?? Guid.NewGuid().ToString(), "/id") + { + IndexingPolicy = containerState.IndexingPolicy ?? new IndexingPolicy(), + ComputedProperties = containerState.ComputedProperties ?? new Collection(), + }; + + ContainerResponse response = container == null ? + await database.CreateContainerAsync(containerProperties) : + await container.ReplaceContainerAsync(containerProperties); + + this.ValidateComputedProperties(containerState.ComputedProperties, response.Resource.ComputedProperties); + + if (container == null) + { + await this.InsertDocuments(response.Container); + } + else + { + // Sometimes the container changes are not immediately reflected in the query. + // We force a insert-delete after container replacement, which seems to help with this problem. + // If this still doesn't help with the flakiness, we need to find other ways of running the query scenario. + // One alternative is to wait for V2 for all test variations to take effect + // and then run queries separately on each container. + await this.DeleteReinsertDocuments(response.Container); + } + + if (!string.IsNullOrEmpty(containerState.Query)) + { + List results = await this.QueryItems(response.Container, containerState.Query); + + Assert.AreEqual(containerState.ExpectedDocuments.Count, results.Count); + for (int i = 0; i < containerState.ExpectedDocuments.Count; i++) + { + Assert.AreEqual(containerState.ExpectedDocuments[i], results[i]); + } + } + + return response.Container; + } + + private async Task DeleteReinsertDocuments(Container container) + { + foreach (CosmosObject document in Documents) + { + string id = ((CosmosString)document["id"]).Value; + await container.DeleteItemAsync(id, new PartitionKey(id)); + } + + await this.InsertDocuments(container); + } + + private async Task InsertDocuments(Container container) + { + foreach(CosmosObject document in Documents) + { + await container.CreateItemAsync(document); + } + } + + private async Task> QueryItems(Container container, string query) + { + List results = new List(); + FeedIterator iterator = container.GetItemQueryIterator(query); + do + { + FeedResponse page = await iterator.ReadNextAsync(); + results.AddRange(page.Select(item => item.ToString())); + } while (iterator.HasMoreResults); + + return results; + } + + private void ValidateComputedProperties(Collection expected, Collection actual) + { + ComputedPropertyComparer.AssertAreEqual(expected, actual); + } + + private class TestVariation + { + public string Description { get; set; } + public ContainerState V1 { get; set; } + public ContainerState V2 { get; set; } + } + + private class ContainerState + { + public Collection ComputedProperties { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public List ExpectedDocuments { get; set; } + public string Query { get; set; } + } + + private static readonly CosmosObject AndersenFamily = CosmosObject.Parse(@" + { + ""id"": ""AndersenFamily"", + ""lastName"": ""Andersen"", + ""parents"": [ + { ""firstName"": ""Thomas"" }, + { ""firstName"": ""Mary Kay""} + ], + ""children"": [ + { + ""firstName"": ""Henriette Thaulow"", + ""gender"": ""female"", + ""grade"": 5, + ""pets"": [{ ""givenName"": ""Fluffy"" }] + } + ], + ""address"": { ""state"": ""WA"", ""county"": ""King"", ""city"": ""seattle"" }, + ""creationDate"": 1431620472, + ""isRegistered"": true, + ""_rid"": ""0fomAIxnukU1AQAAAAAAAA=="" + }"); + + private static readonly CosmosObject WakefieldFamily = CosmosObject.Parse(@" + { + ""id"": ""WakefieldFamily"", + ""parents"": [ + { ""familyName"": ""Wakefield"", ""givenName"": ""Robin"" }, + { ""familyName"": ""Miller"", ""givenName"": ""Ben"" } + ], + ""children"": [ + { + ""familyName"": ""Merriam"", + ""givenName"": ""Jesse"", + ""gender"": ""female"", ""grade"": 1, + ""pets"": [ + { ""givenName"": ""Goofy"" }, + { ""givenName"": ""Shadow"" } + ] + }, + { + ""familyName"": ""Miller"", + ""givenName"": ""Lisa"", + ""gender"": ""female"", + ""grade"": 8 } + ], + ""address"": { ""state"": ""NY"", ""county"": ""Manhattan"", ""city"": ""NY"" }, + ""creationDate"": 1431620462, + ""isRegistered"": false, + ""_rid"": ""0fomAIxnukU1AQAAAAAAAB=="" + }"); + + private static readonly CosmosElement[] Documents = new CosmosElement[] + { + AndersenFamily, + WakefieldFamily, + }; + } +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs index 9de85f9f7e..8eb72cac25 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Fluent/ContainerSettingsTests.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; using System; + using System.Collections.Generic; using System.Collections.ObjectModel; using System.IO; using System.Linq; @@ -98,6 +99,11 @@ public async Task ContainerContractTest() } } }, + // ComputedProperties = new Collection + // { + // { new ComputedProperty{ Name = "lowerName", Query = "SELECT VALUE LOWER(c.Name) FROM c" } }, + // { new ComputedProperty{ Name = "fullName", Query = "SELECT VALUE CONCAT(c.Name, ' ', c.LastName) FROM c" } } + // }, ClientEncryptionPolicy = new ClientEncryptionPolicy(paths) }; @@ -140,6 +146,129 @@ public async Task ContainerContractTest() Assert.IsTrue(responseProperties.ClientEncryptionPolicy.PolicyFormatVersion <= 2); ClientEncryptionIncludedPath clientEncryptionIncludedPath = responseProperties.ClientEncryptionPolicy.IncludedPaths.First(); Assert.IsTrue(this.VerifyClientEncryptionIncludedPath(clientEncryptionIncludedPath1, clientEncryptionIncludedPath)); + + ComputedPropertyComparer.AssertAreEqual(containerProperties.ComputedProperties, responseProperties.ComputedProperties); + ComputedPropertyComparer.AssertAreEqual(containerProperties.ComputedProperties, deserialziedTest.ComputedProperties); + } + + [Ignore] + [TestMethod] + public async Task ContainerNegativeComputedPropertyTest() + { + string query = "SELECT VALUE LOWER(c.name) FROM c"; + var variations = new[] + { + new + { + ComputedProperties = new Collection + { + new ComputedProperty {Name = "lowerName", Query = @"SELECT VALUE LOWER(c.name) FROM c"}, + new ComputedProperty {Name = "lowerName", Query = @"SELECT VALUE LOWER(c.lastName) FROM c"} + }, + Error = @"""Errors"":[""Computed property name 'lowerName' cannot be used in multiple definitions.""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty { Query = query } }, + Error = @"""Errors"":[""One of the specified inputs is invalid""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty { Name = "", Query = query } }, + Error = @"""Errors"":[""Computed property 'name' is either empty or unspecified.""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty { Name = "lowerName" } }, + Error = @"""Errors"":[""One of the specified inputs is invalid""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty { Name = "lowerName", Query = "" } }, + Error = @"""Errors"":[""Computed property 'query' is either empty or unspecified.""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty { Name = "id", Query = query } }, + Error = @"""Errors"":[""The system property name 'id' cannot be used as a computed property name.""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty { Name = "spatial", Query = query } }, + Error = @"""Errors"":[""Computed property 'spatial' at index (0) has a spatial index. Remove the spatial index on this path.""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty {Name = "lowerName", Query = @"SELECT LOWER(c.name) FROM c"} }, + Error = @"""Errors"":[""Required VALUE expression missing from computed property query 'SELECT LOWER(c.name) FROM c' at index (0).""]" + }, + new + { + ComputedProperties = new Collection{ new ComputedProperty {Name = "lowerName", Query = @"SELECT LOWER(c.name) FROM r"} }, + Error = @"""Errors"":[""Computed property at index (0) has a malformed query: 'SELECT LOWER(c.name) FROM r' Error details: '{\""errors\"":[{\""severity\"":\""Error\"",\""code\"":2001,\""message\"":\""Identifier 'c' could not be resolved.\""}]}'""]" + }, + }; + + IndexingPolicy indexingPolicy = new IndexingPolicy + { + SpatialIndexes = new Collection + { + new SpatialPath + { + Path = "/spatial/*", + SpatialTypes = new Collection() + { + Cosmos.SpatialType.LineString, + Cosmos.SpatialType.MultiPolygon, + Cosmos.SpatialType.Point, + Cosmos.SpatialType.Polygon, + } + } + } + }; + + // Create + foreach (var variation in variations) + { + ContainerProperties containerProperties = new ContainerProperties(Guid.NewGuid().ToString(), "/users") + { + IndexingPolicy = indexingPolicy, + GeospatialConfig = new GeospatialConfig(GeospatialType.Geography), + ComputedProperties = variation.ComputedProperties + }; + + try + { + ContainerResponse response = await this.database.CreateContainerAsync(containerProperties); + Assert.Fail($@"Computed Property '{variation.ComputedProperties.Last().Name}' Query '{variation.ComputedProperties.Last().Query}' was expected to fail with error '{variation.Error}'."); + } + catch (CosmosException ce) when (ce.StatusCode == HttpStatusCode.BadRequest) + { + Assert.IsTrue(ce.Message.Contains(variation.Error), $"Message expected to contain:'{variation.Error}'{Environment.NewLine}Actual Message: '{ce.Message}'"); + } + } + + // Replace + Container containerToReplace = await this.database.CreateContainerAsync(new ContainerProperties(Guid.NewGuid().ToString(), "/users")); + foreach (var variation in variations) + { + ContainerProperties containerProperties = new ContainerProperties(Guid.NewGuid().ToString(), "/users") + { + IndexingPolicy = indexingPolicy, + GeospatialConfig = new GeospatialConfig(GeospatialType.Geography), + ComputedProperties = variation.ComputedProperties + }; + + try + { + ContainerResponse response = await containerToReplace.ReplaceContainerAsync(containerProperties); + Assert.Fail($@"Computed Property '{variation.ComputedProperties.Last().Name}' Query '{variation.ComputedProperties.Last().Query}' was expected to fail with error '{variation.Error}'."); + } + catch (CosmosException ce) when (ce.StatusCode == HttpStatusCode.BadRequest) + { + Assert.IsTrue(ce.Message.Contains(variation.Error), $"Message expected to contain:'{variation.Error}'{Environment.NewLine}Actual Message: '{ce.Message}'"); + } + } } [TestMethod] @@ -230,6 +359,17 @@ public async Task ContainerMigrationTest() SpatialTypes = new Collection() { SpatialType.Point } }); + // List computedProperties = new List + // { + // new ComputedProperty() { Name = "lowerName", Query = "SELECT VALUE LOWER(c.name) FROM c" }, + // new ComputedProperty() { Name = "estimatedTax", Query = "SELECT VALUE c.salary * 0.2 FROM c" } + // }; + + // foreach (ComputedProperty computedProperty in computedProperties) + // { + // containerProperties.ComputedProperties.Add(computedProperty); + // } + ContainerProperties propertiesAfterReplace = await container.ReplaceContainerAsync(containerProperties); Assert.AreEqual(0, propertiesAfterReplace.IndexingPolicy.IncludedPaths.First().Indexes.Count); Assert.AreEqual(1, propertiesAfterReplace.IndexingPolicy.CompositeIndexes.Count); @@ -242,6 +382,8 @@ public async Task ContainerMigrationTest() Assert.AreEqual(1, propertiesAfterReplace.IndexingPolicy.SpatialIndexes.Count); Assert.AreEqual("/address/test/*", propertiesAfterReplace.IndexingPolicy.SpatialIndexes.First().Path); + + ComputedPropertyComparer.AssertAreEqual(containerProperties.ComputedProperties, propertiesAfterReplace.ComputedProperties); } [TestMethod] @@ -449,6 +591,52 @@ await this.database.DefineContainer(containerName, partitionKeyPath) Assert.AreEqual(HttpStatusCode.NoContent, containerResponse.StatusCode); } + [Ignore] + [TestMethod] + public async Task WithComputedProperties() + { + string containerName = Guid.NewGuid().ToString(); + string partitionKeyPath = "/users"; + + var definitions = new[] + { + new { Name = "lowerName", Query = "SELECT VALUE LOWER(c.name) FROM c" }, + new { Name = "estimatedTax", Query = "SELECT VALUE c.salary * 0.2 FROM c" } + }; + ContainerResponse containerResponse = + await this.database.DefineContainer(containerName, partitionKeyPath) + .WithComputedProperties() + .WithComputedProperty(definitions[0].Name, definitions[0].Query) + .WithComputedProperty(definitions[1].Name, definitions[1].Query) + .Attach() + .CreateAsync(); + + Assert.AreEqual(HttpStatusCode.Created, containerResponse.StatusCode); + Assert.AreEqual(containerName, containerResponse.Resource.Id); + Assert.AreEqual(partitionKeyPath, containerResponse.Resource.PartitionKey.Paths.First()); + + Assert.AreEqual(2, containerResponse.Resource.ComputedProperties.Count); + Assert.AreEqual(definitions[0].Name, containerResponse.Resource.ComputedProperties[0].Name); + Assert.AreEqual(definitions[0].Query, containerResponse.Resource.ComputedProperties[0].Query); + Assert.AreEqual(definitions[1].Name, containerResponse.Resource.ComputedProperties[1].Name); + Assert.AreEqual(definitions[1].Query, containerResponse.Resource.ComputedProperties[1].Query); + + Container container = containerResponse; + containerResponse = await container.ReadContainerAsync(); + Assert.AreEqual(HttpStatusCode.OK, containerResponse.StatusCode); + Assert.AreEqual(containerName, containerResponse.Resource.Id); + Assert.AreEqual(partitionKeyPath, containerResponse.Resource.PartitionKey.Paths.First()); + + Assert.AreEqual(2, containerResponse.Resource.ComputedProperties.Count); + Assert.AreEqual(definitions[0].Name, containerResponse.Resource.ComputedProperties[0].Name); + Assert.AreEqual(definitions[0].Query, containerResponse.Resource.ComputedProperties[0].Query); + Assert.AreEqual(definitions[1].Name, containerResponse.Resource.ComputedProperties[1].Name); + Assert.AreEqual(definitions[1].Query, containerResponse.Resource.ComputedProperties[1].Query); + + containerResponse = await containerResponse.Container.DeleteContainerAsync(); + Assert.AreEqual(HttpStatusCode.NoContent, containerResponse.StatusCode); + } + [TestMethod] public async Task ThroughputTest() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index 8a3d326d50..ab29c95bf0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -253,6 +253,59 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.ComputedProperty;System.Object;IsAbstract:False;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "System.String get_Name()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.String get_Name();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.String get_Query()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.String get_Query();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.String Name[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"name\")]": { + "Type": "Property", + "Attributes": [ + "JsonPropertyAttribute" + ], + "MethodInfo": "System.String Name;CanRead:True;CanWrite:True;System.String get_Name();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_Name(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.String Query[Newtonsoft.Json.JsonPropertyAttribute(PropertyName = \"query\")]": { + "Type": "Property", + "Attributes": [ + "JsonPropertyAttribute" + ], + "MethodInfo": "System.String Query;CanRead:True;CanWrite:True;System.String get_Query();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_Query(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void .ctor()": { + "Type": "Constructor", + "Attributes": [], + "MethodInfo": "[Void .ctor(), Void .ctor()]" + }, + "Void set_Name(System.String)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_Name(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_Query(System.String)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_Query(System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.Container;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { @@ -284,10 +337,27 @@ "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedPolicy get_ChangeFeedPolicy();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty] ComputedProperties[Newtonsoft.Json.JsonIgnoreAttribute()]": { + "Type": "Property", + "Attributes": [ + "JsonIgnoreAttribute" + ], + "MethodInfo": "System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty] ComputedProperties;CanRead:True;CanWrite:True;System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty] get_ComputedProperties();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_ComputedProperties(System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty] get_ComputedProperties()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty] get_ComputedProperties();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy)": { "Type": "Method", "Attributes": [], "MethodInfo": "Void set_ChangeFeedPolicy(Microsoft.Azure.Cosmos.ChangeFeedPolicy);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_ComputedProperties(System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty])": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Void set_ComputedProperties(System.Collections.ObjectModel.Collection`1[Microsoft.Azure.Cosmos.ComputedProperty]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} @@ -328,6 +398,22 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.Fluent.ComputedPropertiesDefinition`1;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:True;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "Microsoft.Azure.Cosmos.Fluent.ComputedPropertiesDefinition`1[T] WithComputedProperty(System.String, System.String)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ComputedPropertiesDefinition`1[T] WithComputedProperty(System.String, System.String);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "T Attach()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "T Attach();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.Fluent.ContainerBuilder;Microsoft.Azure.Cosmos.Fluent.ContainerDefinition`1[[Microsoft.Azure.Cosmos.Fluent.ContainerBuilder, ]];IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { @@ -339,6 +425,17 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.Fluent.ContainerDefinition`1;System.Object;IsAbstract:True;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:True;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "Microsoft.Azure.Cosmos.Fluent.ComputedPropertiesDefinition`1[T] WithComputedProperties()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.Fluent.ComputedPropertiesDefinition`1[T] WithComputedProperties();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.Fluent.CosmosClientBuilder;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs index 865bb71d18..bda132d6a3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosContainerSettingsTests.cs @@ -33,6 +33,9 @@ public void DefaultIncludesPopulated() Cosmos.IncludedPath defaultEntry = containerSettings.IndexingPolicy.IncludedPaths[0]; Assert.AreEqual(Cosmos.IndexingPolicy.DefaultPath, defaultEntry.Path); Assert.AreEqual(0, defaultEntry.Indexes.Count); + + Assert.IsNotNull(containerSettings.ComputedProperties); + Assert.AreEqual(0, containerSettings.ComputedProperties.Count); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Fluent/ContainerDefinitionForCreateTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Fluent/ContainerDefinitionForCreateTests.cs index 58361f89bb..d94aed92a4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Fluent/ContainerDefinitionForCreateTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Fluent/ContainerDefinitionForCreateTests.cs @@ -251,6 +251,56 @@ await containerFluentDefinitionForCreate It.IsAny()), Times.Once); } + [Ignore] + [TestMethod] + public async Task WithComputedProperties() + { + Mock mockContainerResponse = new Mock(MockBehavior.Strict); + Mock mockDatabase = new Mock(MockBehavior.Strict); + Mock mockClient = new Mock(MockBehavior.Strict); + mockDatabase.Setup(m => m.Client).Returns(mockClient.Object); + mockDatabase + .Setup(c => c.CreateContainerAsync( + It.IsAny(), + It.IsAny(), + It.IsAny(), + It.IsAny())) + .ReturnsAsync(mockContainerResponse.Object); + mockDatabase + .Setup(c => c.Id) + .Returns(Guid.NewGuid().ToString()); + + ContainerBuilder containerFluentDefinitionForCreate = new ContainerBuilder( + mockDatabase.Object, + containerName, + partitionKey); + + var definitions = new[] + { + new { Name = "lowerName", Query = "SELECT VALUE LOWER(c.name) FROM c" }, + new { Name = "estimatedTax", Query = "SELECT VALUE c.salary * 0.2 FROM c" } + }; + await containerFluentDefinitionForCreate + .WithComputedProperties() + .WithComputedProperty(definitions[0].Name, definitions[0].Query) + .WithComputedProperty(definitions[1].Name, definitions[1].Query) + .Attach() + .CreateAsync(); + + mockDatabase.Verify(c => c.CreateContainerAsync( + It.Is((settings) => + settings.ComputedProperties.Count == 2 && + definitions[0].Name.Equals(settings.ComputedProperties[0].Name) && + definitions[0].Query.Equals(settings.ComputedProperties[0].Query) && + definitions[1].Name.Equals(settings.ComputedProperties[1].Name) && + definitions[1].Query.Equals(settings.ComputedProperties[1].Query) + ), + It.IsAny(), + It.IsAny(), + It.IsAny()), + Times.Once); + } + [TestMethod] public async Task WithUniqueKey() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs index 239de170de..2e8df92318 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/SettingsContractTests.cs @@ -339,7 +339,7 @@ public void AccountPropertiesDeserializeWithAdditionalDataTest() [TestMethod] public void ContainerPropertiesDeserializeWithAdditionalDataTest() { - string cosmosSerialized = "{\"indexingPolicy\":{\"automatic\":true,\"indexingMode\":\"Consistent\",\"additionalIndexPolicy\":\"indexpolicyvalue\",\"includedPaths\":[{\"path\":\"/included/path\",\"additionalIncludedPath\":\"includedPathValue\",\"indexes\":[]}],\"excludedPaths\":[{\"path\":\"/excluded/path\",\"additionalExcludedPath\":\"excludedPathValue\"}],\"compositeIndexes\":[[{\"path\":\"/composite/path\",\"additionalCompositeIndex\":\"compositeIndexValue\",\"order\":\"ascending\"}]],\"spatialIndexes\":[{\"path\":\"/spatial/path\",\"additionalSpatialIndexes\":\"spatialIndexValue\",\"types\":[]}]},\"geospatialConfig\":{\"type\":\"Geography\",\"additionalGeospatialConfig\":\"geospatialConfigValue\"},\"uniqueKeyPolicy\":{\"additionalUniqueKeyPolicy\":\"uniqueKeyPolicyValue\",\"uniqueKeys\":[{\"paths\":[\"/unique/key/path/1\",\"/unique/key/path/2\"]}]},\"conflictResolutionPolicy\":{\"mode\":\"LastWriterWins\",\"additionalConflictResolutionPolicy\":\"conflictResolutionValue\"},\"clientEncryptionPolicy\":{\"includedPaths\":[{\"path\":\"/path\",\"clientEncryptionKeyId\":\"clientEncryptionKeyId\",\"encryptionType\":\"Randomized\",\"additionalIncludedPath\":\"includedPathValue\",\"encryptionAlgorithm\":\"AEAD_AES_256_CBC_HMAC_SHA256\"}],\"policyFormatVersion\":1,\"additionalEncryptionPolicy\":\"clientEncryptionpolicyValue\"},\"id\":\"2a9f501b-6948-4795-8fd1-797defb5c466\",\"partitionKey\":{\"paths\":[],\"kind\":\"Hash\"}}"; + string cosmosSerialized = "{\"indexingPolicy\":{\"automatic\":true,\"indexingMode\":\"Consistent\",\"additionalIndexPolicy\":\"indexpolicyvalue\",\"includedPaths\":[{\"path\":\"/included/path\",\"additionalIncludedPath\":\"includedPathValue\",\"indexes\":[]}],\"excludedPaths\":[{\"path\":\"/excluded/path\",\"additionalExcludedPath\":\"excludedPathValue\"}],\"compositeIndexes\":[[{\"path\":\"/composite/path\",\"additionalCompositeIndex\":\"compositeIndexValue\",\"order\":\"ascending\"}]],\"spatialIndexes\":[{\"path\":\"/spatial/path\",\"additionalSpatialIndexes\":\"spatialIndexValue\",\"types\":[]}]},\"computedProperties\":[{\"name\":\"lowerName\",\"query\":\"SELECT VALUE LOWER(c.name) FROM c\"},{\"name\":\"estimatedTax\",\"query\":\"SELECT VALUE c.salary * 0.2 FROM c\"}],\"geospatialConfig\":{\"type\":\"Geography\",\"additionalGeospatialConfig\":\"geospatialConfigValue\"},\"uniqueKeyPolicy\":{\"additionalUniqueKeyPolicy\":\"uniqueKeyPolicyValue\",\"uniqueKeys\":[{\"paths\":[\"/unique/key/path/1\",\"/unique/key/path/2\"]}]},\"conflictResolutionPolicy\":{\"mode\":\"LastWriterWins\",\"additionalConflictResolutionPolicy\":\"conflictResolutionValue\"},\"clientEncryptionPolicy\":{\"includedPaths\":[{\"path\":\"/path\",\"clientEncryptionKeyId\":\"clientEncryptionKeyId\",\"encryptionType\":\"Randomized\",\"additionalIncludedPath\":\"includedPathValue\",\"encryptionAlgorithm\":\"AEAD_AES_256_CBC_HMAC_SHA256\"}],\"policyFormatVersion\":1,\"additionalEncryptionPolicy\":\"clientEncryptionpolicyValue\"},\"id\":\"2a9f501b-6948-4795-8fd1-797defb5c466\",\"partitionKey\":{\"paths\":[],\"kind\":\"Hash\"}}"; JObject complexObject = JObject.FromObject(new { id = 1, name = new { fname = "fname", lname = "lname" } }); @@ -351,43 +351,49 @@ public void ContainerPropertiesDeserializeWithAdditionalDataTest() // Serialized string cosmosSerialized = SettingsContractTests.CosmosSerialize(jobject); - ContainerProperties containerDeserSettings = SettingsContractTests.CosmosDeserialize(cosmosSerialized); + ContainerProperties containerProperties = SettingsContractTests.CosmosDeserialize(cosmosSerialized); - Assert.AreEqual("2a9f501b-6948-4795-8fd1-797defb5c466", containerDeserSettings.Id); + Assert.AreEqual("2a9f501b-6948-4795-8fd1-797defb5c466", containerProperties.Id); - Assert.AreEqual(2, containerDeserSettings.AdditionalProperties.Count); - Assert.AreEqual("policy value", (string)containerDeserSettings.AdditionalProperties["simple string"]); - Assert.AreEqual(complexObject.ToString(), JObject.FromObject(containerDeserSettings.AdditionalProperties["complex object"]).ToString()); + Assert.AreEqual(2, containerProperties.AdditionalProperties.Count); + Assert.AreEqual("policy value", (string)containerProperties.AdditionalProperties["simple string"]); + Assert.AreEqual(complexObject.ToString(), JObject.FromObject(containerProperties.AdditionalProperties["complex object"]).ToString()); + + Assert.AreEqual(1, containerProperties.IndexingPolicy.AdditionalProperties.Count); + Assert.AreEqual("indexpolicyvalue", containerProperties.IndexingPolicy.AdditionalProperties["additionalIndexPolicy"]); - Assert.AreEqual(1, containerDeserSettings.IndexingPolicy.AdditionalProperties.Count); - Assert.AreEqual("indexpolicyvalue", containerDeserSettings.IndexingPolicy.AdditionalProperties["additionalIndexPolicy"]); + Assert.AreEqual(1, containerProperties.IndexingPolicy.SpatialIndexes[0].AdditionalProperties.Count); + Assert.AreEqual("spatialIndexValue", containerProperties.IndexingPolicy.SpatialIndexes[0].AdditionalProperties["additionalSpatialIndexes"]); - Assert.AreEqual(1, containerDeserSettings.IndexingPolicy.SpatialIndexes[0].AdditionalProperties.Count); - Assert.AreEqual("spatialIndexValue", containerDeserSettings.IndexingPolicy.SpatialIndexes[0].AdditionalProperties["additionalSpatialIndexes"]); + Assert.AreEqual(1, containerProperties.IndexingPolicy.CompositeIndexes[0][0].AdditionalProperties.Count); + Assert.AreEqual("compositeIndexValue", containerProperties.IndexingPolicy.CompositeIndexes[0][0].AdditionalProperties["additionalCompositeIndex"]); - Assert.AreEqual(1, containerDeserSettings.IndexingPolicy.CompositeIndexes[0][0].AdditionalProperties.Count); - Assert.AreEqual("compositeIndexValue", containerDeserSettings.IndexingPolicy.CompositeIndexes[0][0].AdditionalProperties["additionalCompositeIndex"]); + Assert.AreEqual(1, containerProperties.IndexingPolicy.IncludedPaths[0].AdditionalProperties.Count); + Assert.AreEqual("includedPathValue", containerProperties.IndexingPolicy.IncludedPaths[0].AdditionalProperties["additionalIncludedPath"]); - Assert.AreEqual(1, containerDeserSettings.IndexingPolicy.IncludedPaths[0].AdditionalProperties.Count); - Assert.AreEqual("includedPathValue", containerDeserSettings.IndexingPolicy.IncludedPaths[0].AdditionalProperties["additionalIncludedPath"]); + Assert.AreEqual(1, containerProperties.IndexingPolicy.ExcludedPaths[0].AdditionalProperties.Count); + Assert.AreEqual("excludedPathValue", containerProperties.IndexingPolicy.ExcludedPaths[0].AdditionalProperties["additionalExcludedPath"]); - Assert.AreEqual(1, containerDeserSettings.IndexingPolicy.ExcludedPaths[0].AdditionalProperties.Count); - Assert.AreEqual("excludedPathValue", containerDeserSettings.IndexingPolicy.ExcludedPaths[0].AdditionalProperties["additionalExcludedPath"]); + Assert.AreEqual(1, containerProperties.GeospatialConfig.AdditionalProperties.Count); + Assert.AreEqual("geospatialConfigValue", containerProperties.GeospatialConfig.AdditionalProperties["additionalGeospatialConfig"]); - Assert.AreEqual(1, containerDeserSettings.GeospatialConfig.AdditionalProperties.Count); - Assert.AreEqual("geospatialConfigValue", containerDeserSettings.GeospatialConfig.AdditionalProperties["additionalGeospatialConfig"]); + Assert.AreEqual(1, containerProperties.UniqueKeyPolicy.AdditionalProperties.Count); + Assert.AreEqual("uniqueKeyPolicyValue", containerProperties.UniqueKeyPolicy.AdditionalProperties["additionalUniqueKeyPolicy"]); - Assert.AreEqual(1, containerDeserSettings.UniqueKeyPolicy.AdditionalProperties.Count); - Assert.AreEqual("uniqueKeyPolicyValue", containerDeserSettings.UniqueKeyPolicy.AdditionalProperties["additionalUniqueKeyPolicy"]); + Assert.AreEqual(1, containerProperties.ConflictResolutionPolicy.AdditionalProperties.Count); + Assert.AreEqual("conflictResolutionValue", containerProperties.ConflictResolutionPolicy.AdditionalProperties["additionalConflictResolutionPolicy"]); - Assert.AreEqual(1, containerDeserSettings.ConflictResolutionPolicy.AdditionalProperties.Count); - Assert.AreEqual("conflictResolutionValue", containerDeserSettings.ConflictResolutionPolicy.AdditionalProperties["additionalConflictResolutionPolicy"]); + Assert.AreEqual(1, containerProperties.ClientEncryptionPolicy.AdditionalProperties.Count); + Assert.AreEqual("clientEncryptionpolicyValue", containerProperties.ClientEncryptionPolicy.AdditionalProperties["additionalEncryptionPolicy"]); - Assert.AreEqual(1, containerDeserSettings.ClientEncryptionPolicy.AdditionalProperties.Count); - Assert.AreEqual("clientEncryptionpolicyValue", containerDeserSettings.ClientEncryptionPolicy.AdditionalProperties["additionalEncryptionPolicy"]); + Assert.AreEqual(1, containerProperties.ClientEncryptionPolicy.IncludedPaths.First().AdditionalProperties.Count); + Assert.AreEqual("includedPathValue", containerProperties.ClientEncryptionPolicy.IncludedPaths.First().AdditionalProperties["additionalIncludedPath"]); - Assert.AreEqual(1, containerDeserSettings.ClientEncryptionPolicy.IncludedPaths.First().AdditionalProperties.Count); - Assert.AreEqual("includedPathValue", containerDeserSettings.ClientEncryptionPolicy.IncludedPaths.First().AdditionalProperties["additionalIncludedPath"]); + Assert.AreEqual(2, containerProperties.ComputedProperties.Count); + Assert.AreEqual("lowerName", containerProperties.ComputedProperties[0].Name); + Assert.AreEqual("SELECT VALUE LOWER(c.name) FROM c", containerProperties.ComputedProperties[0].Query); + Assert.AreEqual("estimatedTax", containerProperties.ComputedProperties[1].Name); + Assert.AreEqual("SELECT VALUE c.salary * 0.2 FROM c", containerProperties.ComputedProperties[1].Query); } [TestMethod] @@ -724,6 +730,7 @@ public void ContainerSettingsDefaults() "TimeToLivePropertyPath", "PartitionKeyPath", "PartitionKeyDefinitionVersion", + "ComputedProperties", "ConflictResolutionPolicy", "ChangeFeedPolicy", "ClientEncryptionPolicy", @@ -762,6 +769,10 @@ public void ContainerSettingsDefaults() Assert.IsNotNull(cosmosContainerSettings.IndexingPolicy.IncludedPaths); Assert.IsTrue(object.ReferenceEquals(cosmosContainerSettings.IndexingPolicy.IncludedPaths, cosmosContainerSettings.IndexingPolicy.IncludedPaths)); + Assert.IsNotNull(cosmosContainerSettings.ComputedProperties); + Assert.AreEqual(0, cosmosContainerSettings.ComputedProperties.Count); + Assert.IsTrue(object.ReferenceEquals(cosmosContainerSettings.ComputedProperties, cosmosContainerSettings.ComputedProperties)); + Cosmos.IncludedPath ip = new Cosmos.IncludedPath(); Assert.IsNotNull(ip.Indexes); From 033e883d2f0ae6187e7227d9b86fe6539ca3ee58 Mon Sep 17 00:00:00 2001 From: Justine Cocchi Date: Fri, 5 May 2023 07:47:06 -0700 Subject: [PATCH 108/164] [Internal] Samples: Adds OpenTelemetry and Application Insights samples (#3818) * add opentelemetry and application insights samples * address pr comments --- .../ApplicationInsights/AppSettings.json | 5 + .../ApplicationInsights.csproj | 25 ++++ .../Usage/ApplicationInsights/Program.cs | 118 +++++++++++++++ .../Usage/Cosmos.Samples.Usage.sln | 12 ++ .../Usage/OpenTelemetry/AppSettings.json | 10 ++ .../Usage/OpenTelemetry/OpenTelemetry.csproj | 28 ++++ .../Usage/OpenTelemetry/Program.cs | 138 ++++++++++++++++++ 7 files changed, 336 insertions(+) create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/AppSettings.json create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj create mode 100644 Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/AppSettings.json b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/AppSettings.json new file mode 100644 index 0000000000..028030099b --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/AppSettings.json @@ -0,0 +1,5 @@ +{ + "CosmosDBEndPointUrl": "https://localhost:8081", + "CosmosDBAuthorizationKey": "Super secret key", + "ApplicationInsightsConnectionString": "Super secret connection string" +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj new file mode 100644 index 0000000000..cee6d0a6e3 --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj @@ -0,0 +1,25 @@ + + + + Exe + net6.0 + Cosmos.Samples.ApplicationInsights + Cosmos.Samples.ApplicationInsights + latest + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs new file mode 100644 index 0000000000..b4f55cd65f --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs @@ -0,0 +1,118 @@ +namespace Cosmos.Samples.ApplicationInsights +{ + using System; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Microsoft.Azure.Cosmos; + using Microsoft.Extensions.Logging; + using Microsoft.Extensions.Configuration; + using Microsoft.Extensions.DependencyInjection; + using Microsoft.ApplicationInsights; + using Microsoft.ApplicationInsights.WorkerService; + using Microsoft.Extensions.Logging.ApplicationInsights; + + internal class Program + { + private static readonly string databaseName = "samples"; + private static readonly string containerName = "ai-sample"; + + private static TelemetryClient? _telemetryClient; + + static async Task Main() + { + try + { + IConfigurationRoot configuration = new ConfigurationBuilder() + .AddJsonFile("AppSettings.json") + .Build(); + + string endpoint = configuration["CosmosDBEndPointUrl"]; + if (string.IsNullOrEmpty(endpoint)) + { + throw new ArgumentNullException("Please specify a valid CosmosDBEndPointUrl in the appSettings.json"); + } + + string authKey = configuration["CosmosDBAuthorizationKey"]; + if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) + { + throw new ArgumentException("Please specify a valid CosmosDBAuthorizationKey in the appSettings.json"); + } + + string aiConnectionString = configuration["ApplicationInsightsConnectionString"]; + if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret connection string")) + { + throw new ArgumentException("Please specify a valid ApplicationInsightsConnectionString in the appSettings.json"); + } + + // + IServiceCollection services = new ServiceCollection(); + services.AddApplicationInsightsTelemetryWorkerService((ApplicationInsightsServiceOptions options) => options.ConnectionString = aiConnectionString); + + IServiceProvider serviceProvider = services.BuildServiceProvider(); + _telemetryClient = serviceProvider.GetRequiredService(); + // + + CosmosClientOptions options = new CosmosClientOptions() + { + IsDistributedTracingEnabled = true // Defaults to true, set to false to disable + }; + using (CosmosClient client = new CosmosClient(endpoint, authKey, options)) + { + Console.WriteLine($"Getting container reference for {containerName}."); + + ContainerProperties properties = new ContainerProperties(containerName, partitionKeyPath: "/id"); + + await client.CreateDatabaseIfNotExistsAsync(databaseName); + Container container = await client.GetDatabase(databaseName).CreateContainerIfNotExistsAsync(properties); + + await Program.RunCrudDemo(container); + } + } + finally + { + // Explicitly calling Flush() followed by sleep is required for Application Insights logging in console apps to ensure that telemetry is sent to the back-end even if application terminates. + _telemetryClient?.Flush(); + await Task.Delay(5000); + + Console.WriteLine("End of demo."); + } + } + + public static async Task RunCrudDemo(Container container) + { + // Any operations will automatically generate telemetry + + for (int i = 1; i <= 5; i++) + { + await container.CreateItemAsync(new Item { Id = $"{i}", Status = "new" }, new PartitionKey($"{i}")); + Console.WriteLine($"Created document with id: {i}"); + } + + for (int i = 1; i <= 5; i++) + { + await container.ReadItemAsync($"{i}", new PartitionKey($"{i}")); + Console.WriteLine($"Read document with id: {i}"); + } + + for (int i = 1; i <= 5; i++) + { + await container.ReplaceItemAsync(new Item { Id = $"{i}", Status = "updated" }, $"{i}", new PartitionKey($"{i}")); + Console.WriteLine($"Updated document with id: {i}"); + } + + for (int i = 1; i <= 5; i++) + { + await container.DeleteItemAsync($"{i}", new PartitionKey($"{i}")); + Console.WriteLine($"Deleted document with id: {i}"); + } + } + } + + internal class Item + { + [JsonProperty("id")] + public string Id { get; set; } + + public string Status { get; set; } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln b/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln index de1e1f4731..999b48d928 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln +++ b/Microsoft.Azure.Cosmos.Samples/Usage/Cosmos.Samples.Usage.sln @@ -51,6 +51,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CFPullModelAllVersionsAndDe EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CFPullModelLatestVersionMode", "CFPullModelLatestVersionMode\CFPullModelLatestVersionMode.csproj", "{985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenTelemetry", "OpenTelemetry\OpenTelemetry.csproj", "{C6EF6948-C085-4013-A21F-99303ECBA7A9}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ApplicationInsights", "ApplicationInsights\ApplicationInsights.csproj", "{55149A3C-A263-4EE5-AD2D-02FE9AC4D291}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -153,6 +157,14 @@ Global {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Debug|Any CPU.Build.0 = Debug|Any CPU {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Release|Any CPU.ActiveCfg = Release|Any CPU {985B0E0A-D480-4C3C-A1FC-589F2EC4BBF6}.Release|Any CPU.Build.0 = Release|Any CPU + {C6EF6948-C085-4013-A21F-99303ECBA7A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C6EF6948-C085-4013-A21F-99303ECBA7A9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C6EF6948-C085-4013-A21F-99303ECBA7A9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C6EF6948-C085-4013-A21F-99303ECBA7A9}.Release|Any CPU.Build.0 = Release|Any CPU + {55149A3C-A263-4EE5-AD2D-02FE9AC4D291}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {55149A3C-A263-4EE5-AD2D-02FE9AC4D291}.Debug|Any CPU.Build.0 = Debug|Any CPU + {55149A3C-A263-4EE5-AD2D-02FE9AC4D291}.Release|Any CPU.ActiveCfg = Release|Any CPU + {55149A3C-A263-4EE5-AD2D-02FE9AC4D291}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json new file mode 100644 index 0000000000..1ea1245434 --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Azure-Cosmos-Operation-Request-Diagnostics": "Information" + } + }, + "CosmosDBEndPointUrl": "https://localhost:8081", + "CosmosDBAuthorizationKey": "Super secret key", + "ApplicationInsightsConnectionString": "Super secret connection string" +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj new file mode 100644 index 0000000000..4dd1171328 --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj @@ -0,0 +1,28 @@ + + + + Exe + net6.0 + Cosmos.Samples.OpenTelemetry + Cosmos.Samples.OpenTelemetry + latest + + + + + + + + + + + + + + + + PreserveNewest + + + + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs new file mode 100644 index 0000000000..d799731f1e --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs @@ -0,0 +1,138 @@ +namespace Cosmos.Samples.OpenTelemetry +{ + using global::OpenTelemetry; + using global::OpenTelemetry.Trace; + using global::OpenTelemetry.Resources; + using System; + using System.Threading.Tasks; + using Newtonsoft.Json; + using Microsoft.Azure.Cosmos; + using Microsoft.Extensions.Azure; + using Microsoft.Extensions.Logging; + using Microsoft.Extensions.Configuration; + using Azure.Monitor.OpenTelemetry.Exporter; + + internal class Program + { + private static readonly string databaseName = "samples"; + private static readonly string containerName = "otel-sample"; + private static readonly string serviceName = "MySampleService"; + + private static TracerProvider? _traceProvider; + + static async Task Main() + { + try + { + IConfigurationRoot configuration = new ConfigurationBuilder() + .AddJsonFile("AppSettings.json") + .Build(); + + string endpoint = configuration["CosmosDBEndPointUrl"]; + if (string.IsNullOrEmpty(endpoint)) + { + throw new ArgumentNullException("Please specify a valid CosmosDBEndPointUrl in the appSettings.json"); + } + + string authKey = configuration["CosmosDBAuthorizationKey"]; + if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret key")) + { + throw new ArgumentException("Please specify a valid CosmosDBAuthorizationKey in the appSettings.json"); + } + + string aiConnectionString = configuration["ApplicationInsightsConnectionString"]; + if (string.IsNullOrEmpty(authKey) || string.Equals(authKey, "Super secret connection string")) + { + throw new ArgumentException("Please specify a valid ApplicationInsightsConnectionString in the appSettings.json"); + } + + // + ResourceBuilder resource = ResourceBuilder.CreateDefault().AddService( + serviceName: serviceName, + serviceVersion: "1.0.0"); + + // Set up logging to forward logs to chosen exporter + using ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder.AddOpenTelemetry(options => + { + options.IncludeFormattedMessage = true; + options.SetResourceBuilder(resource); + options.AddAzureMonitorLogExporter(o => o.ConnectionString = aiConnectionString); // Set up exporter of your choice + })); + + AzureEventSourceLogForwarder logforwader = new AzureEventSourceLogForwarder(loggerFactory); + logforwader.Start(); + + // Configure OpenTelemetry trace provider + AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); + _traceProvider = Sdk.CreateTracerProviderBuilder() + .AddSource("Azure.Cosmos.Operation") // Cosmos DB source for operation level telemetry + .AddAzureMonitorTraceExporter(o => o.ConnectionString = aiConnectionString) // Set up exporter of your choice + .SetResourceBuilder(resource) + .Build(); + // + + CosmosClientOptions options = new CosmosClientOptions() + { + IsDistributedTracingEnabled = true // Defaults to true, set to false to disable + }; + using (CosmosClient client = new CosmosClient(endpoint, authKey, options)) + { + Console.WriteLine($"Getting container reference for {containerName}."); + + ContainerProperties properties = new ContainerProperties(containerName, partitionKeyPath: "/id"); + + await client.CreateDatabaseIfNotExistsAsync(databaseName); + Container container = await client.GetDatabase(databaseName).CreateContainerIfNotExistsAsync(properties); + + await Program.RunCrudDemo(container); + } + + } + finally + { + _traceProvider?.Dispose(); + // Sleep is required for logging in console apps to ensure that telemetry is sent to the back-end even if application terminates. + await Task.Delay(5000); + + Console.WriteLine("End of demo."); + } + } + + public static async Task RunCrudDemo(Container container) + { + // Any operations will automatically generate telemetry + + for(int i = 1; i <= 5; i++) + { + await container.CreateItemAsync(new Item { Id = $"{i}", Status = "new" }, new PartitionKey($"{i}")); + Console.WriteLine($"Created document with id: {i}"); + } + + for (int i = 1; i <= 5; i++) + { + await container.ReadItemAsync($"{i}", new PartitionKey($"{i}")); + Console.WriteLine($"Read document with id: {i}"); + } + + for (int i = 1; i <= 5; i++) + { + await container.ReplaceItemAsync(new Item { Id = $"{i}", Status = "updated" }, $"{i}", new PartitionKey($"{i}")); + Console.WriteLine($"Updated document with id: {i}"); + } + + for (int i = 1; i <= 5; i++) + { + await container.DeleteItemAsync($"{i}", new PartitionKey($"{i}")); + Console.WriteLine($"Deleted document with id: {i}"); + } + } + } + + internal class Item + { + [JsonProperty("id")] + public string Id { get; set; } + + public string Status { get; set; } + } +} \ No newline at end of file From 0c158656a8a9a42fafeda52757360698fbfa04ea Mon Sep 17 00:00:00 2001 From: Erik O'Leary <969938+onionhammer@users.noreply.github.com> Date: Tue, 9 May 2023 10:45:01 -0500 Subject: [PATCH 109/164] [Internal] Query: Added custom serializer coverage tests to ExpressionToSQL.cs (#3722) * Ensure enum as string is preserved for custom serializer * Failing test * Added failing tests * Updated requested names * Ignore result of test for now * Added additional comment on why the test is ignored * Replaced with sample code * Remove ignore attribute from tests, documented misbehavior for future use * Updated comment --------- Co-authored-by: leminh98 --- .../Linq/CosmosLinqJsonConverterTests.cs | 150 ++++++++++++++++++ 1 file changed, 150 insertions(+) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs index e4f90f1957..ca2e12c8da 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.Cosmos.Linq { using System; using System.Globalization; + using System.IO; + using System.Linq; using System.Linq.Expressions; + using global::Azure.Core.Serialization; using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json; using Newtonsoft.Json.Converters; @@ -30,6 +33,104 @@ public void DateTimeKindIsPreservedTest() Assert.AreEqual("(a[\"StartDate\"] <= \"2022-05-26\")", sql); } + [TestMethod] + public void EnumIsPreservedAsINTest() + { + // Arrange + CosmosLinqSerializerOptions options = new() + { + //CustomCosmosSerializer = new TestCustomJsonSerializer() + }; + + // Act + TestEnum[] values = new[] { TestEnum.One, TestEnum.Two }; + Expression> expr = a => values.Contains(a.Value); + + string sql = SqlTranslator.TranslateExpression(expr.Body, options); + + // Assert + // Assert.AreEqual("(a[\"Value\"] IN (\"One\", \"Two\"))", sql); // <- TODO - Desired Behavior with CustomSerializer + Assert.AreEqual("(a[\"Value\"] IN (0, 1))", sql); // <- Actual behavior, with ability to set custom serializor reverted + } + + [TestMethod] + public void EnumIsPreservedAsEQUALSTest() + { + // Arrange + CosmosLinqSerializerOptions options = new() + { + // CustomCosmosSerializer = new TestCustomJsonSerializer() + }; + + // Act + TestEnum statusValue = TestEnum.One; + Expression> expr = a => a.Value == statusValue; + + string sql = SqlTranslator.TranslateExpression(expr.Body, options); + + // Assert + // Assert.AreEqual("(a[\"Value\"] = \"One\")", sql); // <- THIS is the correct value, if we are able to use the custom serializer + Assert.AreEqual("(a[\"Value\"] = 0)", sql); // <- THIS is the current mis-behavior of the SDK + } + + [TestMethod] + public void EnumIsPreservedAsEXPRESSIONTest() + { + // Arrange + CosmosLinqSerializerOptions options = new() + { + // CustomCosmosSerializer = new TestCustomJsonSerializer() + }; + + // Act + + // Get status constant + ConstantExpression status = Expression.Constant(TestEnum.One); + + // Get member access expression + ParameterExpression arg = Expression.Parameter(typeof(TestEnumNewtonsoftDocument), "a"); + + // Access the value property + MemberExpression docValueExpression = Expression.MakeMemberAccess( + arg, + typeof(TestEnumNewtonsoftDocument).GetProperty(nameof(TestEnumNewtonsoftDocument.Value))! + ); + + // Create comparison expression + BinaryExpression expression = Expression.Equal( + docValueExpression, + status + ); + + // Create lambda expression + Expression> lambda = + Expression.Lambda>(expression, arg); + + string sql = SqlTranslator.TranslateExpression(lambda.Body, options); + + // Assert + Assert.AreEqual("(a[\"Value\"] = \"One\")", sql); + } + + enum TestEnum + { + One, + Two, + Three, + } + + class TestEnumDocument + { + [System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.JsonStringEnumConverter))] // TODO: Remove this once we have the ability to use custom serializer for LINQ queries + public TestEnum Value { get; set; } + } + + class TestEnumNewtonsoftDocument + { + [JsonConverter(typeof(StringEnumConverter))] + public TestEnum Value { get; set; } + } + class TestDocument { [JsonConverter(typeof(DateJsonConverter))] @@ -50,5 +151,54 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s } } } + + /// + // See: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs + /// + class TestCustomJsonSerializer : CosmosSerializer + { + private readonly JsonObjectSerializer systemTextJsonSerializer; + + public static readonly System.Text.Json.JsonSerializerOptions JsonOptions = new() + { + DefaultIgnoreCondition = System.Text.Json.Serialization.JsonIgnoreCondition.WhenWritingNull, + PropertyNameCaseInsensitive = true, + Converters = { + new System.Text.Json.Serialization.JsonStringEnumConverter(), + } + }; + + public TestCustomJsonSerializer() + { + this.systemTextJsonSerializer = new JsonObjectSerializer(JsonOptions); + } + + public override T FromStream(Stream stream) + { + using (stream) + { + if (stream.CanSeek && stream.Length == 0) + { + return default; + } + + if (typeof(Stream).IsAssignableFrom(typeof(T))) + { + return (T)(object)stream; + } + + return (T)this.systemTextJsonSerializer.Deserialize(stream, typeof(T), default); + } + } + + public override Stream ToStream(T input) + { + MemoryStream stream = new (); + + this.systemTextJsonSerializer.Serialize(stream, input, typeof(T), default); + stream.Position = 0; + return stream; + } + } } } From ade7e3410c0ffb78e2af815f5fe355c2047f3436 Mon Sep 17 00:00:00 2001 From: Erik O'Leary <969938+onionhammer@users.noreply.github.com> Date: Tue, 9 May 2023 12:30:29 -0500 Subject: [PATCH 110/164] Query: Added remaining Cosmos Type checking functions to CosmosLinqExtensions (#3724) * Added the remaining Cosmos Type checking functions to the CosmosLinqExtensions * Added comments requested * Updated comment * Updated baseline * Improve readability of dictionary initialization * Aligned with code style guide * Revert change to baseline * Executed update baseline script --------- Co-authored-by: neildsh <35383880+neildsh@users.noreply.github.com> Co-authored-by: leminh98 --- .../BuiltinFunctions/TypeCheckFunctions.cs | 59 ++++++--- .../src/Linq/CosmosLinqExtensions.cs | 99 ++++++++++++++- ...onBaselineTests.TestTypeCheckFunctions.xml | 117 ++++++++++++++++++ .../LinqTranslationBaselineTests.cs | 20 ++- .../Contracts/DotNetSDKAPI.json | 35 ++++++ 5 files changed, 311 insertions(+), 19 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/TypeCheckFunctions.cs b/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/TypeCheckFunctions.cs index 93c09d65ab..db875f3ae0 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/TypeCheckFunctions.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/BuiltinFunctions/TypeCheckFunctions.cs @@ -18,33 +18,62 @@ static TypeCheckFunctions() { TypeCheckFunctionsDefinitions = new Dictionary { - { - "IsDefined", - new SqlBuiltinFunctionVisitor("IS_DEFINED", + [nameof(CosmosLinqExtensions.IsArray)] = new SqlBuiltinFunctionVisitor( + "IS_ARRAY", true, new List() { new Type[]{typeof(object)}, - }) - }, - { - "IsNull", - new SqlBuiltinFunctionVisitor("IS_NULL", + }), + [nameof(CosmosLinqExtensions.IsBool)] = new SqlBuiltinFunctionVisitor( + "IS_BOOL", true, new List() { new Type[]{typeof(object)}, - }) - }, - { - "IsPrimitive", - new SqlBuiltinFunctionVisitor("IS_PRIMITIVE", + }), + [nameof(CosmosLinqExtensions.IsDefined)] = new SqlBuiltinFunctionVisitor( + "IS_DEFINED", true, new List() { new Type[]{typeof(object)}, - }) - } + }), + [nameof(CosmosLinqExtensions.IsNull)] = new SqlBuiltinFunctionVisitor( + "IS_NULL", + true, + new List() + { + new Type[]{typeof(object)}, + }), + [nameof(CosmosLinqExtensions.IsNumber)] = new SqlBuiltinFunctionVisitor( + "IS_NUMBER", + true, + new List() + { + new Type[]{typeof(object)}, + }), + [nameof(CosmosLinqExtensions.IsObject)] = new SqlBuiltinFunctionVisitor( + "IS_OBJECT", + true, + new List() + { + new Type[]{typeof(object)}, + }), + [nameof(CosmosLinqExtensions.IsPrimitive)] = new SqlBuiltinFunctionVisitor( + "IS_PRIMITIVE", + true, + new List() + { + new Type[]{typeof(object)}, + }), + [nameof(CosmosLinqExtensions.IsString)] = new SqlBuiltinFunctionVisitor( + "IS_STRING", + true, + new List() + { + new Type[]{typeof(object)}, + }), }; } diff --git a/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs b/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs index dc86de0cb6..6663f52673 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/CosmosLinqExtensions.cs @@ -20,6 +20,44 @@ namespace Microsoft.Azure.Cosmos.Linq /// public static class CosmosLinqExtensions { + /// + /// Returns a Boolean value indicating if the type of the specified expression is an array. + /// This method is to be used in LINQ expressions only and will be evaluated on server. + /// There's no implementation provided in the client library. + /// + /// + /// Returns true if the type of the specified expression is an array; otherwise, false. + /// + /// + /// document.Names.IsArray()); + /// ]]> + /// + /// + public static bool IsArray(this object obj) + { + throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); + } + + /// + /// Returns a Boolean value indicating if the type of the specified expression is a boolean. + /// This method is to be used in LINQ expressions only and will be evaluated on server. + /// There's no implementation provided in the client library. + /// + /// + /// Returns true if the type of the specified expression is a boolean; otherwise, false. + /// + /// + /// document.IsRegistered.IsBool()); + /// ]]> + /// + /// + public static bool IsBool(this object obj) + { + throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); + } + /// /// Determines if a certain property is defined or not. /// This method is to be used in LINQ expressions only and will be evaluated on server. @@ -52,12 +90,50 @@ public static bool IsDefined(this object obj) /// var isNullQuery = documents.Where(document => document.Name.IsNull()); /// ]]> /// - /// s> + /// public static bool IsNull(this object obj) { throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); } + /// + /// Returns a Boolean value indicating if the type of the specified expression is a number. + /// This method is to be used in LINQ expressions only and will be evaluated on server. + /// There's no implementation provided in the client library. + /// + /// + /// Returns true if the type of the specified expression is a number; otherwise, false. + /// + /// + /// document.Age.IsNumber()); + /// ]]> + /// + /// + public static bool IsNumber(this object obj) + { + throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); + } + + /// + /// Returns a Boolean value indicating if the type of the specified expression is an object. + /// This method is to be used in LINQ expressions only and will be evaluated on server. + /// There's no implementation provided in the client library. + /// + /// + /// Returns true if the type of the specified expression is an object; otherwise, false. + /// + /// + /// document.Address.IsObject()); + /// ]]> + /// + /// + public static bool IsObject(this object obj) + { + throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); + } + /// /// Determines if a certain property is of primitive JSON type. /// This method is to be used in LINQ expressions only and will be evaluated on server. @@ -74,12 +150,31 @@ public static bool IsNull(this object obj) /// var isPrimitiveQuery = documents.Where(document => document.Name.IsPrimitive()); /// ]]> /// - /// s> + /// public static bool IsPrimitive(this object obj) { throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); } + /// + /// Returns a Boolean value indicating if the type of the specified expression is a string. + /// This method is to be used in LINQ expressions only and will be evaluated on server. + /// There's no implementation provided in the client library. + /// + /// + /// Returns true if the type of the specified expression is a string; otherwise, false. + /// + /// + /// document.Name.IsString()); + /// ]]> + /// + /// + public static bool IsString(this object obj) + { + throw new NotImplementedException(ClientResources.TypeCheckExtensionFunctionsNotImplemented); + } + /// /// This method generate query definition from LINQ query. /// diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestTypeCheckFunctions.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestTypeCheckFunctions.xml index 90a463defa..97aac9ef55 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestTypeCheckFunctions.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestTypeCheckFunctions.xml @@ -1,4 +1,52 @@  + + + + doc.ArrayField.IsArray())]]> + + + + + + + + + doc.StringField.IsArray())]]> + + + + + + + + + Convert(doc.BooleanField, Object).IsBool())]]> + + + + + + + + + doc.StringField.IsBool())]]> + + + + + @@ -45,6 +93,52 @@ FROM root WHERE IS_NULL(root["StringField"])]]> + + + + Convert(doc.NumericField, Object).IsNumber())]]> + + + + + + + + + doc.StringField.IsNumber())]]> + + + + + + + + + doc.ObjectField.IsObject())]]> + + + + + + + + + doc.StringField.IsObject())]]> + + + + + @@ -68,4 +162,27 @@ FROM root WHERE IS_PRIMITIVE(root["StringField"])]]> + + + + doc.StringField.IsString())]]> + + + + + + + + + Convert(doc.NumericField, Object).IsString())]]> + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs index 76bd0ffc81..5a46a2d118 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs @@ -116,6 +116,7 @@ internal class DataObject : LinqTestObject public int? NullableField; #pragma warning disable CS0649 // Field is never assigned to, and will always have its default value false public bool BooleanField; + public SimpleObject ObjectField = new SimpleObject(); public Guid GuidField; #pragma warning restore // Field is never assigned to, and will always have its default value false @@ -155,6 +156,11 @@ internal class DataObject : LinqTestObject public string Pk; } + internal class SimpleObject + { + public string Field { get; set; } + } + class DateJsonConverter : IsoDateTimeConverter { public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) @@ -257,7 +263,7 @@ public void TestLiteralSerialization() [TestMethod] public void TestTypeCheckFunctions() { - // IsDefined, IsNull, and IsPrimitive are not supported on the client side. + // IsArray, IsBool, IsDefined, IsNull, IsNumber, IsObject, IsPrimitive, and IsString are not supported on the client side. // Partly because IsPrimitive is not trivial to implement. // Therefore these methods are verified with baseline only. List data = new List(); @@ -266,12 +272,22 @@ public void TestTypeCheckFunctions() List inputs = new List { + new LinqTestInput("IsArray array", b => getQuery(b).Where(doc => doc.ArrayField.IsArray())), + new LinqTestInput("IsArray string", b => getQuery(b).Where(doc => doc.StringField.IsArray())), + new LinqTestInput("IsBool bool", b => getQuery(b).Where(doc => doc.BooleanField.IsBool())), + new LinqTestInput("IsBool string", b => getQuery(b).Where(doc => doc.StringField.IsBool())), new LinqTestInput("IsDefined array", b => getQuery(b).Select(doc => doc.ArrayField.IsDefined())), new LinqTestInput("IsDefined string", b => getQuery(b).Where(doc => doc.StringField.IsDefined())), new LinqTestInput("IsNull array", b => getQuery(b).Select(doc => doc.ArrayField.IsNull())), new LinqTestInput("IsNull string", b => getQuery(b).Where(doc => doc.StringField.IsNull())), + new LinqTestInput("IsNumber number", b => getQuery(b).Select(doc => doc.NumericField.IsNumber())), + new LinqTestInput("IsNumber string", b => getQuery(b).Where(doc => doc.StringField.IsNumber())), + new LinqTestInput("IsObject object", b => getQuery(b).Select(doc => doc.ObjectField.IsObject())), + new LinqTestInput("IsObject string", b => getQuery(b).Where(doc => doc.StringField.IsObject())), new LinqTestInput("IsPrimitive array", b => getQuery(b).Select(doc => doc.ArrayField.IsPrimitive())), - new LinqTestInput("IsPrimitive string", b => getQuery(b).Where(doc => doc.StringField.IsPrimitive())) + new LinqTestInput("IsPrimitive string", b => getQuery(b).Where(doc => doc.StringField.IsPrimitive())), + new LinqTestInput("IsString string", b => getQuery(b).Where(doc => doc.StringField.IsString())), + new LinqTestInput("IsString number", b => getQuery(b).Select(doc => doc.NumericField.IsString())), }; this.ExecuteTestSuite(inputs); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 3eee7f406b..5b2e38772a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -5296,6 +5296,20 @@ "Microsoft.Azure.Cosmos.Linq.CosmosLinqExtensions;System.Object;IsAbstract:True;IsSealed:True;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { + "Boolean IsArray(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { + "Type": "Method", + "Attributes": [ + "ExtensionAttribute" + ], + "MethodInfo": "Boolean IsArray(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean IsBool(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { + "Type": "Method", + "Attributes": [ + "ExtensionAttribute" + ], + "MethodInfo": "Boolean IsBool(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Boolean IsDefined(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { "Type": "Method", "Attributes": [ @@ -5310,6 +5324,20 @@ ], "MethodInfo": "Boolean IsNull(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Boolean IsNumber(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { + "Type": "Method", + "Attributes": [ + "ExtensionAttribute" + ], + "MethodInfo": "Boolean IsNumber(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean IsObject(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { + "Type": "Method", + "Attributes": [ + "ExtensionAttribute" + ], + "MethodInfo": "Boolean IsObject(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Boolean IsPrimitive(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { "Type": "Method", "Attributes": [ @@ -5317,6 +5345,13 @@ ], "MethodInfo": "Boolean IsPrimitive(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Boolean IsString(System.Object)[System.Runtime.CompilerServices.ExtensionAttribute()]": { + "Type": "Method", + "Attributes": [ + "ExtensionAttribute" + ], + "MethodInfo": "Boolean IsString(System.Object);IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.FeedIterator ToStreamIterator[T](System.Linq.IQueryable`1[T])[System.Runtime.CompilerServices.ExtensionAttribute()]": { "Type": "Method", "Attributes": [ From aff7349cb80da9eab40f2e792b71390268e18169 Mon Sep 17 00:00:00 2001 From: Justine Cocchi Date: Wed, 10 May 2023 08:21:05 -0700 Subject: [PATCH 111/164] update sdk version and section tags (#3841) --- .../Usage/ApplicationInsights/ApplicationInsights.csproj | 2 +- .../Usage/ApplicationInsights/Program.cs | 2 +- .../Usage/OpenTelemetry/OpenTelemetry.csproj | 2 +- .../Usage/OpenTelemetry/Program.cs | 6 ++++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj index cee6d0a6e3..59162abaca 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/ApplicationInsights.csproj @@ -10,7 +10,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs index b4f55cd65f..288ce80c64 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/ApplicationInsights/Program.cs @@ -50,7 +50,7 @@ static async Task Main() IServiceProvider serviceProvider = services.BuildServiceProvider(); _telemetryClient = serviceProvider.GetRequiredService(); - // + // CosmosClientOptions options = new CosmosClientOptions() { diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj index 4dd1171328..46fe296b80 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj @@ -10,7 +10,7 @@ - + diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs index d799731f1e..4d6431823e 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs @@ -46,7 +46,7 @@ static async Task Main() throw new ArgumentException("Please specify a valid ApplicationInsightsConnectionString in the appSettings.json"); } - // + // ResourceBuilder resource = ResourceBuilder.CreateDefault().AddService( serviceName: serviceName, serviceVersion: "1.0.0"); @@ -69,12 +69,14 @@ static async Task Main() .AddAzureMonitorTraceExporter(o => o.ConnectionString = aiConnectionString) // Set up exporter of your choice .SetResourceBuilder(resource) .Build(); - // + // + // CosmosClientOptions options = new CosmosClientOptions() { IsDistributedTracingEnabled = true // Defaults to true, set to false to disable }; + // using (CosmosClient client = new CosmosClient(endpoint, authKey, options)) { Console.WriteLine($"Getting container reference for {containerName}."); From 1a8b7f0d0bad48d7517f8871cb5174a4f929118f Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Tue, 16 May 2023 10:44:26 -0400 Subject: [PATCH 112/164] PackageLicense: Removes PackageLicenseUrl and Adds PackageLicenseFile since PackageLicenseUrl is deprecated (#3847) * proposal to add PackageLicenseFile since PackageLicenseUrl is deprecated. https://github.com/NuGet/Home/issues/4628 * adding attribute Visible=false --- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 6a5be8ccbb..886a84d586 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -24,7 +24,6 @@ Microsoft.Azure.Cosmos microsoft;azure;cosmos;cosmosdb;documentdb;docdb;nosql;azureofficial;dotnetcore;netcore;netstandard The change log for this SDK is made available at https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md at the time of release. - https://aka.ms/netcoregaeula https://github.com/Azure/azure-cosmos-dotnet-v3 true http://go.microsoft.com/fwlink/?LinkID=288890 @@ -43,8 +42,13 @@ NU5125 true $(LangVersion) + LICENSE + + + + From b06d6c3cb4bee845406ba0631228ca70e82ce70d Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Wed, 17 May 2023 13:48:21 -0400 Subject: [PATCH 113/164] making ChangeFeedMode.LatestVersion accessible to the public (#3854) --- .../src/ChangeFeed/ChangeFeedMode.cs | 7 +------ .../Contracts/DotNetPreviewSDKAPI.json | 10 ---------- .../Contracts/DotNetSDKAPI.json | 10 ++++++++++ 3 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs index 7df0871d74..50098a8057 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedMode.cs @@ -38,12 +38,7 @@ internal ChangeFeedMode() /// Latest version mode includes item creations and updates, not deletions. /// /// A to receive latest version item changes. -#if PREVIEW - public -#else - internal -#endif - static ChangeFeedMode LatestVersion => ChangeFeedModeIncremental.Instance; + public static ChangeFeedMode LatestVersion => ChangeFeedModeIncremental.Instance; /// /// Creates a to receive notifications for creations, deletes, as well as all intermediary snapshots for updates. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index ab29c95bf0..08d0d65a7e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -169,16 +169,6 @@ "Type": "Method", "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_AllVersionsAndDeletes();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion()": { - "Type": "Method", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion": { - "Type": "Property", - "Attributes": [], - "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 5b2e38772a..074be1ee37 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -307,10 +307,20 @@ "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_Incremental();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion()": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.ChangeFeedMode Incremental": { "Type": "Property", "Attributes": [], "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode Incremental;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_Incremental();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Microsoft.Azure.Cosmos.ChangeFeedMode LatestVersion;CanRead:True;CanWrite:False;Microsoft.Azure.Cosmos.ChangeFeedMode get_LatestVersion();IsAbstract:False;IsStatic:True;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} From c66e4884dcaf05657ef35f4452844fdc14447e4e Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 18 May 2023 02:29:57 +0530 Subject: [PATCH 114/164] AI Integration: Fixes Operation Name in the activity and end to end Tests. (#3845) * first draft * second draft * 3rd draft * remove untouched file * test fix * fix order * change order * refactor * skip network activities in test * remove network attributes --- .../OpenTelemetryRecorderFactory.cs | 4 +- ...iterBaselineTests.BatchOperationsAsync.xml | 31 +- ...riterBaselineTests.BulkOperationsAsync.xml | 2679 +++++++++++++++-- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 571 +++- ...eWriterBaselineTests.MiscellanousAsync.xml | 114 +- ...neTests.PointOperationsExceptionsAsync.xml | 174 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 763 ++++- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 436 ++- ...TraceWriterBaselineTests.ReadManyAsync.xml | 62 +- ...selineTests.StreamPointOperationsAsync.xml | 124 +- ...aselineTests.TypedPointOperationsAsync.xml | 124 +- .../Tracing/AssertActivity.cs | 14 +- .../Tracing/CustomListener.cs | 93 +- .../Tracing/CustomOtelExporter.cs | 2 +- .../EndToEndTraceWriterBaselineTests.cs | 21 +- .../Utils/Util.cs | 4 +- 16 files changed, 4639 insertions(+), 577 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index 51b4666b6f..fe10e7b22c 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -26,7 +26,7 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, { if (clientContext is { ClientOptions.IsDistributedTracingEnabled: true }) { - OpenTelemetryRecorderFactory.ScopeFactory ??= new DiagnosticScopeFactory(clientNamespace: OpenTelemetryAttributeKeys.DiagnosticNamespace, + OpenTelemetryRecorderFactory.ScopeFactory ??= new DiagnosticScopeFactory(clientNamespace: $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.{OpenTelemetryAttributeKeys.OperationPrefix}", resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, isActivityEnabled: true, suppressNestedClientActivities: true); @@ -34,7 +34,7 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, // If there is no source then it will return default otherwise a valid diagnostic scope DiagnosticScope scope = OpenTelemetryRecorderFactory .ScopeFactory - .CreateScope(name: $"{OpenTelemetryAttributeKeys.OperationPrefix}.{operationName}", + .CreateScope(name: operationName, kind: clientContext.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? DiagnosticScope.ActivityKind.Internal : DiagnosticScope.ActivityKind.Client); // Record values only when we have a valid Diagnostic Scope diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 90f32b89c9..09579f83b7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -128,10 +128,31 @@ ] } ] -}]]> - Operation.ExecuteAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationExecuteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeBatchdb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ExecuteAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Batch + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index b776a8eaae..be3a8c7910 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -152,29 +152,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -310,29 +529,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -468,29 +906,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -626,29 +1283,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -784,29 +1660,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -942,29 +2037,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -1100,29 +2414,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -1258,29 +2791,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -1416,29 +3168,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -1574,29 +3545,248 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + + + + + + + + + @@ -2323,10 +4513,29 @@ ] } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + + Some Value + Create + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 4189b4bab8..43d95de95d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -951,19 +951,128 @@ ] } ] -}]]> - Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + + @@ -1568,19 +1677,128 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + + @@ -2166,19 +2384,128 @@ ] } ] -}]]> - Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Change Feed Iterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Iterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Iterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + + @@ -2784,19 +3111,128 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + + @@ -3065,10 +3501,31 @@ ] } ] -}]]> - Operation.Change Feed Estimator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationChange Feed Estimator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Change Feed Estimator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 591a6af4ac..29fc40f674 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -106,13 +106,56 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.DeleteAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + DeleteAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Delete + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateDatabaseAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + @@ -206,12 +249,55 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.DeleteAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -Operation.CreateDatabaseAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateDatabaseAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contacted -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + DeleteAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Delete + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateDatabaseAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 64e7e0c3ed..9ee0b6e650 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -147,11 +147,30 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + Some Value + Create + + + @@ -389,11 +408,30 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + Some Value + Create + + + @@ -614,11 +652,30 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + Some Value + Create + + + @@ -871,11 +928,30 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + Some Value + Create + + + @@ -1192,11 +1268,30 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + Some Value + Create + + + @@ -1346,10 +1441,29 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectexception.stacktraceexception.typedb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.regions_contactedSouth Central USexception.messagedb.cosmosdb.operation_typeCreate -ExceptionIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + Some Value + Create + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index d2abebc194..e9b0f96a00 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -573,17 +573,104 @@ ] } ] -}]]> - Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -1179,17 +1266,104 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -1766,17 +1940,104 @@ ] } ] -}]]> - Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -2373,17 +2634,104 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -3047,17 +3395,104 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -3643,17 +4078,104 @@ ] } ] -}]]> - Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -4259,16 +4781,103 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeQuerydb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Query + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index dc6df3eacf..501a8b187e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -535,17 +535,104 @@ ] } ] -}]]> - Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -1103,17 +1190,104 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -1652,17 +1826,104 @@ ] } ] -}]]> - Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.FeedIterator Read Next Asyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationFeedIterator Read Next Asyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + FeedIterator Read Next Async + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + @@ -2221,16 +2482,103 @@ ] } ] -}]]> - Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -Operation.Typed FeedIterator ReadNextAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationTyped FeedIterator ReadNextAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReadFeeddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Typed FeedIterator ReadNextAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + ReadFeed + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 29b36304ec..627a8ea66f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -541,11 +541,32 @@ ] } ] -}]]> - Operation.ReadManyItemsStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadManyItemsStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ReadManyItemsStreamAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Read + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -1101,10 +1122,31 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.ReadManyItemsAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadManyItemsAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ReadManyItemsAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Read + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 18f11acd62..016a37aaaf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -88,11 +88,32 @@ ] } ] -}]]> - Operation.CreateItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemStreamAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -177,11 +198,32 @@ ] } ] -}]]> - Operation.ReadItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ReadItemStreamAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Read + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -274,11 +316,32 @@ ] } ] -}]]> - Operation.ReplaceItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReplaceItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ReplaceItemStreamAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Replace + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -366,10 +429,31 @@ ] } ] -}]]> - Operation.DeleteItemStreamAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteItemStreamAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + DeleteItemStreamAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Delete + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index abeaa41de8..add1fcc343 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -108,11 +108,32 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.CreateItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationCreateItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeCreatedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + CreateItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Create + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -202,11 +223,32 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.ReadItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReadItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReaddb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ReadItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Read + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -309,11 +351,32 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.ReplaceItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationReplaceItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeReplacedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + ReplaceItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Replace + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + @@ -405,10 +468,31 @@ "duration in milliseconds": 0 } ] -}]]> - Operation.DeleteItemAsyncaz.namespaceMicrosoft.DocumentDBaz.schema_urldb.operationDeleteItemAsyncdb.namedb.cosmosdb.containerdb.systemcosmosdbdb.cosmosdb.machine_idnet.peer.name127.0.0.1db.cosmosdb.client_iduser_agent.originaldb.cosmosdb.connection_modeDirectdb.cosmosdb.operation_typeDeletedb.cosmosdb.request_content_length_bytesdb.cosmosdb.response_content_length_bytesdb.cosmosdb.status_codedb.cosmosdb.sub_status_codedb.cosmosdb.request_chargedb.cosmosdb.item_countdb.cosmosdb.activity_iddb.cosmosdb.correlated_activity_iddb.cosmosdb.regions_contactedSouth Central US -LatencyOverThresholdIdeally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test. - - +}]]> + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + DeleteItemAsync + Some Value + Some Value + cosmosdb + Some Value + 127.0.0.1 + Some Value + Some Value + Direct + Delete + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + Some Value + South Central US + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index f4983c10a7..e25a46e44c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Cosmos.Tracing internal static class AssertActivity { - public static void IsValid(Activity activity) + public static void IsValidOperationActivity(Activity activity) { Assert.IsTrue(activity.OperationName == activity.DisplayName); @@ -71,7 +71,7 @@ public static void IsValid(Activity activity) public static void AreEqualAcrossListeners() { Assert.AreEqual( - JsonConvert.SerializeObject(CustomListener.CollectedActivities.OrderBy(x => x.Id)), + JsonConvert.SerializeObject(CustomListener.CollectedOperationActivities.OrderBy(x => x.Id)), JsonConvert.SerializeObject(CustomOtelExporter.CollectedActivities.OrderBy(x => x.Id))); } @@ -79,11 +79,11 @@ private static void AssertDatabaseAndContainerName(string name, KeyValuePair exceptionsForContainerAttribute = new List { - "Operation.CreateDatabaseAsync", - "Operation.CreateDatabaseIfNotExistsAsync", - "Operation.ReadAsync", - "Operation.DeleteAsync", - "Operation.DeleteStreamAsync" + "CreateDatabaseAsync", + "CreateDatabaseIfNotExistsAsync", + "ReadAsync", + "DeleteAsync", + "DeleteStreamAsync" }; if ((tag.Key == OpenTelemetryAttributeKeys.ContainerName && !exceptionsForContainerAttribute.Contains(name)) || diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 5f98a6191a..b0df15c3f2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -30,30 +30,19 @@ internal class CustomListener : private ConcurrentBag subscriptions = new(); private ConcurrentBag Scopes { get; } = new(); - public static ConcurrentBag CollectedActivities { private set; get; } = new(); + public static ConcurrentBag CollectedOperationActivities { private set; get; } = new(); + public static ConcurrentBag CollectedNetworkActivities { private set; get; } = new(); private static ConcurrentBag CollectedEvents { set; get; } = new(); - private string SourceType { set; get; } - - // Regex is used to match string 'n' against diagnosticNameSpace string - // which is constructed by combining first two parts of name. - // Eg: Azure.Cosmos.Operation where diagnosticNameSpace is Azure.Cosmos and Operation is the sourceType public CustomListener(string name, string eventName) - : this(n => - { - string[] nameParts = name.Split("."); - string diagnosticNameSpace = $"{nameParts[0]}.{nameParts[1]}"; - return Regex.Match(n, diagnosticNameSpace).Success; - }, name.Split(".")[2], eventName) - + : this(n => Regex.Match(n, name).Success, eventName) { } - public CustomListener(Func filter, string sourceType, string eventName) + public CustomListener(Func filter, string eventName) { this.sourceNameFilter = filter; this.eventName = eventName; - this.SourceType = sourceType; DiagnosticListener.AllListeners.Subscribe(this); } @@ -87,12 +76,7 @@ public void OnNext(KeyValuePair value) string startSuffix = ".Start"; string stopSuffix = ".Stop"; string exceptionSuffix = ".Exception"; - - if(!this.SourceType.Contains("*") && !Activity.Current.OperationName.Contains(this.SourceType)) - { - return; - } - + if (value.Key.EndsWith(startSuffix)) { string name = value.Key[..^startSuffix.Length]; @@ -115,9 +99,16 @@ public void OnNext(KeyValuePair value) { if (producedDiagnosticScope.Activity.Id == Activity.Current.Id) { - AssertActivity.IsValid(producedDiagnosticScope.Activity); - CustomListener.CollectedActivities.Add(producedDiagnosticScope.Activity); - + if (producedDiagnosticScope.Activity.Source.Name.EndsWith("Operation")) + { + AssertActivity.IsValidOperationActivity(producedDiagnosticScope.Activity); + CustomListener.CollectedOperationActivities.Add(producedDiagnosticScope.Activity); + } + else if (producedDiagnosticScope.Activity.Source.Name.EndsWith("Request")) + { + CustomListener.CollectedNetworkActivities.Add(producedDiagnosticScope.Activity); + } + producedDiagnosticScope.IsCompleted = true; return; } @@ -173,13 +164,8 @@ protected override void OnEventSourceCreated(EventSource eventSource) protected override void OnEventWritten(EventWrittenEventArgs eventData) { StringBuilder builder = new StringBuilder(); - builder.Append("") - .Append("").Append(eventData.EventName).Append("") - .Append("Ideally, this should contain request diagnostics but request diagnostics is " + - "subject to change with each request as it contains few unique id. " + - "So just putting this tag with this static text to make sure event is getting generated" + - " for each test.") - .Append(""); + builder.Append($""); + CustomListener.CollectedEvents.Add(builder.ToString()); } @@ -238,6 +224,7 @@ private string GenerateTagForBaselineTest(Activity activity) { List tagsWithStaticValue = new List { + "az.schema_url", "kind", "az.namespace", "db.operation", @@ -249,24 +236,18 @@ private string GenerateTagForBaselineTest(Activity activity) }; StringBuilder builder = new StringBuilder(); - builder.Append("") - .Append("") - .Append(activity.OperationName) - .Append(""); - + builder.Append($""); foreach (KeyValuePair tag in activity.Tags) { - builder - .Append("") - .Append(tag.Key) - .Append(""); - if (tagsWithStaticValue.Contains(tag.Key)) { builder - .Append("") - .Append(tag.Value) - .Append(""); + .Append($"{tag.Value}"); + } + else + { + builder + .Append($"Some Value"); } } @@ -278,15 +259,26 @@ private string GenerateTagForBaselineTest(Activity activity) public List GetRecordedAttributes() { List generatedActivityTagsForBaselineXmls = new(); - List collectedActivities = new List(CustomListener.CollectedActivities); - - collectedActivities.OrderBy(act => act.OperationName); - foreach (Activity activity in collectedActivities) + List collectedOperationActivities = new List(CustomListener.CollectedOperationActivities); + foreach (Activity activity in collectedOperationActivities) { generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity)); } - + + /* List collectedNetworkActivities = new List(CustomListener.CollectedNetworkActivities); + collectedNetworkActivities = collectedNetworkActivities + .OrderBy(act => + act.Source.Name + + act.OperationName + + act.GetTagItem("rntbd.status_code") + + act.GetTagItem("rntbd.sub_status_code")) + .ToList(); + foreach (Activity activity in collectedNetworkActivities) + { + generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity)); + }*/ + List outputList = new List(); if(generatedActivityTagsForBaselineXmls != null && generatedActivityTagsForBaselineXmls.Count > 0) { @@ -304,7 +296,8 @@ public List GetRecordedAttributes() public void ResetAttributes() { CustomListener.CollectedEvents = new(); - CustomListener.CollectedActivities = new(); + CustomListener.CollectedOperationActivities = new(); + CustomListener.CollectedNetworkActivities = new(); } public class ProducedDiagnosticScope diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs index 1f6c335fdd..de819ee021 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs @@ -33,7 +33,7 @@ public override ExportResult Export(in Batch batch) foreach (Activity activity in batch) { - AssertActivity.IsValid(activity); + AssertActivity.IsValidOperationActivity(activity); CollectedActivities.Add(activity); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index ba7e828edf..63d883ef21 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -14,6 +14,7 @@ namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing using System.Threading; using System.Threading.Tasks; using System.Xml; + using System.Xml.Linq; using global::Azure; using Microsoft.Azure.Cosmos.CosmosElements; using Microsoft.Azure.Cosmos.Diagnostics; @@ -1452,10 +1453,12 @@ public override Output ExecuteTest(Input input) StringBuilder oTelActivitiesString = new StringBuilder(); if (input.OTelActivities != null && input.OTelActivities.Count > 0) { + oTelActivitiesString.Append(""); foreach (string attributes in input.OTelActivities) { oTelActivitiesString.AppendLine(attributes); } + oTelActivitiesString.Append(""); } AssertTraceProperites(input.Trace); @@ -1464,9 +1467,23 @@ public override Output ExecuteTest(Input input) Assert.IsTrue(text.Contains("Client Configuration"), $"All diagnostics should have Client Configuration: {text}"); Assert.IsTrue(json.Contains("Client Configuration"), $"All diagnostics should have Client Configuration: {json}"); - return new Output(text, JToken.Parse(json).ToString(Newtonsoft.Json.Formatting.Indented), oTelActivitiesString.ToString()); + return new Output(text, JToken.Parse(json).ToString(Newtonsoft.Json.Formatting.Indented), this.FormatXml(oTelActivitiesString.ToString())); } + private string FormatXml(string xml) + { + try + { + XDocument doc = XDocument.Parse(xml); + return doc.ToString(); + } + catch (Exception) + { + // Handle and throw if fatal exception here; don't just ignore them + return xml; + } + } + private static TraceForBaselineTesting CreateTraceForBaslineTesting(ITrace trace, TraceForBaselineTesting parent) { TraceForBaselineTesting convertedTrace = new TraceForBaselineTesting(trace.Name, trace.Level, trace.Component, parent); @@ -1650,9 +1667,7 @@ public override void SerializeAsXml(XmlWriter xmlWriter) if (!string.IsNullOrWhiteSpace(this.OTelActivities)) { - xmlWriter.WriteStartElement(nameof(this.OTelActivities)); xmlWriter.WriteRaw(this.OTelActivities); - xmlWriter.WriteEndElement(); } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index 59172beb33..366cc68811 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -548,11 +548,11 @@ internal static CustomListener ConfigureOpenTelemetryAndCustomListeners() // Open Telemetry Listener Util.OTelTracerProvider = Sdk.CreateTracerProviderBuilder() .AddCustomOtelExporter() // use any exporter here - .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation") // Right now, it will capture only "Azure.Cosmos.Operation" + .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*") .Build(); // Custom Listener - Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", "Azure-Cosmos-Operation-Request-Diagnostics"); + Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*", "Azure-Cosmos-Operation-Request-Diagnostics"); return Util.TestListener; From 7b32e8eb094caf9d9c2e6e905775c025e5d166f1 Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Thu, 18 May 2023 10:47:27 -0400 Subject: [PATCH 115/164] SDK 3.34.0 : Adds version bump and changelog (#3855) * SDK 3.34.0: Adds version bump and changelog * adding changelog changes * added a missing PREVIEW PR * Update changelog.md Co-authored-by: Justine Cocchi * Update changelog.md Co-authored-by: Kiran Kumar Kolli * removed 3840 as it was not committed * change text for 3832 * fix merge issue * add 3724 * Update changelog.md Co-authored-by: Matias Quaranta * Update changelog.md Co-authored-by: Matias Quaranta * including 3845 --------- Co-authored-by: Justine Cocchi Co-authored-by: Kiran Kumar Kolli Co-authored-by: Matias Quaranta --- Directory.Build.props | 4 +- .../contracts/API_3.34.0-preview.txt | 1558 +++++++++++++++++ .../contracts/API_3.34.0.txt | 1499 ++++++++++++++++ changelog.md | 17 + 4 files changed, 3076 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.34.0-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.34.0.txt diff --git a/Directory.Build.props b/Directory.Build.props index a24f0ab2ac..ef1ffd2e01 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.33.0 - 3.33.0 + 3.34.0 + 3.34.0 preview 3.30.8 2.0.1 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.34.0-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.34.0-preview.txt new file mode 100644 index 0000000000..4087f63f84 --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.34.0-preview.txt @@ -0,0 +1,1558 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public sealed class ComputedProperty + { + public ComputedProperty(); + public string Name { get; set; } + public string Query { get; set; } + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public Collection ComputedProperties { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public enum PriorityLevel + { + High = 1, + Low = 2, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public Nullable PriorityLevel { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ComputedPropertiesDefinition + { + public T Attach(); + public ComputedPropertiesDefinition WithComputedProperty(string name, string query); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public ComputedPropertiesDefinition WithComputedProperties(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.34.0.txt b/Microsoft.Azure.Cosmos/contracts/API_3.34.0.txt new file mode 100644 index 0000000000..a365c00c6a --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.34.0.txt @@ -0,0 +1,1499 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index 709a4bfccf..906c0746ef 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,23 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.34.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.34.0-preview) - 2023-05-17 + +### Added +- [3761](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3761) Query: Adds Computed Property SDK Support + +### [3.34.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.34.0) - 2023-05-17 + +#### Fixed +- [3847](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3847) PackageLicense: Replaces PackageLicenseUrl with PackageLicenseFile since PackageLicenseUrl is deprecated +- [3845](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3845) AI Integration: Fixes Operation Name in the activity and end to end Tests. +- [3832](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3832) Query: Fixes format exception when using culture and partitionKey, difference between Windows and Linux + +#### Added +- [3854](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3854) Change Feed: Adds LatestVersion to ChangeFeedMode +- [3833](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3833) Query: Adds TRIM string system function support in LINQ +- [3826](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3826) Query: Adds support for Lambda expression reuse in LINQ +- [3724](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3724) Query: Added remaining Cosmos Type checking functions to CosmosLinqExtensions. Thanks @onionhammer. ### [3.33.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.33.0-preview) - 2023-04-21 From 2b7d709b9fab04a09f373d4d64e2a1ff7c16f849 Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Thu, 18 May 2023 12:10:49 -0400 Subject: [PATCH 116/164] Release: Fixes changelog.md change for 3845 to preview (#3859) --- changelog.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 906c0746ef..b1b3139828 100644 --- a/changelog.md +++ b/changelog.md @@ -17,11 +17,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - [3761](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3761) Query: Adds Computed Property SDK Support +#### Fixed +- [3845](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3845) AI Integration: Fixes Operation Name in the activity and end to end Tests. + ### [3.34.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.34.0) - 2023-05-17 #### Fixed - [3847](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3847) PackageLicense: Replaces PackageLicenseUrl with PackageLicenseFile since PackageLicenseUrl is deprecated -- [3845](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3845) AI Integration: Fixes Operation Name in the activity and end to end Tests. - [3832](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3832) Query: Fixes format exception when using culture and partitionKey, difference between Windows and Linux #### Added From 3727d4d738cfc24aa372b578fd8ca482a5bc2f3f Mon Sep 17 00:00:00 2001 From: Philip Thomas <86612891+philipthomas-MSFT@users.noreply.github.com> Date: Fri, 19 May 2023 11:12:10 -0400 Subject: [PATCH 117/164] removing ThirdPartyNotice.txt from content and contentfiles folders (#3864) --- Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj index 886a84d586..f8afb4af6c 100644 --- a/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj +++ b/Microsoft.Azure.Cosmos/src/Microsoft.Azure.Cosmos.csproj @@ -59,7 +59,7 @@ - + From 69cda11e4c7537cc8c864e358a4f7d47828c36d7 Mon Sep 17 00:00:00 2001 From: Rinat Minibaev <132935507+rinatmini@users.noreply.github.com> Date: Mon, 22 May 2023 06:19:42 -0700 Subject: [PATCH 118/164] Documentation: Adds see also link to Container.CreateTransactionalBatch (#3860) * Linking limit documentation to Container.CreateTransactionalBatch(PartitionKey) method * Resolved PR comments * Links update * Using learn.microsoft instead of docs.microsoft in the links --------- Co-authored-by: Matias Quaranta --- Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs | 6 +++++- Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs index aa8ff6af62..a479f3d8b0 100644 --- a/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs +++ b/Microsoft.Azure.Cosmos/src/Batch/TransactionalBatch.cs @@ -107,7 +107,9 @@ namespace Microsoft.Azure.Cosmos /// ]]> /// /// - /// Limits on TransactionalBatch requests + /// + /// Limits on TransactionalBatch requests + /// public abstract class TransactionalBatch { /// @@ -244,6 +246,7 @@ public abstract TransactionalBatch PatchItem( /// /// This API only throws on client side exceptions. This is to increase performance and prevent the overhead of throwing exceptions. /// Use on the response returned to ensure that the transactional batch succeeded. + /// Limits on TransactionalBatch requests /// public abstract Task ExecuteAsync( CancellationToken cancellationToken = default); @@ -275,6 +278,7 @@ public abstract Task ExecuteAsync( /// /// This API only throws on client side exceptions. This is to increase performance and prevent the overhead of throwing exceptions. /// Use on the response returned to ensure that the transactional batch succeeded. + /// Limits on TransactionalBatch requests /// public abstract Task ExecuteAsync( TransactionalBatchRequestOptions requestOptions, diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs index 1defe1f3cc..106262a13f 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs @@ -1342,6 +1342,9 @@ public abstract ChangeFeedEstimator GetChangeFeedEstimator( /// /// The partition key for all items in the batch. /// A new instance of . + /// + /// Limits on TransactionalBatch requests + /// public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); /// From d4f48f4258d2e2769a8beee69034e155f4028934 Mon Sep 17 00:00:00 2001 From: Maya-Painter <130110800+Maya-Painter@users.noreply.github.com> Date: Tue, 23 May 2023 15:33:44 -0700 Subject: [PATCH 119/164] Query: Adds type-markers with count and length for large arrays (#3852) * initial commit * cleanup * update test output * cleanup * typo * Pr comments --- .../src/Json/JsonWriter.JsonBinaryWriter.cs | 51 +-- Microsoft.Azure.Cosmos/src/Json/JsonWriter.cs | 1 - .../Json/JsonWriterTests.cs | 409 ++++++++++++------ 3 files changed, 306 insertions(+), 155 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Json/JsonWriter.JsonBinaryWriter.cs b/Microsoft.Azure.Cosmos/src/Json/JsonWriter.JsonBinaryWriter.cs index b9d6d2047a..0df6582cf6 100644 --- a/Microsoft.Azure.Cosmos/src/Json/JsonWriter.JsonBinaryWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Json/JsonWriter.JsonBinaryWriter.cs @@ -33,7 +33,7 @@ abstract partial class JsonWriter : IJsonWriter /// Blitted bytes. public static PreblittedBinaryJsonScope CapturePreblittedBinaryJsonScope(Action scopeWriter) { - JsonBinaryWriter jsonBinaryWriter = new JsonBinaryWriter(initialCapacity: 256, serializeCount: false, enableEncodedStrings: false); + JsonBinaryWriter jsonBinaryWriter = new JsonBinaryWriter(initialCapacity: 256, enableEncodedStrings: false); Contract.Requires(!jsonBinaryWriter.JsonObjectState.InArrayContext); Contract.Requires(!jsonBinaryWriter.JsonObjectState.InObjectContext); Contract.Requires(!jsonBinaryWriter.JsonObjectState.IsPropertyExpected); @@ -243,13 +243,6 @@ private enum RawValueType : byte /// private readonly Stack bufferedContexts; - /// - /// With binary encoding json elements like arrays and object are prefixed with a length in bytes and optionally a count. - /// This flag just determines whether you want to serialize the count, since it's optional and up to the user to make the - /// tradeoff between O(1) .Count() operation as the cost of additional storage. - /// - private readonly bool serializeCount; - /// /// When a user writes an open array or object we reserve this much space for the type marker + length + count /// And correct it later when they write a close array or object. @@ -269,18 +262,15 @@ private enum RawValueType : byte /// Initializes a new instance of the JsonBinaryWriter class. /// /// The initial capacity to avoid intermediary allocations. - /// Whether to serialize the count for object and array typemarkers. /// enable reference string encoding public JsonBinaryWriter( int initialCapacity, - bool serializeCount, bool enableEncodedStrings) { this.EnableEncodedStrings = enableEncodedStrings; this.binaryWriter = new JsonBinaryMemoryWriter(initialCapacity); this.bufferedContexts = new Stack(); - this.serializeCount = serializeCount; - this.reservationSize = JsonBinaryEncoding.TypeMarkerLength + JsonBinaryEncoding.OneByteLength + (this.serializeCount ? JsonBinaryEncoding.OneByteCount : 0); + this.reservationSize = JsonBinaryEncoding.TypeMarkerLength + JsonBinaryEncoding.OneByteLength; this.sharedStrings = new List(); this.sharedStringIndexes = new ReferenceStringDictionary(); this.stringReferenceOffsets = new List(); @@ -300,13 +290,13 @@ public JsonBinaryWriter( public override long CurrentLength => this.binaryWriter.Position; /// - public override void WriteObjectStart() => this.WriterArrayOrObjectStart(isArray: false); + public override void WriteObjectStart() => this.WriteArrayOrObjectStart(isArray: false); /// public override void WriteObjectEnd() => this.WriteArrayOrObjectEnd(isArray: false); /// - public override void WriteArrayStart() => this.WriterArrayOrObjectStart(isArray: true); + public override void WriteArrayStart() => this.WriteArrayOrObjectStart(isArray: true); /// public override void WriteArrayEnd() => this.WriteArrayOrObjectEnd(isArray: true); @@ -536,7 +526,7 @@ internal PreblittedBinaryJsonScope CapturePreblittedBinaryJsonScope(int startPos this.binaryWriter.BufferAsSpan.Slice(startPosition, this.binaryWriter.Position - startPosition).ToArray()); } - private void WriterArrayOrObjectStart(bool isArray) + private void WriteArrayOrObjectStart(bool isArray) { this.RegisterArrayOrObjectStart(isArray, this.binaryWriter.Position, valueCount: 0); @@ -544,10 +534,6 @@ private void WriterArrayOrObjectStart(bool isArray) // We'll adjust this as needed when writing the end of the array/object. this.binaryWriter.Write((byte)0); this.binaryWriter.Write((byte)0); - if (this.serializeCount) - { - this.binaryWriter.Write((byte)0); - } } private void RegisterArrayOrObjectStart(bool isArray, long offset, int valueCount) @@ -611,16 +597,20 @@ private void WriteArrayOrObjectEnd(bool isArray) // Need to figure out how many bytes to encode the length and the count if (payloadLength <= byte.MaxValue) { - // 1 byte length - don't need to move the buffer + bool serializeCount = isArray && (count > 16); + + // 1 byte length - move the buffer forward + Span buffer = this.binaryWriter.BufferAsSpan; int bytesToWrite = JsonBinaryEncoding.TypeMarkerLength + JsonBinaryEncoding.OneByteLength - + (this.serializeCount ? JsonBinaryEncoding.OneByteCount : 0); + + (serializeCount ? JsonBinaryEncoding.OneByteCount : 0); + this.MoveBuffer(buffer, payloadIndex, payloadLength, typeMarkerIndex, bytesToWrite, stringStartIndex, stringReferenceStartIndex); // Move the cursor back this.binaryWriter.Position = typeMarkerIndex; // Write the type marker - if (this.serializeCount) + if (serializeCount) { this.binaryWriter.Write(isArray ? JsonBinaryEncoding.TypeMarker.Array1ByteLengthAndCount : JsonBinaryEncoding.TypeMarker.Object1ByteLengthAndCount); this.binaryWriter.Write((byte)payloadLength); @@ -637,9 +627,11 @@ private void WriteArrayOrObjectEnd(bool isArray) } else if (payloadLength <= ushort.MaxValue) { + bool serializeCount = isArray && ((count > 16) || (payloadLength > 0x1000)); + // 2 byte length - make space for the extra byte length (and extra byte count) this.binaryWriter.Write((byte)0); - if (this.serializeCount) + if (serializeCount) { this.binaryWriter.Write((byte)0); } @@ -648,14 +640,14 @@ private void WriteArrayOrObjectEnd(bool isArray) Span buffer = this.binaryWriter.BufferAsSpan; int bytesToWrite = JsonBinaryEncoding.TypeMarkerLength + JsonBinaryEncoding.TwoByteLength - + (this.serializeCount ? JsonBinaryEncoding.TwoByteCount : 0); + + (serializeCount ? JsonBinaryEncoding.TwoByteCount : 0); this.MoveBuffer(buffer, payloadIndex, payloadLength, typeMarkerIndex, bytesToWrite, stringStartIndex, stringReferenceStartIndex); // Move the cursor back this.binaryWriter.Position = typeMarkerIndex; // Write the type marker - if (this.serializeCount) + if (serializeCount) { this.binaryWriter.Write(isArray ? JsonBinaryEncoding.TypeMarker.Array2ByteLengthAndCount : JsonBinaryEncoding.TypeMarker.Object2ByteLengthAndCount); this.binaryWriter.Write((ushort)payloadLength); @@ -673,11 +665,12 @@ private void WriteArrayOrObjectEnd(bool isArray) else { // (payloadLength <= uint.MaxValue) + bool serializeCount = isArray; // 4 byte length - make space for an extra 3 byte length (and 3 byte count) this.binaryWriter.Write((byte)0); this.binaryWriter.Write((ushort)0); - if (this.serializeCount) + if (serializeCount) { this.binaryWriter.Write((byte)0); this.binaryWriter.Write((ushort)0); @@ -687,14 +680,14 @@ private void WriteArrayOrObjectEnd(bool isArray) Span buffer = this.binaryWriter.BufferAsSpan; int bytesToWrite = JsonBinaryEncoding.TypeMarkerLength + JsonBinaryEncoding.FourByteLength - + (this.serializeCount ? JsonBinaryEncoding.FourByteCount : 0); + + (serializeCount ? JsonBinaryEncoding.FourByteCount : 0); this.MoveBuffer(buffer, payloadIndex, payloadLength, typeMarkerIndex, bytesToWrite, stringStartIndex, stringReferenceStartIndex); // Move the cursor back this.binaryWriter.Position = typeMarkerIndex; // Write the type marker - if (this.serializeCount) + if (serializeCount) { this.binaryWriter.Write(isArray ? JsonBinaryEncoding.TypeMarker.Array4ByteLengthAndCount : JsonBinaryEncoding.TypeMarker.Object4ByteLengthAndCount); this.binaryWriter.Write((uint)payloadLength); @@ -915,7 +908,7 @@ private bool TryRegisterStringValue(Utf8Span utf8Span) // In order to avoid having to change the typer marker later on, we need to account for the case // where the buffer might shift as a result of adjusting array/object length. - int maxOffset = (this.JsonObjectState.CurrentDepth * 3) + (int)this.CurrentLength; + int maxOffset = (this.JsonObjectState.CurrentDepth * 7) + (int)this.CurrentLength; bool shouldAddValue = (utf8Span.Length >= 5) || ((maxOffset <= byte.MaxValue) && (utf8Span.Length >= 2)) || diff --git a/Microsoft.Azure.Cosmos/src/Json/JsonWriter.cs b/Microsoft.Azure.Cosmos/src/Json/JsonWriter.cs index 8e75c0c116..9ea7b42325 100644 --- a/Microsoft.Azure.Cosmos/src/Json/JsonWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Json/JsonWriter.cs @@ -58,7 +58,6 @@ public static IJsonWriter Create( JsonSerializationFormat.Text => new JsonTextWriter(initalCapacity), JsonSerializationFormat.Binary => new JsonBinaryWriter( initialCapacity: initalCapacity, - serializeCount: false, enableEncodedStrings: enableEncodedStrings), _ => throw new ArgumentException( string.Format( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Json/JsonWriterTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Json/JsonWriterTests.cs index e60ab573e8..b44cb49b1f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Json/JsonWriterTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Json/JsonWriterTests.cs @@ -16,7 +16,7 @@ public class JsonWriterTests #region Literals [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void TrueTest() { string expectedString = "true"; @@ -37,7 +37,7 @@ public void TrueTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void FalseTest() { string expectedString = "false"; @@ -58,7 +58,7 @@ public void FalseTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NullTest() { string expectedString = "null"; @@ -80,7 +80,7 @@ public void NullTest() #endregion #region Numbers [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void IntegerTest() { string expectedString = "1337"; @@ -103,7 +103,7 @@ public void IntegerTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void DoubleTest() { string expectedString = "1337.1337"; @@ -126,7 +126,7 @@ public void DoubleTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NaNTest() { string expectedString = "\"NaN\""; @@ -149,7 +149,7 @@ public void NaNTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void PositiveInfinityTest() { string expectedString = "\"Infinity\""; @@ -172,7 +172,7 @@ public void PositiveInfinityTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NegativeInfinityTest() { string expectedString = "\"-Infinity\""; @@ -195,7 +195,7 @@ public void NegativeInfinityTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NegativeNumberTest() { string expectedString = "-1337.1337"; @@ -218,7 +218,7 @@ public void NegativeNumberTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NumberWithScientificNotationTest() { string expectedString = "6.02252E+23"; @@ -241,7 +241,7 @@ public void NumberWithScientificNotationTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NumberRegressionTest() { // regression test - the value 0.00085647800000000004 was being incorrectly rejected @@ -267,7 +267,7 @@ public void NumberRegressionTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NumberPrecisionTest() { string expectedString = "[2.7620553993338772e+018,2.7620553993338778e+018]"; @@ -303,7 +303,7 @@ public void NumberPrecisionTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void LargeNumbersTest() { string expectedString = @"[1,-1,10,-10,14997460357411200,14997460357411000,1499746035741101,1499746035741109,-14997460357411200,-14997460357411000,-1499746035741101,-1499746035741109,1499746035741128,1499752659822592,1499752939110661,1499753827614475,1499970126403840,1499970590815128,1499970842400644,1499971371510025,1499972760675685,1499972969962006,1499973086735836,1499973302072392,1499976826748983]"; @@ -343,7 +343,7 @@ public void LargeNumbersTest() #endregion #region String [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void EmptyStringTest() { string expectedString = "\"\""; @@ -364,7 +364,7 @@ public void EmptyStringTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void StringTest() { string expectedString = "\"Hello World\""; @@ -387,7 +387,7 @@ public void StringTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void SystemStringTest() { int systemStringId = 0; @@ -418,7 +418,7 @@ public void SystemStringTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void DateTimeStringsTest() { { @@ -633,7 +633,7 @@ public void DateTimeStringsTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void HexStringsTest() { { @@ -719,7 +719,7 @@ public void HexStringsTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void CompressedStringsTest() { { @@ -933,7 +933,7 @@ public void CompressedStringsTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void GuidStringsTest() { { @@ -1325,7 +1325,7 @@ public void GuidStringsTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void ReferenceStringsTest() { { @@ -1501,97 +1501,97 @@ public void ReferenceStringsTest() }; byte[] binaryPayload = new byte[] { - 0x80, 0xEB, 0xCE, 0x02, 0x89, 0x70, 0x72, 0x6F, + 0x80, 0xEB, 0xD2, 0x02, 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x31, 0x86, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x31, 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x32, 0xC3, 0x0E, 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x33, 0xE2, 0x64, 0x89, 0x70, 0x72, - 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x30, 0xC3, - 0x04, 0xC3, 0x15, 0xC3, 0x21, 0x89, 0x70, 0x72, - 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x34, 0x89, - 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x35, 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, - 0x74, 0x79, 0x36, 0x89, 0x70, 0x72, 0x6F, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x37, 0x89, 0x70, 0x72, - 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x38, 0x89, - 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x39, 0xC3, 0x0E, 0xC3, 0x0E, 0xC3, 0x0E, 0xC3, - 0x6F, 0xC3, 0x65, 0xC3, 0x5B, 0xC3, 0x47, 0xC3, - 0x3D, 0xC3, 0x21, 0xC3, 0x15, 0xC3, 0x04, 0xC3, - 0x2D, 0xC3, 0x21, 0xC3, 0x0E, 0xC3, 0x3D, 0xC3, - 0x0E, 0xC3, 0x47, 0xE2, 0xB8, 0x8E, 0x53, 0x74, + 0x74, 0x79, 0x33, 0xE5, 0x64, 0x16, 0x89, 0x70, + 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x30, + 0xC3, 0x04, 0xC3, 0x15, 0xC3, 0x21, 0x89, 0x70, + 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x34, + 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x35, 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x36, 0x89, 0x70, 0x72, 0x6F, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x37, 0x89, 0x70, + 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, 0x38, + 0x89, 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, + 0x79, 0x39, 0xC3, 0x0E, 0xC3, 0x0E, 0xC3, 0x0E, + 0xC3, 0x70, 0xC3, 0x66, 0xC3, 0x5C, 0xC3, 0x48, + 0xC3, 0x3E, 0xC3, 0x21, 0xC3, 0x15, 0xC3, 0x04, + 0xC3, 0x2E, 0xC3, 0x21, 0xC3, 0x0E, 0xC3, 0x3E, + 0xC3, 0x0E, 0xC3, 0x48, 0xE5, 0xB8, 0x16, 0x8E, + 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, + 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x30, 0x8E, 0x53, + 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, + 0x75, 0x65, 0x5F, 0x5F, 0x31, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, 0x75, - 0x65, 0x5F, 0x5F, 0x30, 0x8E, 0x53, 0x74, 0x72, + 0x65, 0x5F, 0x5F, 0x32, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, 0x75, 0x65, - 0x5F, 0x5F, 0x31, 0x8E, 0x53, 0x74, 0x72, 0x69, + 0x5F, 0x5F, 0x33, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, - 0x5F, 0x32, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, + 0x5F, 0x34, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, - 0x33, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, - 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x34, + 0x35, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, + 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x36, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, - 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x35, 0x8E, + 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x37, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, - 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x36, 0x8E, 0x53, + 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x38, 0x8E, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, - 0x75, 0x65, 0x5F, 0x5F, 0x37, 0x8E, 0x53, 0x74, - 0x72, 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, 0x75, - 0x65, 0x5F, 0x5F, 0x38, 0x8E, 0x53, 0x74, 0x72, - 0x69, 0x6E, 0x67, 0x56, 0x61, 0x6C, 0x75, 0x65, - 0x5F, 0x5F, 0x39, 0x86, 0x76, 0x61, 0x6C, 0x75, - 0x65, 0x32, 0xC4, 0x33, 0x01, 0xC4, 0x33, 0x01, - 0xC4, 0x24, 0x01, 0xC4, 0x15, 0x01, 0xC4, 0x06, - 0x01, 0xC3, 0xE8, 0xC3, 0xD9, 0xC3, 0xCA, 0xC3, - 0xBB, 0xC3, 0xAC, 0xC3, 0x9D, 0xC3, 0x47, 0xC4, - 0x33, 0x01, 0xC3, 0x51, 0xC4, 0x33, 0x01, 0xC3, - 0x5B, 0xE2, 0xAA, 0x8C, 0x54, 0x65, 0x78, 0x74, - 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x30, + 0x75, 0x65, 0x5F, 0x5F, 0x39, 0x86, 0x76, 0x61, + 0x6C, 0x75, 0x65, 0x32, 0xC4, 0x35, 0x01, 0xC4, + 0x35, 0x01, 0xC4, 0x26, 0x01, 0xC4, 0x17, 0x01, + 0xC4, 0x08, 0x01, 0xC3, 0xEA, 0xC3, 0xDB, 0xC3, + 0xCC, 0xC3, 0xBD, 0xC3, 0xAE, 0xC3, 0x9F, 0xC3, + 0x48, 0xC4, 0x35, 0x01, 0xC3, 0x52, 0xC4, 0x35, + 0x01, 0xC3, 0x5C, 0xE5, 0xAA, 0x16, 0x8C, 0x54, + 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, 0x75, 0x65, + 0x5F, 0x5F, 0x30, 0x8C, 0x54, 0x65, 0x78, 0x74, + 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x31, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, - 0x75, 0x65, 0x5F, 0x5F, 0x31, 0x8C, 0x54, 0x65, + 0x75, 0x65, 0x5F, 0x5F, 0x32, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, - 0x5F, 0x32, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, - 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x33, 0x8C, + 0x5F, 0x33, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, + 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x34, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, 0x75, - 0x65, 0x5F, 0x5F, 0x34, 0x8C, 0x54, 0x65, 0x78, + 0x65, 0x5F, 0x5F, 0x35, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, - 0x35, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, - 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x36, 0x8C, 0x54, + 0x36, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, + 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x37, 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, 0x75, 0x65, - 0x5F, 0x5F, 0x37, 0x8C, 0x54, 0x65, 0x78, 0x74, - 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x38, - 0x8C, 0x54, 0x65, 0x78, 0x74, 0x56, 0x61, 0x6C, - 0x75, 0x65, 0x5F, 0x5F, 0x39, 0x86, 0x76, 0x61, - 0x6C, 0x75, 0x65, 0x33, 0xC4, 0xE5, 0x01, 0xC4, - 0xE5, 0x01, 0xC4, 0xD8, 0x01, 0xC4, 0xCB, 0x01, - 0xC4, 0xBE, 0x01, 0xC4, 0xA4, 0x01, 0xC4, 0x97, - 0x01, 0xC4, 0x8A, 0x01, 0xC4, 0x7D, 0x01, 0xC4, - 0x70, 0x01, 0xC4, 0x63, 0x01, 0xC3, 0x65, 0xC4, - 0xE5, 0x01, 0xC3, 0x6F, 0xC4, 0xE5, 0x01, 0xC3, - 0x2D, 0xE2, 0xA0, 0x8B, 0x42, 0x72, 0x6F, 0x77, - 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x30, 0x8B, + 0x5F, 0x5F, 0x38, 0x8C, 0x54, 0x65, 0x78, 0x74, + 0x56, 0x61, 0x6C, 0x75, 0x65, 0x5F, 0x5F, 0x39, + 0x86, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x33, 0xC4, + 0xE8, 0x01, 0xC4, 0xE8, 0x01, 0xC4, 0xDB, 0x01, + 0xC4, 0xCE, 0x01, 0xC4, 0xC1, 0x01, 0xC4, 0xA7, + 0x01, 0xC4, 0x9A, 0x01, 0xC4, 0x8D, 0x01, 0xC4, + 0x80, 0x01, 0xC4, 0x73, 0x01, 0xC4, 0x66, 0x01, + 0xC3, 0x66, 0xC4, 0xE8, 0x01, 0xC3, 0x70, 0xC4, + 0xE8, 0x01, 0xC3, 0x2E, 0xE5, 0xA0, 0x16, 0x8B, 0x42, 0x72, 0x6F, 0x77, 0x6E, 0x44, 0x6F, 0x67, - 0x5F, 0x5F, 0x31, 0x8B, 0x42, 0x72, 0x6F, 0x77, - 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x32, 0x8B, + 0x5F, 0x5F, 0x30, 0x8B, 0x42, 0x72, 0x6F, 0x77, + 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x31, 0x8B, 0x42, 0x72, 0x6F, 0x77, 0x6E, 0x44, 0x6F, 0x67, - 0x5F, 0x5F, 0x33, 0x8B, 0x42, 0x72, 0x6F, 0x77, - 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x34, 0x8B, + 0x5F, 0x5F, 0x32, 0x8B, 0x42, 0x72, 0x6F, 0x77, + 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x33, 0x8B, 0x42, 0x72, 0x6F, 0x77, 0x6E, 0x44, 0x6F, 0x67, - 0x5F, 0x5F, 0x35, 0x8B, 0x42, 0x72, 0x6F, 0x77, - 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x36, 0x8B, + 0x5F, 0x5F, 0x34, 0x8B, 0x42, 0x72, 0x6F, 0x77, + 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x35, 0x8B, 0x42, 0x72, 0x6F, 0x77, 0x6E, 0x44, 0x6F, 0x67, - 0x5F, 0x5F, 0x37, 0x8B, 0x42, 0x72, 0x6F, 0x77, - 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x38, 0x8B, + 0x5F, 0x5F, 0x36, 0x8B, 0x42, 0x72, 0x6F, 0x77, + 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x37, 0x8B, 0x42, 0x72, 0x6F, 0x77, 0x6E, 0x44, 0x6F, 0x67, - 0x5F, 0x5F, 0x39, 0x86, 0x76, 0x61, 0x6C, 0x75, - 0x65, 0x34, 0xC4, 0x93, 0x02, 0xC4, 0x93, 0x02, - 0xC4, 0x87, 0x02, 0xC4, 0x7B, 0x02, 0xC4, 0x6F, - 0x02, 0xC4, 0x57, 0x02, 0xC4, 0x4B, 0x02, 0xC4, - 0x3F, 0x02, 0xC4, 0x33, 0x02, 0xC4, 0x27, 0x02, - 0xC4, 0x1B, 0x02, 0x89, 0x70, 0x72, 0x6F, 0x70, - 0x65, 0x72, 0x74, 0x79, 0x41, 0x86, 0x76, 0x61, - 0x6C, 0x75, 0x65, 0x41, 0xC4, 0xBB, 0x02, 0xC4, - 0xC5, 0x02 + 0x5F, 0x5F, 0x38, 0x8B, 0x42, 0x72, 0x6F, 0x77, + 0x6E, 0x44, 0x6F, 0x67, 0x5F, 0x5F, 0x39, 0x86, + 0x76, 0x61, 0x6C, 0x75, 0x65, 0x34, 0xC4, 0x97, + 0x02, 0xC4, 0x97, 0x02, 0xC4, 0x8B, 0x02, 0xC4, + 0x7F, 0x02, 0xC4, 0x73, 0x02, 0xC4, 0x5B, 0x02, + 0xC4, 0x4F, 0x02, 0xC4, 0x43, 0x02, 0xC4, 0x37, + 0x02, 0xC4, 0x2B, 0x02, 0xC4, 0x1F, 0x02, 0x89, + 0x70, 0x72, 0x6F, 0x70, 0x65, 0x72, 0x74, 0x79, + 0x41, 0x86, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x41, + 0xC4, 0xBF, 0x02, 0xC4, 0xC9, 0x02 }; this.VerifyWriter(tokensToWrite, binaryPayload); @@ -1600,7 +1600,7 @@ public void ReferenceStringsTest() #endregion #region Array [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void EmptyArrayTest() { string expectedString = "[]"; @@ -1622,7 +1622,7 @@ public void EmptyArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void SingleItemArrayTest() { string expectedString = "[true]"; @@ -1646,7 +1646,7 @@ public void SingleItemArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void IntArrayTest() { string expectedString = "[-2,-1,0,1,2]"; @@ -1686,7 +1686,7 @@ public void IntArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NumberArrayTest() { string expectedString = "[15,22,0.1,-0.073,7.70001E+91]"; @@ -1726,7 +1726,7 @@ public void NumberArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void BooleanArrayTest() { string expectedString = "[true,false]"; @@ -1754,7 +1754,67 @@ public void BooleanArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] + public void BooleanLargeArrayTest() + { + string expectedString = "[true,false,true,false,true,false,false,false,true,false,true,false,true,true,true,false,true]"; + byte[] binaryOutput = + { + BinaryFormat, + JsonBinaryEncoding.TypeMarker.Array1ByteLengthAndCount, + // length + 17, + // count + 17, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.True, + JsonBinaryEncoding.TypeMarker.False, + JsonBinaryEncoding.TypeMarker.True, + }; + + JsonToken[] tokensToWrite = + { + JsonToken.ArrayStart(), + JsonToken.Boolean(true), + JsonToken.Boolean(false), + JsonToken.Boolean(true), + JsonToken.Boolean(false), + JsonToken.Boolean(true), + JsonToken.Boolean(false), + JsonToken.Boolean(false), + JsonToken.Boolean(false), + JsonToken.Boolean(true), + JsonToken.Boolean(false), + JsonToken.Boolean(true), + JsonToken.Boolean(false), + JsonToken.Boolean(true), + JsonToken.Boolean(true), + JsonToken.Boolean(true), + JsonToken.Boolean(false), + JsonToken.Boolean(true), + JsonToken.ArrayEnd(), + }; + + this.VerifyWriter(tokensToWrite, expectedString); + this.VerifyWriter(tokensToWrite, binaryOutput); + this.VerifyWriter(tokensToWrite, binaryOutput, null, false); + } + + [TestMethod] + [Owner("mayapainter")] public void StringArrayTest() { string expectedString = @"[""Hello"",""World"",""Bye""]"; @@ -1794,7 +1854,61 @@ public void StringArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] + public void StringLargeArrayTest() + { + int stringCount = 20; + + string expectedString = @"["; + for (int index = 0; index < stringCount; index++) + { + if (index == 0) + { + expectedString += @"""Hello0"""; + } + else + { + expectedString += @",""Hello" + index + @""""; + } + + } + expectedString += "]"; + + List binaryOutputBuilder = new List + { + new byte[] { BinaryFormat, JsonBinaryEncoding.TypeMarker.Array1ByteLengthAndCount } + }; + + List strings = new List(); + + for (int index = 0; index < stringCount; index++) + { + string value = "Hello" + index; + strings.Add(new byte[] { (byte)(JsonBinaryEncoding.TypeMarker.EncodedStringLengthMin + value.Length) }); + strings.Add(Encoding.UTF8.GetBytes(value)); + } + byte[] stringBytes = strings.SelectMany(x => x).ToArray(); + + binaryOutputBuilder.Add(new byte[] { (byte)stringBytes.Length }); + binaryOutputBuilder.Add(new byte[] { (byte)stringCount }); + binaryOutputBuilder.Add(stringBytes); + byte[] binaryOutput = binaryOutputBuilder.SelectMany(x => x).ToArray(); + + JsonToken[] tokensToWrite = new JsonToken[stringCount + 2]; + tokensToWrite[0] = JsonToken.ArrayStart(); + for (int index = 1; index < stringCount + 1; index++) + { + tokensToWrite[index] = JsonToken.String("Hello" + (index - 1)); + } + tokensToWrite[stringCount + 1] = JsonToken.ArrayEnd(); + + this.VerifyWriter(tokensToWrite, expectedString); + this.VerifyWriter(tokensToWrite, binaryOutput); + this.VerifyWriter(tokensToWrite, binaryOutput, null, false); + } + + [TestMethod] + [Owner("mayapainter")] public void NullArrayTest() { string expectedString = "[null,null,null]"; @@ -1824,7 +1938,52 @@ public void NullArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] + public void NullLargeArrayTest() + { + int nullCount = 300; + + string expectedString = "["; + for (int index = 0; index < nullCount; index++) + { + expectedString += (index == 0) ? "null" : ",null"; + } + expectedString += "]"; + + List binaryOutputBuilder = new List + { + new byte[] { BinaryFormat, JsonBinaryEncoding.TypeMarker.Array2ByteLengthAndCount }, + // length + BitConverter.GetBytes((ushort)nullCount), + // count + BitConverter.GetBytes((ushort)nullCount), + }; + + byte[] elementsBytes = new byte[nullCount]; + + for (int index = 0; index < nullCount; index++) + { + elementsBytes[index] = JsonBinaryEncoding.TypeMarker.Null; + } + + binaryOutputBuilder.Add(elementsBytes); + byte[] binaryOutput = binaryOutputBuilder.SelectMany(x => x).ToArray(); + + JsonToken[] tokensToWrite = new JsonToken[nullCount + 2]; + tokensToWrite[0] = JsonToken.ArrayStart(); + for (int index = 1; index < nullCount + 1; index++) + { + tokensToWrite[index] = JsonToken.Null(); + } + tokensToWrite[nullCount + 1] = JsonToken.ArrayEnd(); + + this.VerifyWriter(tokensToWrite, expectedString); + this.VerifyWriter(tokensToWrite, binaryOutput); + this.VerifyWriter(tokensToWrite, binaryOutput, null, false); + } + + [TestMethod] + [Owner("mayapainter")] public void ObjectArrayTest() { string expectedString = "[{},{}]"; @@ -1854,7 +2013,7 @@ public void ObjectArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void AllPrimitiveArrayTest() { string expectedString = "[0,0,-1,-1.1,1,2,\"hello\",null,true,false]"; @@ -1905,7 +2064,7 @@ public void AllPrimitiveArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void NestedArrayTest() { string expectedString = "[[],[]]"; @@ -1935,7 +2094,7 @@ public void NestedArrayTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void StrangeNumberArrayTest() { string expectedString = @"[ @@ -1994,7 +2153,7 @@ public void StrangeNumberArrayTest() #endregion Array #region Escaping [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void EscapeCharacterTest() { /// @@ -2026,7 +2185,7 @@ public void EscapeCharacterTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void UnicodeEscapeTest() { // You don't have to escape a regular unicode character @@ -2042,7 +2201,7 @@ public void UnicodeEscapeTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void TwoAdjacentUnicodeCharactersTest() { // 2 unicode escape characters that are not surrogate pairs @@ -2059,7 +2218,7 @@ public void TwoAdjacentUnicodeCharactersTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void UnicodeTest() { // You don't have to escape a regular unicode character @@ -2083,7 +2242,7 @@ public void UnicodeTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void EmojiUTF32Test() { // You don't have to escape a regular unicode character @@ -2107,7 +2266,7 @@ public void EmojiUTF32Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void ControlCharacterTests() { HashSet escapeCharacters = new HashSet { '\b', '\f', '\n', '\r', '\t', '\\', '"', '/' }; @@ -2132,7 +2291,7 @@ public void ControlCharacterTests() #endregion #region Objects [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void EmptyObjectTest() { string expectedString = "{}"; @@ -2154,7 +2313,7 @@ public void EmptyObjectTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void SimpleObjectTest() { string expectedString = "{\"GlossDiv\":10,\"title\": \"example glossary\" }"; @@ -2222,7 +2381,7 @@ public void SimpleObjectTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void AllPrimitivesObjectTest() { string expectedString = @"{ @@ -2425,7 +2584,7 @@ public void AllPrimitivesObjectTest() #endregion #region Exceptions [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void ArrayNotStartedTest() { JsonToken[] tokensToWrite = @@ -2438,7 +2597,7 @@ public void ArrayNotStartedTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void ObjectNotStartedTest() { JsonToken[] tokensToWrite = @@ -2451,7 +2610,7 @@ public void ObjectNotStartedTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void PropertyArrayOrObjectNotStartedTest() { JsonToken[] tokensToWrite = @@ -2466,7 +2625,7 @@ public void PropertyArrayOrObjectNotStartedTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void MissingPropertyTest() { JsonToken[] tokensToWrite = @@ -2481,7 +2640,7 @@ public void MissingPropertyTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void PropertyAlreadyAddedTest() { string duplicateFieldName = "This property is added twice"; @@ -2501,7 +2660,7 @@ public void PropertyAlreadyAddedTest() #endregion #region ExtendedTypes [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void Int8Test() { sbyte[] values = new sbyte[] { sbyte.MinValue, sbyte.MinValue + 1, -1, 0, 1, sbyte.MaxValue, sbyte.MaxValue - 1 }; @@ -2531,7 +2690,7 @@ public void Int8Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void Int16Test() { short[] values = new short[] { short.MinValue, short.MinValue + 1, -1, 0, 1, short.MaxValue, short.MaxValue - 1 }; @@ -2561,7 +2720,7 @@ public void Int16Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void Int32Test() { int[] values = new int[] { int.MinValue, int.MinValue + 1, -1, 0, 1, int.MaxValue, int.MaxValue - 1 }; @@ -2591,7 +2750,7 @@ public void Int32Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void Int64Test() { long[] values = new long[] { long.MinValue, long.MinValue + 1, -1, 0, 1, long.MaxValue, long.MaxValue - 1 }; @@ -2621,7 +2780,7 @@ public void Int64Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void UInt32Test() { uint[] values = new uint[] { uint.MinValue, uint.MinValue + 1, 0, 1, uint.MaxValue, uint.MaxValue - 1 }; @@ -2651,7 +2810,7 @@ public void UInt32Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void Float32Test() { float[] values = new float[] { float.MinValue, float.MinValue + 1, 0, 1, float.MaxValue, float.MaxValue - 1 }; @@ -2681,7 +2840,7 @@ public void Float32Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void Float64Test() { double[] values = new double[] { double.MinValue, double.MinValue + 1, 0, 1, double.MaxValue, double.MaxValue - 1 }; @@ -2711,7 +2870,7 @@ public void Float64Test() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void GuidTest() { Guid[] values = new Guid[] { Guid.Empty, Guid.NewGuid() }; @@ -2741,7 +2900,7 @@ public void GuidTest() } [TestMethod] - [Owner("brchon")] + [Owner("mayapainter")] public void BinaryTest() { { From 459a865d323ce0009520420b4d802a1d0e3bf775 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Wed, 24 May 2023 14:23:56 +0530 Subject: [PATCH 120/164] [Internal] AI Integration or Open Telemetry: Design Document (#3858) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * first draft * redesign * ädd link * updated observability url --- docs/SdkDesign.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/SdkDesign.md b/docs/SdkDesign.md index f3f2ec1581..62d4a751f7 100644 --- a/docs/SdkDesign.md +++ b/docs/SdkDesign.md @@ -186,3 +186,32 @@ flowchart LR ConsistencyWriter --> TCPClient ``` +## Distributed Tracing (Preview) + +For detail about usage of this feature, please see the [Azure Cosmos DB SDK observability](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/sdk-observability?tabs=dotnet) + +```mermaid +flowchart TD + classDef orange fill:#f96 + classDef blue fill:#6fa8dc + subgraph ClientContextCore + OpenTelemetryRecorderFactory --> CheckFeatureFlag{isDistributedTracing Enabled?} + CheckFeatureFlag --> |Yes| CreateActivity(Start an Activity or Child activity with specific kind Using DiagnosticScope
and preloaded attributes like containerName, databaseName, operationType) + CreateActivity --> HandlerPipeline + GetResponse --> TriggerDispose(Trigger Dispose of Disagnostic Scope) + TriggerDispose --> CheckLatencyThreshold{Is high latency/errored response?} + CheckLatencyThreshold -- Yes --> GenerateTraceEvent(Generate Warning or Error Trace Event With Request Diagnostics) --> StopActivity + CheckLatencyThreshold -- No --> StopActivity + StopActivity --> SendResponse(Send Response to Caller):::blue + end + OperationRequest[Operation Request]:::blue --> ClientContextCore + subgraph Application + OperationCall(User Application):::orange + end + OperationCall(User Application):::orange --> OperationRequest + CheckFeatureFlag --> |No| HandlerPipeline + HandlerPipeline --> OtherLogic(Goes through TCP/HTTP calls
based on Connection Mode):::blue + OtherLogic --> GetResponse(Get Response for the request) + SendResponse --> OperationCall + +``` \ No newline at end of file From 09e6facad468954b9ac9d51452a39fc207b5035f Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Thu, 25 May 2023 11:55:41 -0400 Subject: [PATCH 121/164] Benchmarking: Adds use of ARM Templates for benchmarking (#3838) * initial commit DONT REVIEW * fixes and documentation * Apply suggestions from code review Co-authored-by: Matias Quaranta * requested changes * Apply suggestions from code review Co-authored-by: Matias Quaranta * name changes * readme changes * nits + changing case of parameters file --------- Co-authored-by: Matias Quaranta --- .../Tools/Benchmark/ARMTemplate/README.md | 73 +++++++++ .../Tools/Benchmark/ARMTemplate/arm1.png | Bin 0 -> 73958 bytes .../Tools/Benchmark/ARMTemplate/arm2.png | Bin 0 -> 85941 bytes .../Tools/Benchmark/ARMTemplate/arm3.png | Bin 0 -> 15913 bytes .../ARMTemplate/benchmarkTemplate.json | 154 ++++++++++++++++++ .../Benchmark/ARMTemplate/parameters.json | 39 +++++ .../Tools/Benchmark/ARMTemplate/run.sh | 2 + 7 files changed, 268 insertions(+) create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/arm1.png create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/arm2.png create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/arm3.png create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/benchmarkTemplate.json create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/parameters.json create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/run.sh diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md new file mode 100644 index 0000000000..f829b79bc6 --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md @@ -0,0 +1,73 @@ +# Running benchmarks on ARM Tempaltes + +[ARM Templates](https://learn.microsoft.com/azure/azure-resource-manager/templates/) makes executing the Azure Cosmos DB SDK Benchmark extremely easy, with very few steps involved. Plus, it lets you test and evaluate performance quickly on multiple resource (CPU/RAM) configurations and across multiple Azure regions seamlessly. + +For the below steps, you will **need an Azure Subscription**. + +## Steps + +### Deploy with one click + +Just click in the **Deploy to Azure button** and it will guide you into automatically configuring, deploying, and running the benchmark. + +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-cosmos-dotnet-v3%2Fmaster%2FARMBenchmarking%2FMicrosoft.Azure.Cosmos.Samples%2FTools%2FBenchmark%2FARMTemplate%2FbenchmarkTemplate.json) + +Please populate the `endpoint` and `key` for your Azure Cosmos DB account. You can [obtain these from the Azure Portal or through CLI](https://learn.microsoft.com/azure/cosmos-db/secure-access-to-data?tabs=using-primary-key#primary-keys). + +Optionally you can modify the other parameters, such as the `throughput` for the container that will get created, the amount of `documents` to insert, the degree of `parallelism`, and if you want the container to be deleted after the benchmark is run (`cleanUpOnFinish` `true/false`). + +Additionally, the template lets you customize the size of the container instance that will be deployed, which you can make as similar as possible to the instance you will be running in production to simulate results. + +### Deploy with Azure CLI + +First open the `parameters.json` file and populate the `endpoint` and `key` for your Azure Cosmos DB account. You can [obtain these from the Azure Portal or through CLI](https://learn.microsoft.com/azure/cosmos-db/secure-access-to-data?tabs=using-primary-key#primary-keys). + + Next, modify the other parameters, such as the `throughput` for the container that will get created, the amount of `documents` to insert, the degree of `parallelism`, and if you want the container to be deleted after the benchmark is run (`cleanUpOnFinish` `true/false`). + + If you're deploying the template to a resource group that does not exist you must create one first. Please note that the name of the resource group can only include alphanumeric characters, periods, underscores, hyphens, and parenthesis. It can be up to 90 characters. The name can't end in a period. To create a resource group use the following command: + ```bash + az group create --name $resourceGroupName --location $location + ``` + + To run the benchmark first navigate to the directory the `benchmarkTemplate.json` and `parameters.json` files are stored and use the Azure CLI with the following command: + ```bash + az deployment group create --resource-group $resourceGroupName --template-file benchmarkTemplate.json --parameters @parameters.json + ``` + +### The Benchmark + +Once you create the benchmark, it will do the following: + +1. It will create a Linux container named `cosmosdbsdkperf` and provision an image with NET 6 inside an instance with the configured CPU and RAM. +![Provisioned Container Instance](./arm1.png) +2. Clone the Azure Cosmos DB SDK repository with the required files +3. Execute the benchmark and provide output logs +4. Stop the instance + +While the container instance is running (or after), you can either use the Azure Portal or the Azure CLI to check the benchmark results with: + +```bash +az container logs -g $resourceGroupName -n cosmosdbsdkperf +``` + +Additionally you can check the logs in the Azure Portal by navigating to the container instance and clicking on the **Logs** tab. + +The logs will show the information, including the initial parameters: + +![Initial benchmark parameters](./arm2.png) + +And the results: + +![Benchmark results](./arm3.png) + +### Clean up + +If you want to remove the Benchmark instance, ypu can delete the container from the Azure Portal. You can also do so from the Azure CLI: + +```bash +az container delete -g $resourceGroupName -n cosmosdbsdkperf +``` + +You can also delete the Benchmark instance from the Azure Portal by navigating to the container instance and clicking on the **Delete** button. + +**Remember to delete the Database and Container** that were created for the Benchmark in your CosmosDB account if you did not use the `CLEANUPFINISH` parameter as `true`. diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/arm1.png b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/arm1.png new file mode 100644 index 0000000000000000000000000000000000000000..c740b8b3d7528c4f7232b24da55fee45cdb4f6c1 GIT binary patch literal 73958 zcmdqJhgVZw+r|mfL_}3OQlnBs=mA0qfjPe4yz|YPe_&=!)?%>^hb+xLd*9`ET{o{DnHg}O5;(=g#Kdj* z@SX(|6Gtx-(+Q80?7&ZMtxQ$|-q_vq?vx*4_@f!rR`0bTYPvB+?S!4K;s@hCPvP2 z+oOVB6`W%FCXc22W3y)S(6~?U2MblPte%J$rN)`P<%Q8#Xa2PCOgX zJ?`}^jFP@)kd*T3g5;znbLULH=O<>D7pE?zs30Bsh6*&-(wWZMeR-xAO~%XeD~7+# zR}bt)oB$U5AKe5V(acZ*m6YGa$ZH%tLYrJ-q~q4mjZ|UHkZkNRgIZ{kr((K-ueipw zh*iaj^km99lmsrBjh2VPB2F>=Biyb^{Nf)Ux&NDE6zzic9DS|{e|<4k$zGu^U8>$~ zD1QQR5UCL`|8E~!vjOHQEv|LO$Nad9$F<~1{6QU@;sLBi4^A#mdvNaNwU3ck4M$5- zzYXzFmav{6Hl~jc-(5BAPnQx8&Q&@uV{;RSdudZ0S!-`;-{_rDARYALLCd;1qFVtW zj)48L=W2GUhQ7CMHK%NCeJ=mIoqi|i?2IMU(y1G&s(*k5O7)ov?HzJzb;m8nlpM!0 zpO*{~O0$VKQ7k)_a%lE_2mE3lB-s^sHf5QI$f@R4DWK(`edEXLOYhEgCFEi2J%*G>LAlZ84NKy} zl6C`~2b#t5p4Fz|?k6_C{Q3Usnqitmqb_YU64TeyV9~nhlDl-%?o(&v@yCFLF)2%v zgHsCwIdUo5>a>DBRYLU^eKm(Dg(28f+db)i7`i=F)SVa9{~I-nFe}gyx301}lb*$% zU%S{BuR~vbk4(<53vH~lKHPpBr5myL487oWRJ%jH(+pZdB0a495Rm1NWu5VLm0fki zu9w^<;DU9v(DnQsGJ#NCA6-tLpNnI`WDj<}S%+j|(mjt#2;Q{_?ZL*XV_k24W^L(0 zzm8BH87w5cu$D>>C)SdS+&j4i@p)RNt#F=wN3mZi{8~Iro5d~g0jjDPWYq1vOvp2e zGh2D}j#7UxGsO=Rue{-dZ>SLZ)Zdc~e(xzB7 zN1AD#O3qzUm)F;T;UaAHY46PM|DMx7#V7a7_fIp7=qvXKo9ETD=QCAeTZ>pMQwZN# z4mdi5^Q)|K(L%;l2b7S#I)XPq{RCJlGAN7C1BD4Ie`B#hE~ zOQ2ItiToQUnVxT7r(s9MjZLnY#V_V4c&gA!Lh2Qtd}F1p;y{O^B+R;GVdTxi7@e_; zI_D+LZoa!_@DBLu-RGP$6#&gcna&1G&b`AakZRFKsb!`D1E^r~3APWxryIs9Eb|hY zj3{nvdx{+y1cSGiZ`;8m#y*;h!?!P<*Nu);_F55zN_9zy>57(f}Z>HRXnWWUYIDy(hLGt9$I$ zPhgJ!eWjHAe!#9d1o{2V68*I6)}J4v!~>sk2IbR|V5g z-wLUJGs#o*Yy!>NZtthxG@tgwm6>`>c5@3xzP=>&%=y5XL|h>XX$O3dw6S@)VA*Wu zqlmtu&pu@t6^RO>4V&O-L)khrCasT4qspJ?D>}JoM+8w@{O4X`8FXsYgVUnEWf?#y zTA>+V~uOX*rZK^p66};wMMqQigF=6>-7PvHc8?KkppAl(>(1L)X zwhs+t9Z+MQ+w+Dxp&PTxh2x?zhwEvI1|cz|qXTFh2r=CIP+Lvq2iZg>hW2off5tFBb1UD%`IHLA)Ty$zE z1kdva?W&rg>zh(el_j9KLt12}oYPa#u9N6Y!kHzVuTlw`cehQh{nF43A~r&1`b&-@ zmmk$*GuGoniCgVNzdfnVs}Z^Gijpy-@a6h}3>jPY2!1_IAe7cbVc~GID*F#8?0fx$ z!5!-=n*(IlI>%B@tY`Fa#|&L!gWI=*o9XwvG*9m%$M=!yg+{zG`wPcxT=Uew(F(0# z?l)irs&ZV)Ng!)*9L|{Q$#w~1aE*>g((Xj94ok=~y~46=e}K|n>W|>(q5t7h#LxrvO&4gM2Pc(M0zBRl1H8Nd2mPEI5S<^I;!XW!^fpayU)e&TIK8HaoA(; zBB=4+c^eJJZ2uk8H36AxXRC^&fMb#Nl3O5mQq~CCo-SqC-9~JOHq%6z+ThcN1{pW4 zjl9Rh2gYK9=CN7Cpa@cq?^f~svToOjx`pbGI!454)@!sxdSjX z1Js{Y`&b9q2ZXWAqa7UR`Au~ADc@OerMh=Fz-R05H)>*zrVPza`K!2{I& z|NJAQwyY^3$)xo*B>1C~P;QMF6zv0U@lxMnP>ESeBGhRkhrFHT30y7L9F#5c}qkwaI8&c~gn+*q2vQwoqrGPgT1HBeZ*o z0zcY_ErAI_x*>yY1QMLGxC`YJc+~K5rjiBXf{fI(e%@HQd%TzgtU8bv)?0}n@`4OaATGZiD)*z7Rab-gHsF< zTD93!wo{jY$5ENRJ9=0Y_A1rmV7$uK6!GJ406ekQuD=0qyx*|sGr1kUzj^L&(e^*P z=-t%^;VTO$jo_93JQ#kP+IqnPh=q#UGNkQ@omF=Pv*r#%5Y|D;S|SJJs`y;Gkw_V| zYYieGibb;aJZx*Dqw0kyZ(GAS4Kt)O4(S`{fQ%DR#TacQ>!dalE8V+8hi^y47dx3R9}1g=@=95hG&u910*2-0pH98d z4_@4XSf0gaDb8k50=obC67a%zfQfa@pCVey!y25w{lq2m2}+~Nv7)%meE|;c^!Kt= z9$K<>hW{YerL!Ap{oO5T1F6bYr$ukyEyHF*M7k?E=XwS{zPn~R%eV!UaH0W>TbK$<_mjH)4N{)|}amLv$#(_q(n4m75euWK>yww$$3(9)Mi8uXEcg|CJ>J zBX-Ebx94xqTq4I0A|0BuH}JI%p3=QgKS?K4kO%k<0*+{|t6|>)qC3@&h8QxAH!(!| zjD8-kvaXWeUBTaWRauEA6qOhkI(rjpTxX9ryDlr1xno6UOhYrj@{W26Fhj&yW;P}Z zJbs*7V5~(jd>#p$Wtsj1WJIMesp^3qbX@&8nZ+0)JiU{e8_t z(6YpYe;$^awgm0eaoBsdH^vdLFyt`A=+w0kGwi2EPO-x_yn8Xkbs z$}lEAX(Pm#jo@iPVQjMvQnl28x?blsa@Ue>0F4O8$8y%h^1&Vjy*=f_eBglu$2o)F z2s7PXF{dRbv8lLiK86qUZ$uyZ=L>21-KksZeKNC}rP|2S{z_!-YvSgIl)sPAxKO7( za(9=o-7N^q#RAPzYQ5)BHg#6ZZ1(7uMn_I_q@zpt2Og&6(V{2%Il3`%aL8j)7f&l| z09x;IZis_$|m--O7+d)At-MoZZ{`SeKgF_070t-QNrQ zAlds>jqJR#@UM{HI(KR+ZENMME3K4g+)NN!Qp0RI!IM_%Av+)24pyLbVSN@kx3*Mi z`*Wa@J8>sMUJs{ThghIbY&pQ%eKId>jyF1}QnZ==kyw-V1OS2rkAUX7L5?P@Ba*gY zJBkVxj8R{6BAxcHN$wUG@}9Tu&3$rw;Dw?ROf0YZ(wTKqt|syGA#TkdkG^6 zOyOy@JIpnImv?gXJkvJ|zk!TNBc}{Gr^$x4F|mdacuOc&MA774+zB=ebvA4fKHHB1 zj?=rjp5(m8p!_fXYZVx^3rMZ8@Wn5d?P=og2`34w5f4~ly90j zRG;Bju(GKE%kHj>t2zZH(fy~dwLauY^b~k?UQ&UKnA z|8yK9b&n{EvL?xQ$arK1zhYS)>8q@ay8epRK)}r0a6oNl43DtJ4f@`CVg}P?)EM+ zozzx^O)DX7l=j!Oti~ce@vHVnsBqkK$M<(%4ASp&@#Rjw9*Wn;6qebuDgW&XHp3bs z>YTMBdV$XWuu*y}V0qp!4HMyWg*1UIo&4;Y;L;&9-KH&usVY$T+~jx@+>j05uTq}; zTbH|ZdQIVx3Ws^HRS?tJkh|cT!A$K|{sHrz1B4cd2Pa#?-lOa#auGwx-x}~VDf9*J zsKF6BZGsF&Xu!da6jVFFNG>A(p{L_4CQqereWoMh{;v8r;L~7;YCB)cYYG+dC2}&M z>slUBL5xQC3RP6WOJ zf%{irJf#RZYCnl%SJV&V6Z9u){inGZNB`8y7SbZnZroTuL@fJ4nLOaUk7X zg{mY7zxIQ-kC)brDBiL>7?crS=$wso>Xz8+|IXUgv{T(GS+oyZg6RThG~@$w;l9W^}Vg9i|ThK6iVIqRwq0T zcg_fF(i&fn#iDe6;hae;g!*l;405qCOWtWOi?DJSO`}Psg?b~ZX%PjJusr`!=AhLPLPGr0Yb5=N+QFK0hsMOfpKn{)%S0>6DD}Al}T@)xC#R+M(X- zi6U^Mvm8)WDa*Ll<{a1*bt>mLSai8#n6_-(Gc@KezcJGe#j=In)_zkr(Z$+$n%kLG z96)>3n}4&~LmBlBr`9I7-jtE~a$TS^1lw}_B@F|?$>&pvtg_S&VoiY*Wd(-Nk-uTv zR1F_*j>ekVqoKJ=s<07@IuDG;^Ep`CQ7&3ZV<=p_>ZUU~nne+NQOe@s=chj~bfD!K zITZ1p)QO^J8MaQw2<|<`ek_Bf!FTeD7SEAJgeI%iF z@lu^z-&JB1wY}|$dy@a3@3;BK49OYN*538gqwf7brI^Kby!5O;h&m&f?!}VKIf`2Oz6%NhIx*2Wqy6jPd?`wPOyA&P?`VKK5W_HC zsu-M-?l?N;qL21$vx_eO{+8q-Gx2X}dDemQ07HpBAbG}g8F@9Yu^_c9aNZpiJUYsq zvmZP`F>qvN9%W$wCUVbr1~uMrcN~%^pqzQzHTstOGgztvxz;s{*dAeVqY$UD3y~?KSYHX9-sI3XKK!4jrUo_f#)1~=-fld_oY0nn&LL1Q0n#KP3`SSO(Cmeh5|}nkDCmr)dW-2sRD{)YK#ukO7%Kk@cLAOP+a_srT4b}?#=8qwGO`>t4rvtq!TQkpIu z?`FBUbr13f%x^wv3Ee<^f6Z$Q92N;#a8o*fkBt90d2V&=zi(q&|9|K$Z}ranU-y{& z*iOvh2?)Q z9pjk(e{_=;=+@a8XVL5&r5?CgO{+d8FNww+^hKUAM!j88_U^?a9WYB|Laj0VjPRhw z3j`N>TBd%xx=nEguS) z>*l5lQaQ7+*KWt!E+YUbNLFeMKX13ijT@$3v;+P-Cr-&S!$1RD95 zuN^J^sCzb{P_YFR(U3Wbh}ZPPy{Y38vjP;*g`bNs+V|gGQRdf){HN_;l5A1zCMD(a zzBp)Y(n-#xF24!&y&8EnLP$4&2b|Vm}7gHe*}sRt$ z8V^P9L~2*x#w{3Um3Y=Bx2ZIZ_Ses#f)&YC6#sQo;3GlHH+l2tDq~tbFamV>*iWT| zH_oczjAfcFGCVjf84}IT#B-sd@JF<0rSGg5%PAk@EZMZcr6J>SY3u7Y)!7nhg{m-w z+hDfdcE|SX0_kS}SJtfq^udZp9c|Z5bFJ2=TU<{i+0ofxAn94m1-s5jof2Q5 z*LUqc6qB*3Nh!Yn`ln@A5_<~zvWiKPsHR*?z(QR)d&ok+HNR#^^?YxRK2VTJpSybR z6PmL{(Q~L5=p8UEe-77IqBZ?~#S&qG4*`yB0sw!xsU}#KtqW4B7GHe@U2)SEP!U=rIl~ zio^aB=<_wAjE)Y-u$Hjj#p(~sMJ@j!*;uqEd***=`72JHUR+9B=%&R=+g( zu04YK(4QRWw^6>UQx;m-Q5P};u7J!)j(v2-pwM(snOUB9#?n>VR1&wKN`I2DW{LlY z2Np=MH9%6+;k@;kS+Y_NxgV; zQ3ZPzP|jr7wwEXlg;3jC!?%}5N&$>!QS;1R5&1aoM5;!xfPKf)`yWM{W994?w)-q4 z^629$_-JWx!$-%qFmsQgTwb>vCmDMl5e2L6P!3vt)B*|Drrqtg zqu&G?I(%EbA#f6&pH3nZ6NPTyU7tbA>$CHuK4;^~Mvrg^9Xula`l`S9^?R4JzF3g@ z(*2RAKjvl09$J<_czo|*Dg#rGI(SPz@8aE=`fXQP&c`%=~G z;Tf`)56-L-x}>{Ks>n8O2M`J^ee~=ABmC54k-v8A-qf! zobPBvH#Qrzmybd!s?j4wLH`NI(a3;>{#3%`8K)-um%$ss`P&Sr{=?HPwd z#DD7^?d$*fkt_*lVMU+MBVH?45qd$o$2T##DjAnBd3k~6GH5UCg&4CukEkIrdGujj zfk5Y*MMIYPpwCHsLj_aKA``slm>iF(KlqKcZ-lc5shSC)1?`(hF6{uRNI`XfB2cUC zc_*&PcSd8PBQUGs*~nds>mXlHl+xO)nM1y9jg?{QPvw2zX#q9hvkB~-` zel#xzf>E}Y>Pvt-HI)OYSL`MvWg|oDh$UunTh$m}9k9E?tL_=fERy;+?~)RmiZH3- z^$`2WwMpxUl`aT%LdK^07PAF+lV(GteQALEh3m6TKCRl;ciq(*Qf^u{+csG_O5su4Lby#cY+4knMQ&ec>qwc=rK#e`i9T7Qn4-~&-f zF7I8(Sx= zCZHd2EA1sUsS&nRz1w$fQs^qb>^`F8%S>{f@}izQH|bNe@IOZfEsdd`YBSxz9cE@hOXxuQbd! zrOIgByAFc$u>bT+KF!P}TsF)%>!<^g6*UC2rY8wAqSLgsS3>VBmG&4Ur-{frWiG)N z)chW!cj@)xK|D)ZMZ=VpC+;k~ep=dqTC7_GUNZLc%8Eh70AO2O5>%kT1}2|zNH2U&XF!5RHW6yoy%uhLsiic8ZHGqOiXve zE?jwf{nf=jRkh3D1#c{z{r-UCL4iY1XAFnS&CTP>SX%> z;%dO3c}|>z`C#_#RjDg{sqQO`(vW&2y|?}?oHTmh@|;-k%Gh4|@RnMSDekn0*1g$J z>!HEV){2%7$V4x)=bFg$J0-~Zzm~bOR%$H0D{Zf)g4#PLY4WLD%h4@Db4N$7Frfra zb4M2;^y9<(QYErJ7$ogap%Fucnx4`O^fTc+1Nc(G%Wc~5mA?W^gwdvYkCFpEf!OTL z6NU2}OqqlMLgFq9D85^%Vf57^a_f)er}6`%>>KY%_a7w~o($XIW=ito6(ex;Bc~cN z0FE*Mtwl?;>#m6VfSXm~ejl&iiPs5(5jx_n#WW-~I_OD;6ud*D+fvQUXbXkIL&S*d ztiWk}EHXqDS8oss87Xcd2^<2&hD4$(wZ>^1Acn@fE7qkmbRY5Xx62-mxMRjqLL>v@ zCuLhx9YmhIAF$XfuKQLP&^&16jI0i)Ht)wP^pOw9Z+9=Ht#|S0-kQNgQW;c_)2AhS zKe)C9ktQ*2vl|WrBf-*-#Lz;z(cdC#l`J=AKO{_Wpqx-qlWQxRzq>H;4`B`TA-#AG z<54%m5@;3=CIq1!YQui|@Fy(B>pk>WXPiRJ*As9?BLNc`tToAHbLA2AzVu8cK-v1M zC+bUsNEQ-_Ar(sSek;pf_~jX5%#r#GE2`3}<|+_9_H5q-^`(~DJn?TM^*?NGefr~6 zS%d`lSyF(o!1on=d&0d}0^_R&Q4r+Ag0i{G@X-^wBFX(3(*3DF-jskgW=DZup~AAY ziROGv@cC%}p^SD~%QW27Bv;{n$m*mNp#7&zHWF24j(LO+S`Ih6c^3YLM*t_gbq z1N}sHZhr6WlL^jzGZ8yGSwQro4{Gf(&Ds<hbFE`wx9xN;j&>qa99~uP&;mW)LDhP;>aX)NYhL!M{hw<_7G9Ehbl483Gs@ zH&mTqN1DN_o4s1|=2Nu;xX=A4Fgcn&SM};=z-r8;4CRT`F4-CgTr30YOD>S4`j;9;L1VGd&JB2`LTGUi@a@(vofvaS_v)E zFD4Ms-aLF<`6##Uw?c412mOm9$W~ul;t@mKzOH1kx$>`nFKJD4zP@K)c-Xc0zwt;! zQ@aUqqN#|$0OYT@vXR$(`Y+Gi=J^~%o7B!fsyTy~8v%q8((}4dqBHG~B7gnK^M5?r z+ZxY=`u^F`!vU2QgYA#KUAtT2vAC87!m?m3MULv$3atdmv@g@Gs{>fRpHY&p+&YcP*ja%4M>+4oax;7`zk}OdkDVLJ+h05K2^5UaPdO zl5o;ly$NxNwg)T_%LE0#m4*tB>Pdul_`^b-C=(Q5Iql^ujFAH%dnV8hI^e6FeSjLh z+1Zzfk^;1L1&9)oy)K4KOiPMD^AS~QpvE6rs$iIT(KzGsV1L#e0drg9>o~X zN?sK(5KT||w1;GWrV+e8FRxZJRUbo)=6}LFRN%Vzn?v+r!kINphr_4GafanRw(;iy z`|LZw&yyWhQhOyn;b90l8&r532SdxOC4Kbzebu7Q&CqgxRGT6{!}#yL!K_X69%S44W!TtVl0rzK>+W5m0-(hj^`WpFDiP57hggsNg)BLwgRt zrf+_Wh&JVtBz8D(_S~jM*kvDNzMK;nXm9dbR8W!o?@5`@;({%!X50Ze6?apg@-JY$ z0jqvVa0mLtJr|BLJ@UqbWEH1R@WsA^7%W2Db$sUZUU<(efRRw z2K6{+fgHYk;3eRs>jc7x9#iQXN4}4FgmrEv3Mwn~=rvn6E8g!rC(iUJl{ETxYZ{nZpsJXMu=%z`S zrW$2PJM?&^5H(H?mlXg=v_1Tpbz`;_itfUd@H8)C3*`eB2XALM z<|_F}XH`S%EtirO!{Ls(q2w+NpA00t@W^+0x9XC-)6=8Sf371{ue6vcZ{QBW6lEtH zm`v>`HFP83h?yyNQ-7mz2Vp!w11zE_mzGt-{&78wrMfmnt=$pgcX*BL?69%%Tu^OH z?9;4Fcf)$<^MK^)88PK#z0(rA46Rw;P<2cJHY zj(#2TI%UK+e+io>!!4-vshqWpthJaRYC^N$aLusU!@utgirkH9dUhL^?%T}13W)D+ zpe?fv|Hk6V!0BChZHR0wHTB@_o<9U+iGuZK$jCdPLX>ClF$W|`y;!N z7iF&|R7bs6KI8i1wbX6ow-4){Yi1Mghpeaa zaHed84gJE|qjYKeQDRHJqJf#EmyAWpzv##z{x|*nlH{En#lIeZU}|9d8f^4#fUwtO z@sHR0GwEb*S2;}=DVL6XG}LN|X0eksKh{?Sb*=@sgVzBy7A&Q+BJq%7hS3*(Ul6kb z>jGB2ZLu)?G=Lwx88c3}HCr#vp*?w*&)Nc^gu8B-+CLy){(0!#J&UFwe)L><#&adFYT3fZr?KS)njyJFeeD`E*-4=LxkAHm zpIJ*ah1Ce7gj)jWcm(gP#u{vPP~P=MMXyPZKwmARx)$fk#OxCA$)81k$>8#5~~9j@xE8t&%lv zxPR_%J5!VaM;}Kw9BxzOC5q@@^d5ndb3K*F2z`fZnqOB;aukh|MYK)Tx6F}oq6xDb zBt`c2!r?3%yTgM4dDGHBWJ*njs(zl00N%OY!+{drC4E6-N!N_|M}q` z=tZ-RC>#sM&yt?rOMWtgYgS=iO|X6$?bsT!uF%f%AnD={6p=h{8;zgaLp5$#)jGGE z)J7|MVp3<@>Aiqi(gWO!z9@^z7&;DQO|W?on$*%U*%(2zas$1)+QQE@&0nuw(h#aP zqY935i15u*Spz|ioC9%|xvEt*HK_o0?aPC8oLja(4GhINec?G?w_CjeafgDCWnHI1@2wrelDf4>z? zQ-<2akU!+RN2KXEg`=7Nl|&|fq~K`Ye1*dJFX>O9k$e5S$~4pDY_lLKnT0zXGL^5x=p_E(};##-ttkju1D zfwuxC!$r@pg;f8P@MHbQAeRHe*N6ayWxQ*~W0eK3-GA#=16%U2hq=`_xBpR=KY8Oi zAuj1$rk4FFdYXKBNLVNM&$(;&lm_rx*KY`X#}ye{B-?z`1B{Z5XdlkCLmcUh+{dU) zC5VC|`=^?~zo!Q}a0o16c$rbgD62mfp$P-=8m20JZmi*X{waLOE1HDNY+J+}GeQk~ zXWHCBTgb2Nep^>@+)fBB9xysVsgS1+=Ih5gEypVva#OMTRZ>p*-2=_D7a0Y6|C0ip zvWk*&0-ab($jUztWVNCW8iGipKddYwE+Zq)iyK+>70Sbk5>DQKb4fYFqv21SXRXv3 zAK}%&;|@}Y&W+Dcb(Y(iLCI$bpPtebaL-FTFt+a9J0t}t{w95@XGwPBjNQwCze(+D zi1yJ&sj+_OsK){>Z<7JUO>~ z`?MYOQ}}Rsp%I|@86SleZC+fi_SxxGq9b=Wgm4{o<XbgQ13{wsCzPlDb6QEu6NzE6r z<81f$EY&!aC!H2OYHXWYcA^oFqqD^E+HPJW5rdo;B#oAMbQ_ZNJ!l8y+7s5r_}_gm zx#@T7Jh4w+f^bG08YQy^qPwZ{QmMvmVg9D}I$wg08leOgtn}XM6b!`8kDRWeKZy8u zWx6Ge6Gf!9z+Ot@0&!`3?DVdm{`dpWELG>2E^@oV*~~v+DjJZlvgp+HDa#W$s7`>} zaiTbL=eZihW0HR3jgjKXLPY+hup{c!J;-=n>0gycBWTsF`&QKS-O0334hn<5o3ZgA zQNgLjJGArQ?A6Bv)sbR$^yY`>r<`S?m}+_cG^P}@>CT7(0z)R`^Ut>X#<)pL{mXe{ zy`VXfi^8tfESw2E!eocOPkS?N0uH(f4>zC$}Tngj{SyJ6F_M+CDx{^t2q=pu-Fdx6c1y$!OIF*PI#BiZ9mQ@d9Z(G(A)1eV(C{ z$CbUbN1h_2iz`18Rt788Vkd%bItg2-mEAXv#1*{N=gI^+gbbJH14E4v zFBor=O73ktef=>nbL0s#q52{4KIih}E*Y;~CF&i)K|~95LvauulTtLza(5YW|ThyDSd?x=i)J zrG9`{nVL!?&4V|G^(f8E>TLV54W;kcWdX(ZYJ9@!OnsX;sUkArI3sXLv>_?TQ7z`{ z#r^!d?FbfBqJZ1*9!W8zHf;(N1itek@=){^$?UR6o1JxNoRB0mB1rh1`8xe)~PwZ51Dj(^FG zxpg|mBvw~Dyk30gvKaCB;_Ld>pc3N0tNX%uC1KQ?RFLjli`p0b^Q}^mgNkQjEO56VJ~^yX@N z1>@W?h>5KVg6CQz6Sz9epF-u6XOCWHsQu}ABT1tyqycQx;IGUD+AU=(2Do+J3AcB5 zUtk)5d7k}<#|XgHTR$@?`$^}l={v0#C5CB}tf~!cMdiDK_`dGMyj9SV&rIF@J<&~K za8iK06i1TxHPrn+>r zO#GVA0A28yDQBo_KN4^P2}5W5%Jt)qROB3*Oio?A`S>M%^Wtcv&UJJPqT!|Qql`+C z1^;LcGkev$2$BCO3WUjyGM>wrjwSW-o&zi?hP}nd{KJDZz|Uzs+Xi2FBmYvnA(W+E z9hibCS)FY+08HENpxwssU2k>3(4dZP*M8WSuU_x=uy8hLW=(xC*0(uRv`sidOHe&< zKBW?vNm*BFR4CRTXw5|nZ(rtc!76L>J(p%lkW{bp%mTV@c9hxfL9TK{X1?JvL8;wHaa{QLw#1i#v0XxJ+H8HbL+g;)g7H8d*P{F_ zs_hj{iv&Q;lXKbwwCedbYaMy7nRsm}?j0!2C1PtZM=?QLd4Fd^((KUGDD%dZ9EF$F z&(X8x*c{ECRnZyHd%dL=H_~~^&95y~UHD2mzo>IFsHcbn!HbzvN(PMfwde@n_L|)s zV21wK5O74TRse(aCDH%!o5AOPy9%+Fxbk-=3fh*L=1IJ{B%e7I>N`-8Ch6YQov0A~ z=U!i$OcrOX*PE_b$R!81oC?jn`c<=Gjnu(5=x0*&BIz-FEMIWo9y?XOOoB&;iu zIP2r~Tt?%}955Vo9gwMyyjvl+^cBsmJ0jsYg~8836AFs3s9*dtHYPX$|D_ry1<2@i zbr0U|AVe$j+aUFWK^`3K%Dd`~uYMvDkSwaJ*TGoVRNPy?U6q0g-xbJF2(IKzTK;)w z^1!@RF;_Db!RhBEqcGD!QuOF`i8=NGr;%8~Jtu|^pl@0y>OJ#l2%RXSMF+N4fRsA} z1F1LHrrKe9RqXmGd-?;eNDT>E%}guu1mRvwC>5dPJ=WWBV(eERfK}aoe?yzTY2pHS zLlm8YMfVRtEb>0bHtsr)mKZYj-r)%;}pS_h0lLsbKiD%E?*kMn}to4rOXl0k>(unDrLRZn(MMd{LcO#S1=JpgcW0gU%#Dd;?5YAHpv2#q zO6KFbf;&d|W#fhIla_dWWwLm>Ztxa82;de>R1}pj3*p z=SsCXm3$_@KZ`H_mCl`NM|iK3K5X;r@1KbPDHv*h6x9=a#&)QkJFZyLjc#K2sr5&TZKw z-a7*kKrB`!G-h_0<*UhEkT6M)$HOZcv=-J5x7+p#4)3bFk4qZTKOIW`+7qvL>RayYoEMu%yC+^DDKqp$M~zdf98l14 zg|uk=AMCwnSd(e@_KTu87QhOE6crEw0cj!~E7C+oX`v`cZ_*)DyP^WpJE(*X0qHeX zdXEr#kPe}j!~jY5$~-g9><|0>`0n?=_mdBE96E+0xw-G_TGv|V`8)Yne|(xgOGv)? z+*BTnhZWE1BHLDjAFwIKkm6;enweP~J8SAH7rU+fkm%f+a0=KMKf;L@DvhV(ZDYP> z?roJZ(*tNs1+HUrk4gHlE_9Xjh4u4Cz03}9eKtuy7ui?onB&pDn!(i@s7kGIxkOh_ znFX%C;R65n8SKD*ZX;^K-%1!6LT!&V zDk4Kmrd?^R@AYb;s!vtQkIg#uh>V8yKy>rH&5DrW412V7{|j|QH}cSrnpdTYxT`vw zc^=j7%kK^K{qvVwmkzj+hW%$c-X*1J#5LWH{Y4yDyx-iDcdORer%0U9=|inz*`Yr) zH|8``wzVcJ)i3r16Gw^Q$k7-=dT0lHzzGJi>#iMT4T#`XgJM@C?_sPALa(pPD`j{3 zETfO8K~1<|C?ue&fM(f!5$C5$zxY-dXz-Bb3rbnB3OR#_YzI zlhL_mWuJFEi#cOrS4qyiS@Y~pn4Li9{KZgDj$BbUqS2=6R7roleqygn-lJ>2tEt0o zur$Vq>R-(^z*1wS)va1$ZMU0l-1w+Qa^l$*{)gT}mzX<$81V-pcAoG*n=Nyo3SkS{ zNBdhgjvbHS>{Ixme!|(FroigtL0Q=R^=t1JZ{M)^!G03w;IGZaryuWqy_&O>(!L|U zCm&%S@`mn#F4?*=d2beazZylPcyjl?Zc3zxzF5wughAmnsznHTAp<;3ad+>wa&}W5 zabHl{p|_)9IakRx$asd?PD+1RGF>`?{Vqe_-y)pDCob6tC* z)wY5?VZNqC17(h~J_9R9L~{LR6KCF?)NeCRf9iE(+e$~9ibsmAmjh?7=Sn~xIr)S? z(@fXIV^!JdN}cMR4Z0`|fimZz;(+ID@oY0218J;MYq2~kE*G1kMD3mO9~V)OZb|hU z%-957=CIZz1zaxe4xzjUxvDM26X)rZ!NZoiXVz-a?bt#7Yo}G9<+$4pmxrj|vSK_bwG&cHMMiws!tvWEj-Y>hleLw~`k>8V%Kzud zrb%vELlb+*?98mrw`3c@_1;G#EuoZb_+)=WZq%RvT8-UH{O~=E>}NeG({jy zryAZ4DIV>_Xvgzs$<=K`t50p=c3s{Wf+%xR007HysTV1$CS-P1}t0 zIu@9d>@UWk@E(gjt%(@#%12EDQ9PU1-ts|B<)&q-pQ;+*=8w`zX)80fGC8*KNg~E$ zD_+LYuFb1`OER;10AaYU-lcqow!7RPNo5l@Zn)j?!}P55BHY3;ha1dPXK`rf($A|T zXxok0R``*FIpozv7Hz*NrH*&0kY;-KhMi48Rw zBiaAKM(&n~0gn>0Wry(ku(VyI&C2IpNx7S6>)7m+?JZxdIx*h>XPz`qlER=T*cYkgA~t%3;?u%ap)_) z%32#y(trC|k1s;B`P9dS4<&*H$n{wzce9-yIy_4O+KiW{cn`27nHJo=;HLB7 zdnFBVmL?wOI3zOdMKi@XE$kYAh9+LJT4_wqe==9-1EChTLVEl4Im)2Wyer2#^m!={ z>+JBA=l8LxrNqOs_433@<&5h|k|e5;gef9SWXM`&>uk@yH|a_|NT-CUW;cb01>=fe zJFOogm28wVakp}M@><+vYgl(JjUu}ke0K28yPe!;tQgo6uuB&EsGA-1>DDO$v!uJc z4Er~V>l{ctN+_~#YZ`nL;%%?aVf|-*)TjHV2lQ7aNX*`h-pJyr@7K8%;({-LsJVbH zU!%X?iClQkPpqoHbOdyerVR4YzJupoc;wlJUTIZzU`=6^*mkDR?S5ItcJFxN;(#@> zvtyY5KW`0M3Z~l;#2Mx&*Xo;}ezt@V0hn7Tbse$7tsMK*&54A!ZGqLRH@4X}>O+UXL(R=9Rx~hoO`v z9sJL`{zw7F*Bt5H>?pa2sPLb^`}4oa#*Z%RocnQF^#3%%*8#sXMBjgXP*a0quzyBPx^n~qylE?Uen{%tLsQPoea_LMW~X4H6rQ7x?$D)G&;@J^KI+s9kZdQCJ(MFFQPVKGJaWd#3Q zI)t)krGG_tMj1;fa2aDN3WV8*m`t{Qgj9x3!lFmuOh5p@2ODEZM~Yb86DI;F8%@CA z)8c$CMXdwh+ISTT!2LyZ7tPmdf8D(y2tE?+!!$YB)F+Kp`w$uCNlUcZW#km!VNeZ%Sew=H4)&W!Zy^8^7WLWL}Hd5F`{+sBxb;X75oD978L}ehS zED~qzmb^WA3|x)T@2~7h!0e6<%nD2QI!_pz3vA_+LA$RYbdcPvJkkw|@m+AtuBn_n zsytiy8x`=!-gc895J4oZy_j!O`?(QRsc~%a@%dn!u$=BV0YDzx z)w10O`NIHgs=n#D*qj?DrH#}9mg!sYSTur|Wy?r|S0%uhiDg<`lTG|wO34+Em2n~d zfURGXtD539_aD_~Vbk8)^!PH52dp&KpPF`G8o8jJ*ehG^H`681SLU2TPMCVbbX?r5 z;v}6_GC;8Xy1^_tU8FMsPRdgwKKT0jxvHOEF>is0(}Ze{(JJd=WMYYgDH&YL2$UiA zlq)zHeOXwIF`n9Vz72Tx#kl1?!}EtK)pHFBTP1#^R#+1}tW`pfN(?3*OYvLDf*T8G zl(ODc>X@LqiV39EzUEOf0%41@l@hJWSHB6|2b5j=!nEQf)!$!!39#1C+%Xk{VI;wE z6TKb#>F0DOUK3O6&u_Rg-UT=k+wSZVxm}17hZBUn357a?W^Afii$P(UZ)oxgI3A2P z#Vfhw4tfuycyaR2cYdf^qh`ije#O@9;EWDMYR1Qyo!iX0v`M7a72w8jxc=vy`*9Yz z^_Bk5Sx%iF&O_)Qy1QNs##vjSPR@a+7wqzLUdl5vN0NPIdQ1HiS*ZrpE<|4ztp`QYUbg0xvT8r46=$)qaY7R)Vc6+Wx!6r8d$ zXp@PJaeP%esNf@hEL`XBro))vOPV8{tNC{DqB^p z)`r(-0Hv3jp5x;-wQ*S3;1ize9-X(jN)Dtt-#arwZV{)q)r=A<*-8lbbjOonln zUogA)WRYFBhHo$$q*xn=MQ`N1(%r{_Y|NZ)eMd^ICzp^sx zIVYGlWlSkAT@6)RFqUgwpQtcfqlBu2NZ|$x#A^#OnEXSgeUs8RhgOZbB<~l<;d{_# z);i0m&A!#jea>r&X8I0L*8>PwjEJ2ycUC# zn<`i+3fgr09(?3sepy&L&b~mKpf_pkxpE6t@A+-%=P74{Vw<;d=~JFV@+JPTNG}vQ zCDAM)37uV?K?SzT=`cq!N+9tL4Z0$UGwY6kEQ*hcyY+zF95BBp0Hl_{lGCz1lf)- zzroD;t0bh`F-68cn*VyD0i7?I+3irVGJ(4MGW?@uvkJBHqCQLjqvcBo*V3-B5)+6_ zH!_@*u-gZ1lk!C0mJn7Be%A!9=ap7zHRxgr=p^gkr`1x@HNETMZMkkgm3$_m^jmzE z&L=w3Yf7L(^x^&1szq*>7jP+htG1=6fW)%GV>24lQ&I_{%+=*9Keyy9QwxtGk3S*U>Gp#95`DMFJ^*7ll329orgYt zU#q@}4p72W-<~NH)vryI(^DvQmc`OXvjce~?Od|m-rorbK}#o%nHubWQ zk;8rZ^4AMOIH(^>beLE<>>jyoJ0fKK%}n+7W7IBIZfW2kJlJM?Rtmh=r(XE+s|Fdz zjBy0H*(@1`e(kiVozY2>7ZSXl7zWf0&5*giEp9XJ3@~sCJPgqX7QTR5NFp(#e#{|( z3F(3N7SlKD_pj0u?r^(RH6jl9=DCj{{!oFocuyujTw#Cdrnpv)-0MJ)u5t3HCP-Od zPw-Ehfnky;9k;Hl6gDXDTzv6mhNNXvys8^i7ZU@{YH?ze6n3MEOCn1PfTD+8D1zQ(cb9$8AZBNvq%l!;aUt zm1KQ(F)5=HaohiX*cg6(cf&n07Eq7>QEZ?m&z4_$xm$0fpHtBUAp8>r@_`H0yQghB zj1gxrhB?u=n2;0P{n8_(zSIjnmE#f?UiP0VuFsdDU=^n`?mV-XG#_`iQEhRxHLpR3 zQKu7o8VIBSBTaqS4nq3g6hB)LJRoB==FS%~zR_Q}79n4P+p|ahnePK5MtrpkcB`he z0ay5{rbga_`pK-|9K4$zgRqGmb1BtE)FBb+waT+Y13MmVldb7B{&IrdYTXHmW=dyKf5)plnnZY535<(zjJ ziw_E6isO`ZIs?$Qm$(?uGHy2MSjFWsTI0Bou6B+$^M)O1gm-<`*674@YpD9y22`N7 zmk_<6RHYag`JzXnYYp`3Qb%@FcOH-D;Z?f+*@e6!fE{v+Y&4cwUV+IOTviK zIjdv(Xrm)@7Wq>Z$&1Kg-!Ws>>jCUNYkoL;Ig2_i({>;KBf_^E()@q?QwAuCv|9!l z+cwVuqasei8<%S+s^B#zZBjr7246oB4o*bum7>y<_)?DqB^igoDlfeKh~{H5XU8$g z`&|;=0L7bK3J@lSH;KwuPxEW+lg_U)1cMtIL1~+c_vidb?ci;<7$&gxPlIk z!qaQB(zaWb2wo|x;+7SxVVU%+CI@enOD7d|nV_uiQFR&V0RW zt36n6*cMClU#+#riJe+p9%MoJbo~W5ophU#v}~bY_GDTzUD!l)fzvdqyo5D{DQ`Lg zwvISCi)S;tzebd@;R;Df%S|3h#b2J}Z_;(a(#{uMhkmE`Jb8AFa)!8Ry+Dsc0KQN> z4h}fmYffH%eSGKM4bPuBC)I-aVRecGF>O49HgqjesYBnUjejUi|#3{YeZ$WNsCj3q+VcRt7k%)aNQ3lvz7UxGwm60q&+n-bPhtiUgr3 z*RmtCv{Ezut2_gmu@V{9?eVsC=zOD+`0C}l1S`rH;2IksD(pnetTBqO7ucC!*u{)i ziYuYCW7>AS^}w{05o>t(9B(RHwH)P8AnwxjdFPd)9AJ{F(A={eU*Y= z(jD1H_-}XHb@Lk)+f3GEjMaxA2y!|gToR%g5k8ueU4?EGr0!mt*)!PyL< z564i)Qod?z^dKA*-fH&vbdBKD9f@H$!p;^ZxZIfx^~d4-Ry^3j!M zKr!P-*AnB49XD(773e5FPY3+HwztsZh#M>R?lk9E>&pl~iCT2QlI5q&X;jKM7>S}a z*~Q~r>S6jWtU_Ch7;j60kIuoVHXKw`&97&$mIFk`N#j^Kw{(xT z0J}ESY)?s=MXvoKyGyR06|`)6Jg?J5TFnz8ddgDsI%GicL+dGf-`1}~bY*HB?Q5IM zltN8i;+9C-jK^F6vyHfM`He{ff;&j}D_qIJeIeTznHoTpm8Q|1ZKVvprkG#LqX`~3 zi=3K^HauBAg{HKuT*}BA*MT4Z^m+EPeX$HuJe|Bv1GOzd23QV|OrUN59eD8STRV2o zIr{^%#b|xjm4vBs9sTBlJyOPWueij%Ro^TMaCjR#t9S)f^Dm$;_f!|Z@?tiy73mSa zlcNrRQSBR4Ff_VS2jvcN^^Dw`VpWc06Gdp;_vM;jIwcJY*ACG;mBqXFIN?i&c61j{ zl!wR-728V9^wd;g{O8Uf7@JM1JR>k{XU^u`Dv=2QX(D}Jzg2s2r$ULi5)Wr2_EULj zKgcL*9g4dk0puc`yV=IUtg3S6=yZoznul`#iXTk(!$p11fo858$56p!E@D7fxm6sa zrE1DJ0gkXpfQV{jv?aAl7H`@pwQ=&}@6Klc6r&jm_gpvrYf)Zd>>X6mf4mXB$lnHQ< zovFjC#?@|9Dt(ofujJa00f|LKMZlD9xDs@bl^iBd*KY%ABwDUOpM2SM^yZNw}oKD#?e*<6r9*fFrkUl6NK_ zVE%H>vC9B(>5g>{&#R!Lt!q?fCos_z6Qk_E0fAb7*EB)(q`{C2EF<56Pa{?V2TYDl z(0Kgy`hyun6i*cT^C&thl+$p|iU6m}z`x!s2%91`S{HwG5 z6PL2g(D{jgMl~vR5VGw`E7bkncVf_a#vm7DeF`XD;pa?@pubhPHZwF(4Ki+_iKeI+ zvp{Zf8M~fh-M`c)@L_bs9)*4n03r6@uTOhl{lDLAe=%ZFh*!})fSfD9S3GaGmYehX z`}0APTEW%5{|o8G#qt^R-v?s)zrOsx`q%&8RdHNiD(qd{_T*tny;D<*3GV*)pT|CK z4m!#OjwQz>pT5f97=J!K^4hUWc2=)MpX#c~Vjl(plSBsY%VFt?$r#QkJev_LeO#{gD<*OZ^TG zJhN{0(q6~E{3Xr!?Y38K>Tzol6IHl~0o|W^bo-nKAesp098o|OCH{Dx038WG1-rDv z!ndz&5DCtIlStvlc`VWJ@P_-$q>_--M!_IvkxxP1>JQHc#Q%BE8x%)$}&QI1R`Ts@~4mM(!5Z62B_iVCF(cV=IwQST>pH> zvESbae&shL?$7wl=!z9y4nF!h`CxB{eFa>4(!*0Fl!3-a zZJ@uEWc>0P`NDl@-=aL}wS%GyXy8^Q#Qo9OH3jXlH*LC8dCd1r;uyFEL{S)-(+*@D@F*mw&Cni|UoV>t2Cx;w=F-U@}!s_#E;-+Wlkav}* z%1LEnW44XaqE+(BLXqbHRc%K;?%BL_-^;+CtDLFo#qU(^h$y`7>&#}OzWT4x(PmDUxLw3Bv_N; zB;F?#zNg1E4OUJdPK@++e(1{4*AX(!oqk-Hrov-W7tgYrd2aR>jy`XL;KplYSIgEd z_ZEAU33?Y7FQWcak3>G?U|C0JHTTSuQ{AiqoBGIbSNja}u^%xY$LtNHe1iI;#jB0l zL6R3O=2rB+M$a+`+~Y6rY;x7R2o4_f6KVD8LRI)VN25P;6aTzes=X&vSrp%`$}Z3s zJGz}rfqUzd=M7u>T~go6Q;54Mn@75~6h`H&-S^8fa9K3Ws?OPWm(IAr@H7 zEYczC^h}V9r3EO_CFfp=kJq&(OfH)F&&wD>$+wSlEsh>!04T4EFnbh&VkHKe-Ws6` zLl9*lMKs%VvKTn$$Zz+<#>#A(0I8)`{i9c2&E0+nlnKr7;}^DX>P};Q2$EkCpu|t` zXigEwDE))SlQ=`Sb~va~(!M#7OJ<`g%2G^0g55hQr%OXx(Qi+j;&f1PtwNUbf{$fWFH>>t&`l3^;;5ip|&x|Dk98HbR zv`rImi?zQN%A*CEQ~c+8YsU&>#B{Ho(oP;F`2*IzMcPqjj^jl@Yb|(&2`$Pq=>&nNZ8yu`(MT-Jsmd$l(WE)o4 zlv@dTo6c_sihuNCEp2#iufPB15GfqQ^W?Eml`W&DvE><;Ymui5zrEtc|FbghFa2^S z$hbK?re@9iA639EJ)J9SW`=W$`*2UuUgdIi;P`?KS!)bi1~HzKI!$a4d!uwkC0_iYw) z^m1mMhukLG1nBm2I9SHD!$DbQo2R2kK4HECLr)dtQuezhX0oS-tq*9{vh^o&=_}9A zn`_hJaTdRyFT_P!O=;V~@sF0|#| zIJwiX*kcy(PEK{|#I%9Tf$V|Yfe>qP`%#;ZW3NdIorLia`+pXK3789k^T!ghU?X-P z1bg^(F71_IXN>vjKu>6mI?d;^nP-%adkmy}2)*#- zY`GpM8AWN-&yB6!<~tRr_U(@Y+Q%vV>-LkYaFJR|YjL@@sTvCXAHG2>41iA}PC42D ziz*2cNZP4~H{9X5T{;Ee3fHdw&`OoxyJ+&W2kgg5a~BN}sR0{($K&K3%pF#2f5mD$%cE#56kJe^0Z>2wCYTpa+D$V4lE@4dQYw%cLN2ZmeE7ZI~uZeAbk_{^(((G8zGnnK+3U}4U1Q+LU-HNMro4C6}@gY4bE zUaGxFr@G@hu&!_%lhaLap{Ewhxos3vn3o*7Ti6ikb4!jsbFGW(w^XFB<^R3^+!KI~ z#6ejnMfxmxu-XTkyz%MJV2IU;V)2AMXZjsC;JzCF_HxW~4^28u9-3?irLOKH4{ZcO z|FnzznANY!PA9(Q`jJ{&RRdp_hFFOR!$tTyhfL^S2Oj$&`G8w+nB%eX`QVt-_mG0W97mm9VP*aID(nN99U6>6GWI>vCW?!L69c0+ z>IKkH-OLbsU8dT&$u5KE=^G5-p1xMYgkPTpa7DGGtpr&8=?PFR22=6*bb$qO9ULF` zLb#QLVJrk$2*L4AF?)}kxm$S&=Y;B}i#4_aC==|feGyELIDeo8MUA9MoMAuKg+Xj# zyDn!xsfEc;nrclVkZSTVQm3j)haI2;!|~OmETa?L5|->Rs+`+3A3p3>=|re!3zFD zG(96pHH2lWYoArLOZ$Ufs6mRYZFQ&5pBu5jg-1JXl|Q)GcXytEp=~rL&uX^Qf$0eh zHjQw|E`}W_c2zGl$JBn?P`S(3G@Y>H?`)sWm&4H(K-XWWYu@>W^}1CmtoHJH6`ryx z78~y9fusE}J+ych6ALTv@A9c0Wl;~y^Jn8%MsL4FETp)M)om!KJ<=3W?uN`{j@23v z6}fiGtNne~LLL>}MoW<*;miUX`=qS3WLqwjTwJRN#HV4GLjgTBF5Bh;44D>d=4s}Q zIVreu)wj_%FWKR;_&}@@?e9y{fOIVWigm9x{IujLon(Fv$@^iI>$7q0_Il`O^6I2| zn{fp{kln1}IMX0)G8B)rRW*9t$$8qYqu^aNvEQB!O^K8D$TqHia8o1ljL^$N0^zWP z#NYLPy64E2hgwa)(X)IrYpBx4s_rJU<{*dYkV^03Fhdwe_7;HGI~0`B!L?g#$T zsxn>+ToryZ;b6Mc(uh6-A-{Su7X0=P&fNM&uRCmtD3vOZR;3O;VPPEFBqkiC5my-F zf$@hFSjqbhcZF`Grh<32cLNiYYgE&eCTdWS3L~O#rk7~%>tEdK(Z_ZAOteHHz%+WI zJ6k^nT2L@leXCV~(ai|4Y9V+5n{89HwOPCwidD{!mQN2za025((O;jl#M$46VZlmw48YPYE2W(~ zzsw<&^lxQc7xh{kidx1{g_|L7K!HXP1pjF`+`$Ms*sXYvvQttO@;Z--r?J!4CfZ@J z-~tmX4}YgAQeDh&Dy#Gpv6>AY*L(B{aofA*81crugtGhV*>_HbL8v#dN-;j!LAV!R z``F>P{T7<4eY*Z4tx!IxxlT1&^zgwvV^T5c{JlpQ$H9VoAGXd~y-qyu^QAJG2h;58 zTrBxnAH2D6=!}4v;*5oGJ$@)a1?f}1>aCSAuia>$a3W9Y<~0!-814tSSo3a3IP{){ z$a2&VG+uS~N1lEDde9?z9*uUT)4TF;A=e(X0LnmbIiOH{1&fZ+9hWv#l-210{wd0{{wSn4P z*z8Pio^i3Lj~9!6e5+E6BTm{Un0$;fKxJf#wFSDP#L!Ja?dTSx=aQ!yG9U6hXLKdJFf^fG!1w?p3$5Zgm&Wb(7Bz$t!#wOPzK#Ds$o!m5wF%3`lx6+)xMO9ZbfI zoAfh}^LozMO=2^g&4i3{V;u&IJ9kt>GQBG)@rB<1#Hx60*q_xQ3VxIKDw}#n?%Z&% zN%Z&;lV8P@E|W@yBU-C>w^}Gq6iiP{p=c1rP!_!~l%87uU1X1~9WU9%lXs8$mS$pH zCxUlB3E^7L>*MjCiCt^V^?x75pExE3!NWjR&w#8!*{(thK`FdgPbqP_uX)ELNLehp zo}%mw&FP&3)Ot#7-o~ZJZJJYAt1QgmH;ixx`yQUqe9tU)4^t%#L!CV4wk7K{XoFOn z#-mf@c;Hu}WmID4_-IUnhI40Bp|go>=&!&?AlL>F#tpN0D(YN9zN z&WA#0DY_K_X3mNy^b#T;v$;^!qZot0IXG85keD+%=Iiu$Fh~I=rL)#6M>Y$u1D>fC=`Bg zLrogBT2H(rkfFHsI}wux_7biEbZmlm9}kzu7=QyVqspfk^RSs(KNO^a%{gQ$-tUGt;g-yI$*BzsFWoSe-z1~Y7zQsqc!jCs7 zb&tbYWMN0^L!BQ@>3sD<3&zw;EnY*DYwKz1)6me7Zx^&A&gT!Anz>E2%1*uPS~Wy) ziW?XA`jt6uvgj73nST$aw(UmYxf1x4&?5Kz}mYm{e22|dndSL0>u zOF^BY-e2l(rk7{RM_$=1t?jWS$irl?$1mV0Sj64uL6J+dh|Y*Q9_f@ar5M%L?l!>H zR@*^Sg2ZS=McmiEIsh=lPt4#&O-hZKn0d~?c2=zWG@l-I5j|_>zm8IxSf2UwQ+K@g z8O(IXtSaOq&jfI*mjh0N5^JR|xRG(6E=#Ba4+HD7rh?xK!#(uc^Y0~dvaimev zYugGK=o3b4ZVdU`pDnpLb}IeY6o{C#q4|8zC~_B9krC{fefF=^xY0PNj`=rO8TY>u zU!f%)9rb5bzK${pvM>7yE5!O-pR%LGNe>t>l=y&H=tF z(%U8zWc?5h_Azyw)##faD)GO5ZZy4BN@z(|LR?Q#b}S{|Jm=7RoVGbHi+zfO5VyH3 z^SU=Zlz3po`348dQ<^54)7NV*g`zxZ^Xdq}`jA5dM);yh#g3+f`uWD^M4MK}+a{cc zJO)=_!Wbt(NQt&xOpA_EbJBo@nl}5)2~^;Rz?{_%pU?i!LXX-a-KPgKLUDeCn`^+q z_27{g|NUqvF2SQA^C?#}wFq+NbarbYvh8xdwk4^A9TL2L4SPx(R8T$XBDOl5{4Bwx zdT)66Dk+Va|A%Vd%FjfnG8wdU5@YKNgN2up?a=lG7t)Uma?PTAwZ&;I@u|mM}0%hYx`RC1w6!my^@O< zDnbO69Q$tz0r{Ek1Wlez@?0KFv(=4L_J6iE2a9HpN3NZYS}2!{$s^ycDKYU08HUGB{QR$k$Z&Pyw2yWw7Lyi>Dt`-%~Y4slJ6K#!$4?@(SPYm z_r5%VfEZz*v|kS4GBo|z(>z7>2S0Z_&I2bAn{sZR)8AnIz9e!;pi$ldGb2e^q|lnO z?7g%_T>NK1zlXO4txMn`&Y|ova)!wVFT(IplXF1KYP+8BFSrG zu+s5*v{TYmcYZg)z27RbZ*yhVux}=WD$iOPNkH~smpyJ;Y;4(A^%^Uq)@qlQO|BGfD0XXdh4 z$BT#=Jdg3GsBD=67|(~w?M6;;+~jxc{}i}+7Wo?FR~EuL4#U-b$(+i!n-4Y@@1T+A zBhzIl_0TaNc4oO&JX{6bMgpidur|=}{&X|@wk`JH76jt8_|O&n5F%ZD0zKa72r>2< zGhXpmq4WLsEyM7s3Qo(oyGu}DSk}Fsp|k2WU?!O6iVE(kydwfpb%k_Ly?VmAyd?Rv z+=NPyP_Hb1dT7OiO}`%1u1vWMx>jLG(<#s;2Okp5FLuOUh2D%~7aZFz%X`e--Cn_r zUmm{V4ZThQ>$XJ5yg4-kn{OQLmswyGY1sbM+mmXgx=N|5nMSDWL`9!3XFj;kNP^m7 zBzkh2?W+Y)>c>sIKBk}-u(hm)-J_Iib0hC+Yy8TP7hdDlR)%??~CkRPQS={Eugk8gqlSA**=~#kaQbX zJk!+(C9?q3Dz9)ojmgplx!dO86cp>TkL&!W9Ybobxi~T>JVAV!h9L2rip{naq%1$D zPhYNva;$b7_giHXO#?JAz^Ei=Kot-DVwyT&Skj<4f%837y?l^OC6zZ&g7SP|GeV+x z&hx|4Dv4YpNp5T|^5j^0J(!6l)FA!&LB0`9Z^)($*P!&^StREkQgbsSATB zbBeoL##078e|kf*wRX+VaiFq0Ess2#BS{Ah?|cGDh_Q>ObmIB%Wa~v0js^HlD+eB> zD9q2Ah9;GE;mE-9(+63wg?7#y8m034!Z476M-D~b#68eJ9F}$L>fPZ0gcExmW(A13 zie%yLPav5EQnbsD1^&x(G&oXm^zoKYnMX4lHn>t_LU>30@7@o?2*(Lkp1R_P)IlFN z?XuBrRo=g!eFg?ar5z1l8^8*4AC%53ooY4rp`+WC>2gRt{!AQ2^q)^PV#}w>bCn*K zG#0=mNLL9Fx#c0<731_zubhFwo9*N;8{UzB-o{WpV)H*ZaPfbe8S0-a_J3L=_PM>5u{$@{)+0ICoBbURX^>%z? zTD2}CrI1KgAvHBMRZ1*N<^D=ObB}BK`ugJflG^lfv%H_7g-YFYX5SS^o?s8$&G7A1 z*E5Fw;!@wf9vW4ox-q=4g&zLL`GK;5KI;@m@BtLTsA?0{U(o0YMFzQ2!t5)zG7!NbhrP*tAxF@>?$Qd{~ATzk`4X}&4Q?v(^)GJU8 z5V=_$D{5T+DNvvg7CfV;D-(m4+P58lP|xjEPTPA#_&%fp$~hragldJ@($|hNZNH{& z_44_#v56Rc zgSufBbFi;hjYmD)X~+HnNzMMVk(}nNywsrX{5#k^?3H!jt0hsIhRtkcy^!j#Rl;z* zu;n1D)X;ut6;i9TlcoDucoe6_w*^HCrHTZ#r>Njdyum~h*^M?+(dBpFc3jk4f@iXF z`egH4sSFd3?rzWZZv9P7tTUVnJlmC&97ZUlP0d@x<$B&KkHy*?#QW{Nd)>whUTygU z`1c7$dhDi--<`W9c70#gB^g7!(pa&A6|vEY80to|ReQ2yt8;B%^cmAR@i!U0xt&U& z(YKwlYF`j<_3q*%Jsf)|To318YaHLTntBlKx+*MIgJVN6`8k3H8I+DcA3YT#UVdM9 zUPSMH^|J^DszRKoW9HkY$iOOUW!*XG>Tb>zwGT?(9Mn&Cf`RbD;%ojqTP+4PQ>)B*?pL9?_b7PSq$U9Dy=he$W=aOCS-ZQyZG2CVtD`i7O)LO8NzhgbN0oW9rniY&`Vr zzf(5Rn8W9lEhoLbbNSh^;UAtYpj(s1_L$R{U!8#5!va#NL&>|Z&n(Mr&t62yEHHAI zcu#nbWas1uXNN0(sQVIeUB2GLjX*SBGxDei$PFEru6P6qnrl8*o- ze!m5jz+HEn4uR$JP^sq-a-h&HMifDPw!VPHwaKrZp>cDl8DV1?LULQ!SfxyMR!s8i z-kSpa{+xg(Zc}sHaiN{=J6D&2cwU?;paEl3h{>PfJkS2W9{f>}dJKg)z#ldC&_=jX z%I-`HB#YAq!vouIwfS+9`X} z{0X=+^qst0eXT|B$mg6YmzfaI1Eq2-JCo8oB5yeu!q&Pq7KeVoCjS0n@*r3`!8 z+m{)yz9UU{4zY0k>cU@CEcxU=x?G=kb=}U%_cJmjVC5x-Dahg-v_Be|)`GTIJ)#N3 z7>|m}QEN7uM8vLk=iVG5&JPj9-;f|G-1p@e;n3uLtnoyAk#T6rVlBbkWZiDLP_uAR zXmQKNVCcrT^CQ0w>f&92XB1(Nq+J8PD=!5HODAinl?Xxi&3BL5y9%lSOlKs5NH6vcMV@@N@QTX9)$E>yJZeL& z0FPh=uEg~Fo(abv4R7=J8*ZkO?8_BUHHZ?sxB}<*t1|b#c#B8;_%#2@6uS{|>bm=- zL?&t3kEU3~6nXv6we~F4ovcdJ3$p!z^C`qjXxpTYVYAO<9AEz?+kWBbv3L1zVod!y z0elrdZNy9cbe3IYyU_P10FTNziaps`g7zrRpRT!ZrlTY7UEztN8d7UU`ulz;3+tU0 zgMFe-d1IQ7-R!Wn`#gaXkI?;E{ybC~a%-6E-3Ib@*S}x?F`|6b>UP&5(z*|fK#Rn@ z+&!n%(KAJBaqpHzwuTSQ`7RkAJD2M<&?RBRTas+b8j5;H+T}>^oI4%6&;kdp49ux8 z#qXcSh3gr!`Sk^YCk0fJGfCbQCg#BxhnrTP#T+$AT#r$;9;bTYmj)WeD55K*i2y=L2vh{wx zwLVTGWyR~;3(pjxm_7VOlHN(*0oTS{epMBunEy@UngHFJ|ZdJIebH$7wC?K_BiR|-OBILmmwv>8(U zF}wCwt*-aU@>rf1I$2C2368h=cQe0DPCvgY*kYeX8uZ7RMorp*{sx3+Yvti!}TieI@RIoz$jwc_T`zt$F7Mrk-(#8Bcdq z+}yqqXPr`5&*S^!y8O=66K$(--ja=pX&ivw`mpJ&fmKFbL|)BS6^kO>JId*$0( zeUWPg87av>yWR%7$$M>*0`Eg>EK00Fh+?&9|Osa?F)i^CcC%V0$t3PT~s zTjHAM1D6n>FGv@;Or5Fc%`+$*UEulPwm$vAVyN2dr!>uEakyr1O2j1p;xwpk2Bte% z`+}&9b4hn{U_%&fM_+x-3C=l%=o_8GWkC-LxmfjK(`V*UY>>HJF*}=Ml5F%!rp`t4?;{r;8_(&Vx#_2_GpGW< zUuI5kObuaPpEx&FF(Y|lx0gBsgR;_Z27{;+lWHD`t!;zb@ddkp^5el9or|I-AHSI(z=Gp3@#N=wZIzw40febTcd@m{Y>x+_24f$i8G~X& z@b~|EXMl?Jp!qWzF9xDg+(VH+pRyaj-ls#dp=2b-->umyHlOLToQt>L;aAgZtHS+FzjT!`~s-Jw?soOk$Sg7r-ntFb%*-o^eKGZ|ue8Hy?9QRcneNeTjX zL2l;{XYe4GF0eO8I$B9{+pGBcN*~KD%+?YhD>~F;` z_XJ0oekspEm>s!pcO`pArcqRm%xw^iIeh+d<($)?cY-=pWvkxpaci$SPa0em z?;Wf_8&bFL%ngfS^PA|_&jUEz0tKg+V+FDmm*zF2^C(1$57DrSG)!G^MqQAZDj(Ku z^>wxj@vOY9w3F?O!N?w0*dQF;s>gn8xobv?xz#X74)dHHQC>W1RY~rWIfDnD_8ify z`O4F|L&?ad`T8O$>wZ7+p`mnb1gT%cxz7vlKb5@8T}yV*`vbyk6QAi~QMUDTD#dFv zZ|ui13pX(+N3p-g*DIXoZRcPa1Alr`!97;Rk^C5TGrvaDB&7i+7S8efW9wZv=Wd+2 zCUh#ZP|L`oKd)?fvZu51J;{!u#>0_dw{r+;s!`!LYvg9U_t)?C-=D$?*jw#`2Fpo= zF_+Iocb_MDBBn|sGs+q5zIf+*FP{ak%g)?TC1QEa(&(#mjvMa2O}?S#eXH$CQ$06* zE+R*%F9j3n=a`SOc%ysh_Jpa?)M2z+iPs_zqHN*DQ~!}Nvp|o{T>lhlpN~1lx)0Y5 zFZu+Em(Ch^w4gNW>;2Y$?L#vR0Oe7pc0r!xFU%s$V+wZH{JVY&gK}w&2e3a*ZXufzQA)pHh*}D&Lh;>exL4rj+6lkif%D=+wN5YL9 z-r9^khnqe6bj=}Sk}%=6WrewAW?8lSk8$+~(FXYqlw5-^IDyKOtZ zN`^kyysruk<$l5L;#hLmt#+Sf4Ic@mHRI-C-$kVueNEQyS#IsEPR-T5DCxFW;*^wu z($UPTo7bFcIT%hhMjjb|uQ#W0S@^~EI7OkpcZZ{v=es7Zm{#TMq zxQ*S5B(Iv3vp)_pa4`q#Kmp{otiv&L_h>nqg{PQQtyO7mnAcx2^f74k_9n}`$wXyl z>RL4HMIvtB`&tvu9T;P{uOW*c90Zf{ts$8b!yo(mD4fyplkO(rg@`-Ij z2>0QVWFjWttGz2=rt`h!UN5d&@BDo93v#|h@?Ltj9$~Y9U^tj#j0%>q_q=qmIwD*^ zqjG!WanI?JwYn#K>Mm&}n?$i_A*;;#Da#nM1yfzr?YNJYLvG(6rEXVl7|S`Rbwm{z zigaSy18jZr%7k0tMWr(AF;e&RT3f!!q4oC-;HNuQYxpSn{X3_c`O+tj?Bb?h21w=$ zK3QF;npguIcTPx!IjYI2!n}l2^hsBxXw5GkzZBseIL|B0f4KXpp3zO#pFx2ju)>yO zJjrXg5aw!??iyjw{)mcJM0cJ2h#x3T_dIM;1-b4nKFc=dn#IePR(BKP#YP=~<*q9|$?wRci`1W~hQ>>xx@Ga`0MMD8=6@ArHCe%HMokL$1dzWn1KJR*6&&-ZyA z$MZN|zO74@S}8D4;&9ea_WAs!bng>yxCMs|z6iwl`6IlAKvl|uDjF&y$yTi`SU^A$ zb-HVq`@V)oOvpCP%F>uWAa-tu+bPS{N|dneK?~+Yg!4yWX((v4(|4v0}uAqmkJf0 z(pIwZR|2TVTWvelyj@4@ODbDw{yWP)%@V&Ur_mCtG%4?AL#cPZh&j#KNRdh^rY`35 zw>2G>{|y)J@;+EO+sQ7JLb~#%P0t}~keQS9L5HZiYuaSh+9~1Sk{#VUv&{EUGqXUMMt=ExzlV*s#7jHjYy(-03&z}+XWC~r+R%9_; z>k#zYso0tJHE4>wSq0xp`ZdxmRiGRB0<<*Lw&E52k2i@HbcVIhtP-oAx%gT7rf9SbJA+Trc9PCrdl8Puu;@;=wjoFJZ~3d&|U|7k9o0b)i(wRJ#*UD+m8tDOy_ zvTw%cp?^jTadY!2qfTagf$gROQ%)wF7D;(^LGKKfkL~gttRr$7e}=iyh&;$;4n5D| z2y9><2PI|^M{E@z+H#3MLL{6!S!gsM5rpoloPDMj76Wxrt@N-G1lKX4K4ii>*tTa7?u+4)>E+K>f71i=AwmlLUXW% zh1$JQV_~;=1=qFDj~t!&q-i)(%q6ed2X=$6d;AF#Q5+caXvfG;F|qbTn*4F!cBeeV zeK#&54#Ne^%sB3SM@A$Ty$``;n9BO8yX8iop8w?!Jch~2`-gVsTVtB@wc%} zfvN1V&lP(LmwZ8u23hQa_NgNv?`%`TeLy1)kZ?53&Gct)+`sUN11K(e@zBfhcXT`Y zAYjI@s>D)qNYyuSFUQy$&JT(}p)YgJl$$b(1OeY_(@{(8_a}QvTy{_e=JW5xx{*V- z6ivfzJGq?!dnd4p>oNZg6##diE6>XW-vVrCim)NNn&0V)kjdI&&!`tyTewyzJCjJP z+E$xpMP6ONX?nJ6_b-g?<#R|))xyyhN618T^`VAl7e7K8AWKON_KRfo=;%GXNA~d# zlVyPj+zMPc}0ZSx;T9HO4k0Jz2%+|(NcdBB*Yc*;eRX=s*IOnP(5k+q`?4y~8+sRsms9rwzk05Il;v7?>kQbNSgI}LR`>{q zYlmGPrfCbAzY&7r@I}blYCGw9QHDS^mk~5JRaU(GeSve4f^N z%9N4vzwG5UVG|&ZX$tzc4tZ7Xe3y7VK7b7(L4s8}at)SJ zOrM|C6T3b{;Z;rWRD2aOOb-Fp_j<5)p8x9CF6W0*`bB`P{BZSj+ZP}#4O^pOX|Ri8 z-zA6WE`Q26ts{G@HT0^%UG<)O4H+OwQ2a}FGAnYTXlju1*s7S$J>v46Rl2CEbZAl4q1reT%LTk)x{Tk{ zZHX=wuy#f+^e_$Gh?Nfx>WLReA z5vJVMaF7Ous%yMWQGucG?m!X(f-~?3S`-;clQX(`kzrK(hkA0kkoadViT--*L^}wB z%~?m!y&Vc-;`>~ajFQ96rAslcR&{du_ktkqybG_KMen!$5`T+aM`jk?(KENe1ae`0PYp$jag`zpMZ zmo&V)csEPCqIvY2o#gfIttgB`E+*JZYM&KCpjxazfA zM5>}$Cp>)dIPJN5$;qd*HzXVV-_jX}TwtB67TY)?F-55jvpHbZA;<*KvGh!=ZU+6& z_4UaBh|06ueXH7VXAa%bUtkVBflk<~6jxtpfj7Z41tNSPTx_o-CX>F5C0#K|DoR)H zP8H|~*@Maqb$=CfqV8Qe;zERBI(4zZQ=?|;Q`L}SQ(;**3Q(RjuXcF;-8envH=x)$ z;Y7|Zr8JVK>PGCUU1s`sk969N;_{x8#ojEh)WB|db4#WVhg3PDHI}tYyIu5SZ`~5~ z!#<5*F|KkdHhDmR;@p+(B=qX}YnYk%{Wtll#BPiX7FAi`g2cMUcvQlOI$Qwk^` zAw^gV4SjIV{#!afOYGnmVM{sx)xt0##iAR1mwS;LoGg~#Is=_m1@(_z3uN0<{3$Kj zMe9xLS>?^IS1{nF&#ISWuPw03kd{Z;_2DU!;SygvCLCjmZaP{OAOSPO#FoVoZ2H2T@_m!L5-bI2eW{|6rXPy{Atf$g<~LWmItJBh*0D{ zRV}2u+CKEh-eO%NO&W3BM4uDqR!_uc-$_X-eMe6(U!?E};3V}{kE_z6;Iq1j9r61+ND7>qJTM@hfhus&Q`IK>HU$|y-rfPL zRx{cfXehYQ^oy%^*QYx*r15&ef)P@DKxw+e>4_if>rN0@IywTA67Tjn7@K9T4Q8Pl z5dJ>wd(EyaT$gW+uoSrJT(f@XOsY zpp4R=t=QNW3K**i4bQ<`yO&dUnT>V_JFKvLU&peiB=D3Q*p;>Z^UMj9R|(`8oR(M~LtErp)v))*PtZLddpv3!vvXM%dIl&W^5#auf{T&C5f^CBDr{1@uD@ST= ziZ4$F9_)B;|17>gpvVxpmw3GMLfJhVQ27(K+mIhxT#zCj7_!jqWv_RUMwtaTrgOF< zzE>Z}{yO&i8J&rIAka;Pnw_pz&)Ck+#0KOy57mGGUn(J3y z@vJg|>0i>$XBHxay7AD46A!&Vg#xcNyF(GU&%f`{zHJ29W2fzL!`6#^-^7OLR}2u| zX*MDZH{bNG_(q3fw7C!tybylUc1TF zJos4V{5q1Q}e2C z^#f`o8(3H>at|gUj-bcoThfp8{>OL|G05ad;d)gobDvzuxqdZA`fr~7KwGqRn#@sY zkuxkb>*56S$$^4(I=J+g_-i8<2~j6D{S!r%0m4*Z0+av3d_kJp=z97>j>W}Ne|L;{ z4etTRshL(?Ccbf$JY@~;w_IZi9^_yMYavq956sE)S>j7kvbkf-Mtbv$@73#^oY0F54{n(YM}KCGTRuQ5qQ`!| zKTWRs5<>k~tN!fQ(V~wF&0Pj!JS5lp8$FZUXUguO3ScLn; z%7jKugm6EESM{qWj^F0N!R(;LVrgZXTL-K2M9daAxl9CFgxn+KCYtnrlO*RVhlsoa z38No3pGKGfI{|#QUq(Qp0z81G_u5%3jrO+7O+jSu(C~tG<}k1a??C?Iboyq2zOHudph(Q`Lipt?BEnvmTc%G_D7~7WGhF-zygPbrkckR8B^t5(i_3iQ@ZBPg7D7K$8#*8 zBw}K1eSNwVK#ATfxrue#aL=RaQcOt^u@NlMyf^Uh#AnLr{ zSjge=0}p(BBg7t_$()+saqBE5C=tg&#Uln%Q&nbaGBp?U;2%56wdHKJ6&XrZT_D8M zh*CfhB#cVuRiNZLr9&4Ot8-O9f&Wo<)~KpPVV}->#Wpc_zb0gdo0E|tEL7zZgG~=e zP?g$*?!jU-XInnvL)cv^0p3wh*aA&gm26^8lgW1J4&ZUrNF;GugAThgW?}7?U}DTB ziGaiaYQoW_scg#pmU2q>@g^zX0T|*4>T{P>AKLxOtIy0IA_kbGRBnqsy0(;76#<$@ zd2_bcqx`{z3UiF_b_0HFG>Mv0&W(v=C%!ZT6`}J@f9K8xcg0k={(M&p4pAK-p7hhw z{f~X>Wc3~wjm{82H)=u7qC*Ta!~+AJq;6b6e={lFH^SeBe>5TbdW+5ry_uhxZTkeC zj}p!U-`~0kIy-Pu?dwkR-}z`ah%-VA2CkU)!0kSXBNI0_Of|%#tlA|*Ze4b^rG{HA z;cghX+cW$@VchRWW^p*UPevw+&U~y+H~)hz6)^CTnRMPr9&~=dn41dbMZ#*?MvL3= z(-obTY-yEiHn$t$pnBL15EW7-e@h{9GEh&m!dTupDtHp?U^eA~Bwz8N1QOes>+@a! z#hiK0q`H=O6|d}nVaBLwDscVp<~$<@2JlLAVD*i6lrqN*?zJFUAZnPqI<;C;fC5`f zpmm^3Ryo$sBnP>4O@Oz=RC7rz#pXhF+T_vd!JRMi86^2B(9!d!>2#V4IppTT&#xWN z@DiVFLVcgfe11i0YyI^pG`STt6HU9=PuF`L#r}HNur+u)_*@W4S%3?M=PVULajPut z`HpK|uTa%AIYuKAr+&ZfppztD4R1Q=2F2Yk^V6Y4$jda=iO}1iD}C_j?>vM5R@W^v zH7%M?Vr=j3mr|hyQ*cj=mKgW!{vH0r4l0L#$RwIsFQxgUBNL3l@K$`d0PF_{_t$#0 zd~{KE94!Lgpm(xA=fE?d0ea<6n(7Hlhk2*Q z+@1~qcPt`3j6#~B9Oe$H^vIoRXb8nkp zGhm;!B^8m_mXkJG5mec?5^-YZnh3|5^BDPkD` zU7X}x;214|dGaMNyW)OJ9sw*A+(AT3#8!9lA+K@<)PH)oB7Zu-!vn484NAt31b!8K z3Tqq<^2>0#Ef16|+V+Xh+IY-sB^AYb z2j{|D8NMy_aeCQMF$t8`Jqm0Ql>#j3mTwl&<^7_X8E^RMj%co>#jHudKX?&>YE0p# zH8AJo#dMul_4>sLDvMu-f*i)HaBLFp1Qlmk^$U3gG=kDZ8v3Sk`i%nU!4MQQsh#Cm zLS+zypC>Oq9yyH2+`h27zXOnY{c?foI~{jI_%$qo&23nSqIxMI{Ceto4I@sE%|@>U zLd`etdHR9MifNfInHV2jiHU8gX_dR17G~_*2cZ6Fi1(j(RI4dRZtIsLt%=ez<+peh zLh)7W!OQ{0-z^;OxBqH}1IsexH(;Uc+A?pn*2J;Vv-o9Mc75O1)!%g8w@pMKPp~bD zSsopFZ!{kx?Zjyw=60Q%e#H}>@AxvMRa#EpH@AIuEj#3u#ZiYlqQXf+dcHSjNxc>C zcmZ=qmye`&b2w0`HFL316pm~&vv@J}_v{!b*fLSybIv% zf7PPt^E@{%-smIXWE6}7e-m99zG88ovOWMex$$u0y2L@I%PB=k~@8wCj1yQ z_)F*o`wPJkOAP&1^Q@oS**$I}IG8m6hMY0dJ_wE+dD=}XzAN(3V9@LEcY*d<+X55i zecyPOki{Oa^HLo^Yr;@zwLMcDb$5hEc1tZhOYB=UQ?uXy(EmJ|bJ|?;9d-uPo`1S; z)0Z+jR%9FT0X66$crHh8@z^y&)^o6Uze>Er|4Zza7Vsex>2rmyz6M4^D=o0Kn_Tn=n3PRzpA^SJ% z%9Gc0aiIUTc$}qF!eQtMyXZzxVi$*~?~h%sd(FIGfKI(^QgPx@rQQ$E9zlx`xT{sF zl&yQ4y47uF@1j}Mcv-X&kaW#Tbgp%$N!Q43{klpZ+)xo&M1Wn+?wl`RY9LE6VySZ@ z^hn?pm>5}cmZ`%O%qcKe@AHO=*F=J@r*TjKId$lN@EIH=5lIIv=TIbqCoWzvuMim$9F$OpZ_k zMMgd!!%~Xzv!TiuDl@S7PXDKG!843X6x|N9+V(<^%LJJ-8AJf85-l2=`z48HM4#LG z%>~Wt>@HlfOb)5DmHjr+QB?~)3C7aGebAq@EPvroZk3V>{NzDbowdZYXB+_FVR|3Q?;*gz*0=7>cIM0&%qvAsSHD;7 z&;smfl)y6Fu*M>GX146&&NTzL44zv=eD22PhU-O!Y#^16kN9Tq3)a+L8k6$0C-4`% zSH)=YbL;tKcGK$z6_m@y^A@RV&)}Nh5)rCc45rEhK3bqX+|$|gg24~f%ANw6VLQf3 z&7CTiddo(gu;3M%PJYQ$#Dh(xJGu!ASDwB3bn0N!Bgf|lzzChvqeB8xW+ zPTUIAK>Cv~z~}kXt*YP8YN7&L;!gy)m0^iZzJ?G3TuFbDQiqlN!fhS#wjkPK1Gm z#xp{3(v#&dBuT!{gQqaUGek%DZZlHhDxv?@+t2LDxtBq3buap9q76n&3{TN zP}QA{ZT*VbT-AKfQ|q5BzBzWnERT}*<78flaymMZ_IIC74rZ-6SSJ>qOKCmlDn7L!l=2uPwbbQvjkPZ^>tT&58TLv!V3Rl!3 zxwVgBk(cPac!$JKsInK=MDlkQ=_AINvoumpO)}n&d=B=fF`c;74 z4VgZmr$(}ayE3uTlXklgb!-Pf1aL~0C)XqOTA-zXK@)!3KZFNC=t@(}-4tuvz`<{= zi|rnf5Nr5&0Wxw(i731Kl}#?7);wsR*#M!zL5Ww?bF}~jzA5O&F8+LedCK0Bs!6h) z&(|M#AheUoY3z`RZQ=i|)S)cH!x_TO$*CaonLgY<`ZEWv`{bxVE!a{5JS)H_@|2!Z z!Ina4_LgEizVPmS`)gU@a}@u5W)OC7^ncEbHL3Q-BUGSylr^#t!iSJPAYJk3?K=Z> z#78zag>3z0GPK}v{niR-Kk(E&sh%z(W<_F!~z>N&=rquCDTlXP|$9x>u;iHj--bds{~?6Xo$3)c1E} zCPKO>81!Cjj);;KbF*$~((rZ6!kKLhsR{FbRr@q&>2AwOL-YG@0(cBPjUORmF*9mY zLY`sYfL+{9Prox1A*`eyqm!vXD{N!dM-fO5Ii-6_xpnZP&Rn%?Ov{mF;qZV1XvEqU zsS7(tJK|pc=GYxPnA)~%Dxvs#beh%C!>Wv!gW00>J{!}w*eEf9c zV8#iw(N=>}gnFYii$aKQWS;114F4~x`<$z(S!0?aQ3J?>Uj291=qF*snAy9qa zp510pR?EKcpvQ;benVQXIga(iPwr~qmhhCpT9zEo3;LgmRXaB4JLLc+SnT=k5RP)%DzFj#a6?J+bHDU;2Yf3v*>U*IG6N(-a({E6U7YOiU}nkcLzgP zD>_N(SN&>i40c-NjUWy?N$#^8W-yR(Y*lVwunkacu3wtCuhS&f$ z_fH=ES?V5%h9=4-Iq#j!_bY+jy}f~WFX3#9wh(%DN0c1tGsSW1>x3a6F6O=sxF)2$ z91(Qh^olGR+p3_^tcN1t#peF}tXALI%ab?vQ{K@|H8eZ=m7XtU^k*^uilL{yyxzv7 zp{}QWl4ek6O)EM&V1H`@fNtFVb$REBAZ>)Qog4jq``cVPT_Lz1mqlvcUXv8^q@|51 z(D${U(s`QzMSmdv7?is8%{PmDgmDpy<8T#3+|uye4i$T?HM0tJGfwuTdB#8=0S-O3 z7|7A1wLw=X!__X6?HxW?IM;ypv8##M90MjOCJuZKiVful0gdkb?m zmopw9hpyZZ^)x9#?b#guN0&V)`%5!Vm<=-Zl31{cw{sz<-f2hcJc*D%lRn6{CmZG^0R;9woC~i5!cG znUvJ~xndJ7?_6p+<7nDAgK8!bYCs)@u_2*GyHUx@@I^X#YVByUYq-%sw*Q@K(uBt% zbU!}%&INh%>erGICZk#H5oW?g-{-V3I#!g~GtiEYaw7;qK~dVTbTPaB1BBz9EMQl2 zPqIyM&gxa3#%-WrHVR1S*~EcFmr0^@{gd8Xp}G@ki}grwnp*2%PpR8)7h8D3U^c_$}4B!2wo5l@W< zEJDaV%~uW^Y|kdq{&8bV-Ta(gx>ugl)ypPPU%pj-?Nf?i)W+B$=|UwNe(&EC6yor2+oA0`|rF2=6T4e9_d9Pa|ipNh^jVsyj<({moO*@7pin zlw->hN%9f-PS$O20Xpd#Sh02zIk&po8PLn%jO| zl-DP~rMz%_f4Gm%ajjz^T!ED+@UN{0u{>qELmCMv3pReQPn?W&L zs^k1svA+%@1)220zmG|vn?gtgY&L@3StgcAQ`JAl3AlKS@hl;73jPLml7i&Odr@uT zQ8|?feR-kX$_LZ_E^XV_dL_9YvQeLW*KK}P0vMq;W^t4bwGoPGf~2y08+m*{C6iL< zw;2(tJcb)0Tiw6%5=EjWPut#m|Jia`Q4l@)&KwuG*}k;*{6qI4m~`D*_4(AB*4)`{ zy`-G|{V||mAw{tc`Dw4fIW-E$o0WcbR_}NIm0jTV;uh(oQ$*)FKu3A$v??8m)f)aG#D)2t3| z3UP=61orZY2rOm3BeKRHy60&NmGt0=baTkPbJmjscgf<_RT*KA3p;b_mC6r~eWo(c#;iW{+bebN?R9l2T&R5Jtd(!e74j~roQ{~7iW3$VFkO+t&P5#nfe>yTL2a*(En}{ zRh-2K`aL1SUqwRM%AJ8wdx!6UBSk#-o?$ib11HuE3-g~n==K87(t))2na~o zSeW%LA{l4=vwSys_;{1{AkG>KI|j`;#A}WP`t+TCi^+Dzcq!!? zccu8xXmg)NL8E&!pi%bg>-PDw?{z9-5}V-7D#=c)e&O6d&$PL5@tM^oU6A|Y+N>Fibxl&1 zaz4+4cLp=9dRol`+&Cp@ALs0f#07_d59FTR+?^l__^5Az(Dw7()lr@L` zZLM$*cz@8S7@tnVLo?-y*W$d6BRLO?Ne1@4r)X%(mj31SIHCK~#y}ygKe-D1n(E3_ zB{mQJcws}991vAbSu9}Wg)V_?TcR-q8$`kTP<2$bfl{-w7T)@!1ClTm3&aC$-i?`1 z#*Ip&rGljsd0V+6s$$=&LM_SMc*B$ z40*d5>BLI;o&=%o zpwq2u^JEeviRgcZ|5RKYm`C|7#K-{t>!y`Ma38U-WtFLs@U#=o>GJkZl%&}YNbaSb zz)&s%tKGMikijuo?=m8Xy^*fDq7((-uI10K%KzjH^en+iiog7&RXp?kaa*|PG$uYn z1#jfGbBTe;CC>M1G}U3?J?I1B>cNiBe&b^>b0^Dy{f|AkRVgU6<2=hb=@~cW7O$L! zWq<7MT41Kd+SDItlt4!D4BjpyXt4#jc0T_mCYS{ojnJ6IkHd6i`=>sg z3vW!}(?JTiXHLMIR;x2>^L)u$6mkZ;)pPD!%QZza15=V7X0$$9A^TY@i9p$QVe$2I zfC%dtKYCQAUbX_9Lf1{Rh4=${oR6&E)=RXhX=8B}WfphaBI?@xskBxQJgZTSpJyM) z|0*12E>9<9B98_opt}fn#W^7jNR3bMX%hh0t539;J7-J^KN_dSzR+!O{7q zzWSX@CE>aU3qymvt+}IdwK! zf#yu24sD&iTl>OcBz)8<(ME~p&Ql}LbFp-rm)ZTNJff>0m@y5|UZ7V~ zvDC_7KAT6!1;o)So0%=->(2a<1(mrWDS9#n43D47-gh1N{$bW=XeZ%Wp`LnvzU!=P!c>hG&z{AsDJg2Af>xU7(u2M z?+IMxl(f!azHKx>`S2&#lk0q<*~c&aI6&S`Hy$b>2TiU|zAJr!>EiI%v~I_%5+tta zoq&Q^lMVNwp`W(tMft_S-fgj%%CBDE-R$dY%(Zs0^(2 zuZd)rzcH%%`OmdN{L7PIOmelAVkk(lb=KDj9cw!^XQcz!FY2!}h_qj$vPq9j9M+X~ zgU&DhkTp|wlxF>jmGz&hluwywe6)6*lkX`Yu)w&4-Uv?W57U^TP;!m_6Cj-AY+gUL zB24>cT=CyO5&1t?l)U)lMg4_;ef{sySTg(JVKn7XzRGQ0iSj?n^1;hjiN9++6zuIQ zqW<6EEgEGe#ghNukzW6c9Mpe49`FJGU(vMmcNswkU6a*yebf#F;rk@u43}C=OHnyL zKpte`^>17Di$kVBF9=P}tHG9!Z5sdly`kUl8RUK#2$~wrDxi%J7?&ErQMCv2dc|}r zMJG1+<&a0*mVG_Vlw-T&bTRAT1dGp0b*}7Bld5yKe<_6U##aK*e)9Lv_iF&I09Xx; zNVvN0W7rerpU3x^WQ+7*FIz+9Ur;R`^VoJ_JEkeT5s=VRP+kQT=J=Kdn_;YPLaoeexVi z-engz>V+Ac&trG_!7PAv&$#3aT)wjzh06IF9B~1!DlsEX>M0NJTgj%KU>;LXl^SjI zuFab0bp7cUmUmHq#h3ZEeu)+q?~y!|JGFmE^?>;w6K?X6WSCcXfj99%jzxZxE3&LqrXrlk?rm zB~#_YXytlwkR9V2+=VNH21B!_wj~2)SPVQPklZIRR^uWMo{RMqx+t+}Cd%%d!(FYr z^wv%ngLPHkzdQxDnu%nxPX{GP;$NIt%4#4JjYz8c==;ONZ4^=DC2^wQG*=~vJ=q$X zxqa-pUV~^X#m^vTEYHzcw}MTlQ-vLJ6`YyMmO{CLE2-$_BsK`4#uXw*$8u*59zOye zjsPi2GXRrQr5C>HzQ%%zbo1%@`tCQ6-=D^$nIk4cxz@euW5ivsYe<2@4LsrRR|9J($MKFemLSW2Xa^3P7Po-}>56yN2wpC^323f9FS||DF-SLY67lDSLX6 zI&FbkcOqs#FaW9`!6Hdt0frJx0@HK+8Nr3QKUcq!bk%vk+_u^oZ$g3pDZHf%CRRfh z!sER?winm^od(Nui$BzF_X~x|DWWjd4mKbx?T)*^CD#Jx+*n7;NsTE*2i>;*XzCt| zk=MUVzZvB*K9Feu<`?)hRmr(7?UNG=Y{w}}co7`L{W_#_{M$--b~WvLD@Ub6t>>@;sN?6TOA>RjFX&|*5)P%^DlW+S+-*Cm1_4xGJgrW^l`7kN23fms&+B>amXCI~hC zwf5hSH^di)F*VN2CLig%yaKixRn!nXXkwlll4tF!!3H}0`tnm~dIKPJe?bdOh%f6W z^-M5`)y)ex61DxV4#|Uc@>uF%7B&!F2jcG`?;sVepKtgah4FrbK`;3xi~qCa#0wjW zJI{yE17`D~Ot^8pfc|GH%V^feHabtOKmrERJEJRXGf~RtSngi;KK^X%|Bi6Fm2*0E zCO~&eVkTf7&dfqhnz1+m-)$btBorVGnyO=KL2j{b2@F=e&?Z)Q1SPT_lnmIWfozKr zA25)-Iid$em;Nzx= zWzN%5HR_dzvxC{gJM3U-*r@}9Q9rTE2bpErP**E6u$t)fah*iwZV;YghQuQ-3tc8s zH(Ry`W`RKf^PF~DAtrpICUti!X9ll1{lJgx8KO1c9_~+3W-9In>Bz)pkc-M-Vc zEI-YxeCAlRW>6!m@4@_ZUX8`ZjWSMS*S#lGP~D4W5?0gerkl=qO0&2Bek(c|3W z@-U8nfX>{a$;?=S;pOt)v{bQyG0vcLYARu}dXeWFXp$+XwWhha9;Yc^1~5#FySZl! zlE;hRj76;c@;~eoGhe31Fem^M-UCpgDd;zymIB~mTnZKW)z}eW6%8)p=M+M&xf6XJ zwSow2#taxN* zlSg;VgJX!MLoWPZqxJ!E;oZu}UmE;y%Et>ZP|8N{Ednj}>6pzHviMnBS7cCN>?|0T z{wFZh?=ZJBqD$=FN0i8-)wVB()r#&N` zE*!nU1}|74e2|#-jz^+6`^gVrd&Tpoeb=l}$8= z_KVruG)gSwF*J}}@4CgE5U1>K(K1?Uhyoee*MJW!2dwNQXi2NLWrT9>upe6}-h zrlNaCF%g%d9Sl)&mMc_>WJe_Q1vaMIYx#cPU0)e&rNZvTU_Q4g zJU8)b8tCrdgHcU`4X>!i{-lXqOnd5y;V) zbHXwNB1Mi^$bcv!9`KDtbnY z7TTAzuIW8a1Kg9vr~l49tw{Ba?rpSYQx!aqZA6Hn!jnl2cfId$qZDDwpq_Q&FTKZe z`%9KDmcIGJNYY>VU+5WaN6Modcw(wqHE=R}%SIB&*9Z(|0yH80Mlz;Vu4h9fG}5Hn zo$FWl(AgrgRGx{hMlC^RL|W&aYK9h@%G1W2kzx^@W8lP2R)Y;KAqYs1&O`mL+v_32 z_X}wRgO83M#rhsV#GFUQA<_je&+qn26KXv`xUrE3*=loRS+c|f9{8j~>0e73=bTkX zUI%-hOI^G9X%4AMpU6jgbzVFrmPi0(e0E8KJuE11N^gWBx(DSOQ4!u8`UlvF+=w*j zs)G<0EObx1M-+)%8!u~>@>&1Ge*k=Yr`FKuA3*Ix{1vKSA2n9q-*6l)#%x^TE&)T( z)@zZ(xt-iZ3rFH~Ff!H0(l&>R%aL?SO~i;t+)w>{BH6NVk0U=RIC!E!0fNa}P=cdZ z_|@h&3R@*QfSExa9S&1dTf5twx6(Yz!JxN+z))pf(V5WOudslkB2GKX`J|!#15wef z?mWC=%U`dVpIag|x$RynM_GHoF8;bezeH~WVv3xg7F^}2r@say0lN5wIkf%9Y``zLFD< zptn!tq;mm)=^T0kdn5C5w&*|n51bfXGxs+qj-Rl(GMRU;KKX`8!1OZ{{9Q96nN!epbH3? zU|k&kJKO{gI@Z+QYhJZ0i0)r+noi@@K%%3>H;nOUXt|J>6m%{#x^mB1+r=s^_+`Mq zc4&TJfA+nW2(ptfYa>~OR56J4xhuUs=;c|R?9ZS>xi)|Zx|Al&eWvl<2cWorrTdH+ z|5H(1z+8J5*sd7kC%x9d-kfQxnJGPGnXLf{+9uc8v=uK#G7eT43KQ$MhN(R1Is%Z< z@{UPc>jMh48_>Gr1zYBC9>TuDtVLm%Ub-&vP1QGA2ch%n{^cMIAroy#ZBd zrBB?fK^O*hLw&iDy=(B(`P~LGefKTTem>1)YtT{yc4zrd*V2M`o{$0y0&KT(!i2o# zMD_+h5DX|d!f^S^%^F|dsHe%Q?zW@zw`AgT?A$7scx87;wewLz&fSk7q{jq6Bcpho zSDQiB!UT>DoRYh6P4t&o({Sa@pQ3!=zIpq#ySydWE`x@K)ikf@Is@dAC5R;vI!1pU z?J?GaiNMuPu(}RQ+^->eFK~tv%H*)P{@s>pQWVQjz*z%74IWQ^6(cu=_4>cnHISoF z1IL?V@{C5nOyg7u!tTq^d*`f;bFSvTyU)8Pmh;Lt;x_<#dxcc^6t#PM-U!59sofDN zO+~|+q%znK?zv_rIy8ZE-CFa{6EIgbQJDs%xif-ahnJT6{8fq?EoiQPuhU`%Sd&!< zozlpeXRS`4_DfdVDvhr8ija{#=oYL53gdy=ya2N(11{-4gDGg+Hsk%mpQv{x$AUG2 zMQ{uKIdRInr4XG4y>{2QVH}7wIBPFxZuN8KE4#J%`Nh|D;lR<<_%Eo5hvR>OnhLLc z$a{$yD;?YI7xD)50MBFsov;2rua6gQHAGx5`U~eYp&Agd^(195e2Lq@BG;CpcP#f` zoDfRf zdK4&1(;IfS=Q*pt7b=B<|B>HVNCdUDD(t=-X9t70ioWRESpA7pQ;AP7$9_BxEH=%r7I<>v&CbAvA4peK18#}OaRUCXEs|Zrw=B;&>tStwg!FK}CV2DL z-5Y7&4T_1{rG~&pE?))~|2A49NIG*QTSt*nX!vWSaF}t|Nbgv_^*T_sQVUx6ztZKj z_~+zQ_PyCtR+KAxSMofydT-|e$_NZWgmmnzz!>kC46e@?=BF)&tmwP6kWODvt@_R{ z$xk!pEz0Bg(+LDEAH3q3NZ?0;WoDIsR^W#AP}=}$R`S0zA|r|QQBo2H7ERBTY5zVnBIDoV#tN(zbbmuAE46% zy3Y@tkC`Ojrbx8jw)>wiWb`Rgw=z(PX}G^*)o z2atEsm?^YH%`xIMa48^Fpo%msNmC;-?|x6ZEFx9ohU8$$HaL^k1$dLZYi{uyjwoic z77U`Oh!Vf`sLgI+KA({wA($S?A(iqD)`w|G%A2tUF{=u&VXNm{SXto>uKkLF8yDyG zpn-|iC8(>3^D!uOXI?6Nj=15sWws{8`Egk9s?@ESfIv^^iV|3R=PcuU*{r22*A(Bm zN9{bEwB;}2LEB&Nia+r&Q6KEthq&!v--M!0d48)$A#6|yeU@yRr2GzZB$-XV%HjVg z@65xg-rs(&+G?jX$u2`wLJ>BZGFCDtgk-KH^D-_Ot=bY<0{aZ;a-}U+2_v`(73*vOorW9n`PWN+CUHcrF zVPPV4EBwUs>wc*>8^as2eUtqtGy+Z|N9h@VDR>;H|2q|x{3~6ZtiOmTWR^sEy`s)> zS%U42A=i5i4$So(G)5#y;0z-DTZO6-6Nx=%C4Ke=FYHZDQI0IT0iK_~p{QdSe?n0- zM^_Cy0E%*%U5MhSIiv3JR@^1TscQK)F6m~yfkj!L+5k-3m?d041YbLeTrZvQZP8b% zO$`L`w?abF)RR7AUfRJ>cek@!78{!O&c1-DPN&`oY`(;szGeVe_$L1eMOl`ODQIpa zG{u^0q*aukV)a-^xKJ;-zx$Zg=to7wq)2uJX(_=gz1Ct~za(*QZP9#uh+dTnt`ghZ zqFwfAS^#IPzI@su{ZnC8n{qJC{7i37)JxM2uQX>qtvzwo+^dXQCf%vQOxCM2F4?yU z74xSl+t&Ev)yjDm7Vnc-!Igqkc_0aGVi+5q-6>CEtWCZU;}l^^ zav@a(HqkxxpP<#Qr{DS9@WSn5ocp{Rw{CWNGoDy+I5t!-*c-Wvkzr=oOz}pQmReiF z{$>O-W~>r?R}i-@z$cZ?-we_r1NKy|Rt;<~d&-iZ0&Q|gvRQTLwa6}kyGd_~A~TZV zT+1^#UURIam_t74@*yhQ?ZAFibG-LjG-dXsr{QCc99U95Y7Q65LafwpIWK?d^OX{O zXOK69%x(kgY!f5}_Ixu-S4;5WzSX(yVL9xHGh!qO^6j%jtV40aTpowg_DUD0x4D}e z;!aPSZ6eOt)_48A@2|@sj?A|jDw6Jk-=qAV{qo0(+6#?62@m5Q#xqOUerO532Wrf~ ziB!6rTtgA>-9`VJ3zt?q!y-!9Y^pX=nS4q#(prVh7LI9`AN!N5LVG^D!)V_C49$AK zemSpwb0XofMW^nE(=AelATd8EbJ|~8@LkS4Cvs^Z-puS)8yR}z&stJU?5$wQoXLsl z^|{=#XFW9PHlLQ*VqR2Y+pV@;YQdIQG#*azk}*~LwHnhq^btKKOKn~Vh2B6u#($~q zkVDy!mFVuVqk#0LdQ$eno88D_`ZE_=qkqv>G8zZEKd?t&>Q$v~d&B|)8qFJ@?cr#j zXdv$(V&pcib-bCr=U2sL|K}J_p?HFXh-R5T@%jNz)^7vybiQ$wg4s-aLtQE>WQ z9RU+%Nhz)g<)2I4^A|Mux>B)G5qmyda zugdAlZh4w<9n|V3p}nIhtul^B*V$s1?N~8p&6>AYyp%K5LQ3G3P}4=ZA&6t7qDpv( z@sUXXrL)~8q5jx(xgVV}H!Tq}f*8_m0N+}R;z(ItGKl3HMU&hQX4G3}&;X( zw0knXKE4kR)wS9Kq%H3~A4b$)Xk=@A)tG$+^TGytRF?LmvKzRQ_KP-);h%U}_6s`3 zq4BYhS38@48MfJ`(Je=pIq&VLTCU=H&nQ126|A)fL z{HpNWY)yTcdH;`>#G_<%VFVoebLhF&h>V8EG{T`A7+s-aR%PaOwL_=5}R?t`IKZf+JTjDCY*v)u9ydRMIJsF{jS_ zI_fOg{Y`FJ$sgPE1t=;mEw0$_ZprVvkwT+YdyB~nlo$8Op@fIyf(uKQBmFaq)%NgfPr$^Qs{5c!+|S0 z;jyNAcfO4Ovl~x})IRIwENJe*%)u__qt=CKe)Nh=Z-S?|$S={o*m5@q+^fnhf=ho= zXowS0Vt3sbf^{~yQ97y+VUri)jnm85xQ?IdGmI6NX5vWdRE)WiN64H+iTs= z4mu;&NC(fN@s_u^B{YL)vF*`^DWlUeM?>tR&rk*U(cEw+&rGA~xI!+bUP4lxy_Y5e zX=VjO%^Sm02HPfcvF?P!VdHT8P@W_{L(`; z!v&8U9|9q9OM%Z%3hv(1y;a*w%{e-SOyENs$`i*9jy%jqry??!w{%*P2iSS=@1X6K z(3A5P@6Cgwh_QSk1FE6}7z_bDLvJrX+3HL-Ae>*jaPTHJ)I8sIWG}ZyMFd{EpVA>e zU+G2OaZwCWKC1P?V^YMmXRtKJNPR1Tv{?_6EV6d zo5+%HfE}8y_V(N@Ta0YKGzH zQ}Tp7Jozvo)#{{{n0C5aM!(@aoRl(BDSw!CzGFJ@1MROBU)E}v=tFKMVg#{e8s8hWYk&F!LKhSv>8ND zmE6C#S4!_}t`$QNt{-bTv>MrCcTnuoJo`OP)o2S?xD}elc@6A$Wson9o0WcFL(iq( zm$Q#b{;jT6)&k!AqFs3SYT~NqgTZ=Zmi*ROlEOtb@t7jkeFtcr zqxnCXeo~^Rfi|>qZLY-&;pCy30!dnpTJIWOYk~B zl!l7v=X7RiaHtl5+iL(I6^>bV-4dN-1$B{?#W())*m1ECWCTZBF8by9>UGiy?Z%Zw zFOe0K97KIAYrw!@0uikvr6GA35jZyKaU zOqthijdN{n_~f&Zs6$SzI%zp;6x%qG@4h> zv_(te>H9A6rJNHd_GY=<>fEouI{IML8lpG|z$YHrrP*8>{f%H;?WGq7UfRY}NScy9JtxrMEA>W|!Li_{teNJIg+w-wZ|qh?wvt zNHK<3oY`@XII4YFYdm)}yf<2K@e(cz8#Am{b**;q5Yd~Xau*ZmKJODH3u zN2sBQYjb5Y?}5yivA>H)Ow3t!bIEx#b8H2xnRK__Rn<6&UG5AGooU$47pQQ>PYn;p z#r!@bUR{T=5)$l9Pg{9vco^p~dEG5*bo+~X(h=+xO_*<*RkYZRHDJSTu&h3;Zh8t4 zbY;?@^!@UxolU-}QfBLDCEcdXE_=gW?hgG>hJGV&%AEA`v<&s#?JL&7eN49n7G3|_`xKOHx`xbw{G=0v7H=7>zfnr>LpU76vx{ppyQWpwTZx zJH<@gc=27qnv<;$8lH)JlCIM4`FP|{;7LI`xG2xI_6F{)4x9bA_4i@Fl%nu6=yyhr z9kQUsq7pduqi*TgD?!eYQFdjziQykG6h&xtd$7XkITD_wm8CiB3=kSPrapu%)*fK( z+gv3I$ku1vE3lfrgU|D-dVN{FvsIen;eCmUD*DhrbWlhD+#m)5Ib+QbIy5#)5-Yj3 zPN%N@^2*1}{6gqqdn@D+3I7CArfm(JMOqGe%i3nco?E{xFWBu-_IT6lW>8W6@zwWF z1`EEXf3Q6y4M_@5jQAUjufwo=S~Bjs`8wbxSNk7JZDp?#@i-`qvw~n_39rkLIZXZ( z#zm>lYWyd4Rr^!se-NPmTQyR*1D4m@C>l_uw-W!8XX~XV$Y1_{lv7<=pH7Ru*BWYGRR6r8YjT-#|Qc%9$wy7q+6*6*hnAhB|MZSLLnBFsDOY9b@_?J z3LQVG|A1Qcb}ZsaH5+YI-)c^MtUoe`XMej$D=?c7?Fuk&x2s&RSzT8EI$2Y6<7eV( zF9&^VHdKJ>7F#_4$CmN`gxKl{O-HIq?2Mtfe#fkF*|*A@T^|&IyjuC+A+OA)-yua^ zD6`&f0yo=1isV$Gg=X#q&BC1%C*ND{wEM3uXB?!Ph3WqqPGSYmbGIk}#$Me8nou17zzrdns#WZDD0o=fz-f5 zm%@Yowq_KZCzg$_UI;LOo_mD=n}#Gw_chRsac4vNK9ZRD95h+SNIO9JQ7=#G5%p|} zAycB)qFa1|w;rZ)uCKb@&|`$U*;5@AReiYf->a@P)lSA>f}Mft zSq^TA*~r#{uJRZ`YYV8BbZR#A+MoPdchN;@&pew=GwB8wH^xN`LX8 z>=iY(Db}~me<+g!AvI7Ou3rjoYFfOB#XdeRMfP^36XSo0;Du*yt(w!{brf|ue>=5PyW^q55;WK@PM zDvVB$K=@#=DWwofbnv4+GgBQ3&z5qN#POq{EU`0_9`MoZ=I{g-?Wq_aJKBxT2`KbF z+oX8&x+Y_HsAYHF^^YFDQ-#fum(GZ|EhPsuM1_AVJ-J(DCJt{O&$<5=W0`vw4;NeZ zI5wmV>)Ef(6NtTCZYp#4*!!F0`dk zk4^q7ni3U>o9JI^Oq-5eIbx7?eU=8ZtbpSazzlnBwGg!HjZKq@wB~8c?x650ch~;Q z-<7$=LG?)ZCqm4*>QYbBVXB8ubaTP!)Uo=T+uv?1#N0`_jAr#*34^8bfJJZiIC?At zR|i<$-HKDd}n=9*wi2jSND0IKP2iO&uVhjeFZ0R}lMK$dtPCV{D(Q6e+cItyD5 zm>~sGEhw|d^oBU}1$c}OAlVFbzhV*o#rJLv)ned<29Ur%2(or3`GRljuJL~xm(*{Q zA|!#$eu_^et``gMod%>&YDiq5A>A-Mv8{hfoHV6wd9g~vri!PBRSyG`w0%ivJ^1pA7WsFYc^ay#6Z?+``x_z<#2T8N_xizROi`b zYi0E!@zX4|{6q>3)yK$NMvzMBRpgAF;_^q3W07Z(6A28`Uhir?pNk3Qh;hrT^R3}~ zqpG}o+gvJ-MX~~0-Y+Px1=BVCJ=aBZMDAbn772Ybkz~=A_k@Y1T9srNI8hCGR^)<- zGViFPC5iq?hH3VtY@CvrM0GDOTs7n zyxhW-VwU;JJ|JZxo<%nC;zQ7nqSwRqnjlflb@~MDK}llyN)3!rqLA#Sn_bpuPTP;uLDYUTL+i{dA(jp7S!NQNSm>WQ|aOV!th zu4s%8JTZ=S!8z_b8p8P6_TAmh$oQN`~Dm8_<`!wg7ta4jlt8*_VLZZA1+ezxmvP%{tY)5 z39;RI0?C>DF{0@fNKdoc$`Pn*QqP2+tL=yZrp@hsU*1jHn((cbnJTEmP+ULql*D(dWwFb^EKQx2Tswm?`m3K$t_bbv=$8MX~zR#2K)#m!Bgb|Rn zvxSfVhDvJ6H@)sD)B=>32|n0%)&7!LKJcUd4Bk5sc3qL{+<9xxt6c5cms_IvYD~!P zkKnn7L&gz(S103$yGK%JPSfA>9GjD|KW}~IU9a10M}CP%zksESyEyin&!KJY#8w{(}}UtUWk2!=PQO1p0@wTN6=V+sCT9lF-v z$Qk=6M$Z}AU^!3DW-O3iYa2RKzw}pbNWM|Jy+KFr?Y7CXOZq(TvH$gp1SC=I!V5Q_ zsP8VWmw%D;cbb3dqxnex$8ls~>KqG;v}Qu~#wwGMODrube;uQsl^Iaqd3$yal)Z7v zh7e->+Bcb_1JM6Tn4;aO+7Yd7ZaxYG7pSv{xlWGFM?z(X3?|p&SS0mdv`cIcP$F}5 z2eNgp5F~a-G_SguM)4x;!R7V`B~R)VA%oimoS26g2_&_~HE43dR;6g_aD6!YbL$8f zDJ}JFaHis`AQlPB@B+^vCr=<3c|ZSxY(RMQKD#Ki@2EC(6>8fQpU#u6a%ED;_c|b!|MPc2;lM|*Yj{)6CC3sV=k;U8B9B=K>vM7bvfVOZ?hJ$ITN&&l`?An`;NG=`*rv&hpYt5z9>*2xByk$t;tFvM6F4z96InP6NsWtfbL zEn+r4D~US<2eL+>*pz-r?}_9}QWe{Hgs9>vuZ>M{7=zvlElY%3Lu&6<|MVM0jo?Rg zEuZUJs6s53P{hixl}>QN5l{v@(lfRGl}z>?%C=OZ%uR1HO@nB7dX_||&YWn3DzbuA zVsAf4xc&vP<$M1Hu|1EW-zY(_8 zo74ET+%2oQrz}6oxHP{0viI71%?uf8POfD2>rIebsHl^r_j`uVdr;-M-N>m(gJS}% zH~~vW+9`jA*c@O~gZhBF)Q1em(66A6q?U({z^yq_+<;}JUh&Miw^8CkVhEqD z=9I5e7IGvZyG_vWd_}Ozee>91g5`mujE^+ZZY|A7(sZp1w;9a{{plnST5`sU}vLE zO?4sfWw3#NfBos)(C&^kp`sXbXYHOwo0HI2hOH@MUhnM6K(iQDo-xt}VVe6W2(wlS$aAqkH4xK*#;v?4;8`RhJanwqvM ztxEw?XC5lGR>l;3;pLrZ#WLh7e8$Dmu4{bSmDR(nXuQ!O@U3vJTuTf_Unl-b`}0Bz z*VIcwb!iK~rUdEiq-w>{c}SycxZc`ebAoH`dK|Tgh0Ty|nYzS<^_GnD29m)~Nw*qA z9eN#{3BZgXy@E|;vcV&QF-=uF2QEagOOAUQl@k6G0P>0|3@fhVyJXskIGg)0GE}{XamXeU6KrN&h{8XY@He&nWvvvA$tLIY(HuIwOs3mS@Ccwj>-+Up4U(Dhk~mE$zGe z`OfR{rgp#9;~blM4*q+tq0^}}gB>PX+zBSS=hah@bQB6DT|99lr7z`{k6-s;n+#8Q zu=TSyK3akK!GyrRC(3+X6>f7gS*pPyf6Er0N}OJ=eP zN*n0b^cLC8?k9=TZ8BZbPtJSmJX#1SjknD}QO8`pfy?mRnl$^R*U`_q%s4C3_6y$J z9*;7b7=3Vt#7w=F>3Qi+SpXu!z}SnNh;?{9oIaukUnM$E>97bc9j*>B#s_lzVx2a( zhZW(XPAFojEjj_LIqjkDLlR|vMOEMwZ;`~g!0al%kB0}PXumVfoM~Fccy@NE3U3r6 zW#qBwTWUip8&Q*&-*49YP;0(l zM$o%JvcfVgSL7uPXF#d9#-n7YrLWrSPx%c6UGSKfF%j*-a#Z@O93u)EB?_?a!C82W z-XwM;VSgCIdNbw(_^4j8aCv0tmls&~7kr{0pw{feT)jl>{Zkm$48pMT5&E9zY*WV* z4EOhBYP)EtJ-fU2LTRkpjC#g7hMukaGu`HaG}e$y8~u}>v)YqGV|9DE_t0w)HV&}T ze#)Q`ppTH;`FaKATF=mxhE+;7L)fM`=NKlrb#N`t?LK*Whv(X@5VVnnIAHgsJ~(~j zF4M0H1w2|_DscimT6N}M8qYmFfc5E8Phu&0&R5+B$`{<63p(B9e)0_~`lXEf_sH5p zeJa88#f&Th{~aQSE96Lb?JhYYlAE;UsP=$SqT8602f0+c03@eC+W3@@cpF)Gk*!Sq z*i*04FpRXP>7;8eHGM@xIOgqOIo}#3=v1||Ja%@$Y?9z~_&}wx0;Y20 z(9(CkTF_cGZ#Td741Pov|XhU`8Yz96zPo>5^%`^}RJZlJd>-aq?1TeORXuodS`6f2VsDtdT-) zX>Da*{oFId{iQv<)cJS8TXIq3f&yw(A#uyC;%ybq*k&op_7&W+yv%u)gG#fUQT?L& zT>6?56$lE~@Lb^Z-zc0u6`*iFsS7?q2ny#@@DmD`4t7q&4@R?xb~Wv|sI%W;ETF(Q z7p~mH>`BBBCYSt=A#6s)9-os#M~|}j zB15lKY|+z6>ySMX!lpj%&*g$l-Y3@G7i#_WuWMbf_*K|$^a8%b)8AcU=W8KKT55HT z(}NdZ52et&F0GmhjJK&XxRSTof=1|`CY*mN@qA6Z*gb>h?y5lsZmJgozg?e$G1|9c zE1U@YyV_ENRd}gQv-r2h{6*J}H5?cnIrp)?2*?6i2??nSWGpRn;PKx=QeWJ4e$!j& zewVZ@r)+Y1XTAz26nD_uEMTGD+RQOIy;3JQ{*HrS)2+_)F%EG9PRD75KA<LQW{84;V^wnNL>CHgHL<`&&cAMQl zo!wC|T8Sz^4)Top55gxV^|t0A{pZTKHZxn;W+!Q_x&GU2YA=h%x8%-B41Z@wazY-I z*IB~@yvS|&RM|#CccHvYe#VErRGl*Xx9N`uxz)b(o_PSkg5KR9#MX@5sRBFy|3e1-0Inj$s^i8Z@W%xOp zvUc^E?_aO9I`U66apx+TU8CDnOUj-_MtGjH<`hk-#HCj+l$JY98)JG@r0qnPjfjTH z$JI)0hUe$6k90pZlH8DCGMEEpWAa}oFp0{%0hRFFF_PEf_v@XusKTse;`@px-$}%g@ z?r=}J)N|!ieY4FtmIG`W>U2KR*U_8p?>BXaMBAeGj~%S(V&$5yM`#qpQ?`^tSxjQQ zRs_^6o-m6&8Y{8J&ptgmM5gThqdw_$+P$hOtk8p?6#7XIM*l9|@yvVZUEfK#<8=YMZrsAUN8>dc0Vu8CqpMlm8I5Qy)COzchNOy-QIM=v4E3S z^n8YcNPRFLWw?3X{m9e?F}Lb*lzT(6&tQ`5zaiAFG6_AK_?I*+z!|0T=<*LL)m%nG z;u)y=)!E{qys6^N@%B||_cbeAJNp;X9p}@r@cqyH+Pggv6c`koFy!s69iG9{y`Ye< zMviPRi&2jt&(ks5JpyQrBj^c3px>2T&HV5jgDnhG2Yb$vYfWjQ?DKv|4B`D~1Kpnx z#oe6NvM|@9=dmXY4;m#a92W`tK=E3ytx9!IVZ0(q8C+Iu?T3yIf|DB@UEfStg?=s_ z_IR88KsKElQ`Q;eM&?R!TERZQkb}G!JmAHk&w!ih$-?$NFd)s2`cd7HRc|41Y&Q}rFHLRSnu3t|g053&xj z3vvo_OWb>>#aOrC(It^0OHr+PGZbObuwr%%kFRhXd%@6^1I--x?TzJZ&>>;kFBH$E zUt0x(6^~`)Olvp$1sz3MZ}n_UwMzwFxGhzF32K+x&ZyUFe~%`j)`VxToQf z)=2ynu;iAxnnAmNUs#mTiNp_6!$b zk=#GzU4vM+y<5Jl#5!S#ykvY=l}b(VH}Q6tg8RE3*oNn;o0yv#e>l!`cNlQ%k`Q%0 zyqoK@SG{!~#A*W{$kPZrmiJCsktn9Bt(D+Dh076g{*7U5Y4{LEFO_&H!rffM*za+v z`pin>=kS4G><=!Ilvm7jZ+*$`7?@GoW$SkQaU@X9wq^Stz&qtmqKc zx2b@}bG`T?YfHkQeq}tCskQr(hW-ucHu&0|r9J#Pn3bgaT3XCGo0diJ3mmAFnV{jY z*>f?BL3cmZ-kDE{bv3q4CnbL7$4<8oo7iifCNI2^M`kCTgG`gQX43nQFwP1z2DRLFGV};R@@_aw=9;gEP9wnGVgyJc3zgy-eAnaG8ajN66|GFk&_c=`FamjdFiuv zHEiW*W^^78Wzz(^B1^o-W+0IvF@d2zR5=u32PJQRA9QFfMnuW;dKKO|de~k<>5Up9 zTY~!7XI=tknVzC|dd|xf1`Us3p}vL_LnAvUoMi??=kDg+zwSLfqB!r8TQ1Zfl91g z+#3m#Ok)1l*Dh786Mg)q`|$OII^Uh*(P`Z~<o_9AY+fVg<#uO zxA|hQ{BL}^-$VEVR$o<-^vF;CkQ3<$V4NQs^DMOxOeHGOw_msF-bBZXp?;a19j9zb zpORj^+VPb;*E%C#`vFPh3RF&z-~M{0ha;jy1U2Z2`@q*n@n`X9S5dT$9@dcLX>cvt zStSqe7P`j#Hr^)P)%yo6)k_dDiiCY}Ileu)(v$8x4Bjy-xc*T3Up@f3B|5BASH|yf z$x#=QvqJ?7>Qimlz-_trET`-Jj@bE{cbt5;=L>THQrPt5tE{AOkIYIVXM;)RxmQjzN~lD9 zE8f)bapip`>hvlfnb&P&k&ioBle#hq`p0a?XaUqk6RP~Du5V5+9{aF(_DaMVUcHKL z;cO!tcI6012QBbSF>@czkK2P7hlEiBQxnrokRpQC#Wuj@J@)3q^a&+(PGI~80Yr6e z;0#G7o0VkZ50B+S*#GEE3#5SUbZ`yP9Km94Et1b=Suyk*a3^?$jIbB`5>5h)LWz8$b<0HD%Ym zl;XDZ-EM0L3~u6J-`o*Gl;5;J@VY<$CKVO`ldE5TBE9&Z{6}*bJU0INlT=jy$EY;X zbFFYJR<#~1>+lBu=wH9C-GPPwO8l9)!x}&LJbvi-c#QbhpZT}?tRw&Y?*EgekpGja hu>Ya|>z>Dyqq}Uo4JXr0`_DPg!fOx#r@_I~4^IA{wGASFVsKDaxu{xpLhV z|M0y#hv+u&Pi|PrD9c>AQWZmdW^xn%{I;{AuG^I>57{mr zSC!Nr?OeHn%Ttn-(eO6f#J;y?Rmzff2HK$*1e_d2z7nmHW(9X6qzU6_37V5}*`o&% zI;}j_B{7Ljq4JKFKPLv~rn53%IZg%pQdQD6X>Y@HH$&2&rswr?H`o?2SZ;sOVy zAL457SdlXE$aV99vaxf7hX>7S{$|M3BR5}NQHo&UxGuS(>3-uO z7HStUIp?b*(dtCViF@34b6k~#QLQ)Bf;kY;NM#oGv2hH~meIH3eGQk`TR&-~Wxm_C z>hm+^TQKy@S1U zI6J9=`t`aSf0#7(J|V2;<5Af?6&JHK*^s*Umyz!ZQQ^~SDcqGq?& zA4Ouvy3s-2e!Ja;vY57?pn!7W7(vbUfYViow<@aQV!_-w%{$-LJLEcay1#fq_h39O zPDIxxkB7}I$80VlzkZAtJXVhg4s@1Kugs#j?PS+l&Bm$nx^>dvVYMN&ZB9)^#L}r8 zB9d2?2JTn=px!`MeceLcHtCnx*x>sOS=rKR77p{!7i{77T0*__<2ASWD>{o3_iAV= zl26h+Rvp>`(Dt4F4(&SknkDD-<583#gx4Pja%E8-)FX&P!mr{`&uVEiZji!@%~f9q zc+xh+kZ}p>$lY&8@pIvU95i+;B64W}DMZ;8%Yu&x#R#!YriGGYn>@1qb2SyWV;bO9C ztRqS$kI`9GPC+J`2zpO64ad2V|H&k4-0sWwP5^(2kB-jx&f!Wp!hjSMe;1Az=durv zu#9M6Vwlyp_PkQcx7kk``-V;K%;<%;N7|`^mDRWPK>#Ztd@XhVTrQE&|lB8Wh2jm z9El-^~<;^gsakE`jVB6FVr!d}5gFdD7Nuev20N?o{j;0hGPhyQQwR=le{V zx2nVlO7mem9QcL{2v-ci24FS(_f|lQFnASf?}axY2y(IePU~if$Z@ad+}6z%!~N$Q=o~rV;Kh(Em{NN{1|dMlVw`d_Lst z@!&fYA$n!_dTqBbRm^^`Kt~*CBK2H=rsp#~19Gu>iZ2imSZYcmPVeIvhXi2u4{wV! zO_q#vyBwqfGUa|SN(nJ~?Z{WA_j?%L_js_~pjcTHHh9Q5Vzk(+(_HfSiLOAlzJ!iS zUKN|PHEVl}vo~!3-A=A2F>B!(^V3CtOruJb->xo=k0ynbS#?~#OnrBQfzfvs++eWh z*Vm;~5D5f~Ym>=bW!n{MR%2jC2Xn|+p?A)vgYB;N7aW6Ai*GZYZ-dwp+*EgvTNs_Q zwyJ~+zvrlWRGQevqy>upT0u<$9g7be5)s;W^EHi{o?vTgW)pryTP4pw$&xMJ`b9We z!^rcIcF>NY-&ifPcVO7Y#uK{+2?_W0E=`U1d7^_JwczH|BaadTnPG*oyuh@!0@wqe zmQeTi=jcH*4-}o;1a;A}%K=lN_@l&qfPX1}lR){FQ28E5(007~qE|qBm{%P9o5uc6 z%9faH9P+;8u9E1$ZoQ4NTW$^d{%%UWQWtSX|`_RQ5600Hwa- z^*8K=ZW0`?E*O|e4U+I5^QnB&dTz0KSpG_x}~RS!$)N6t}2 z3qv@L_b8=%jN3gaon~-s=aPx>p{1MS&v10c1`@ygEV)_mS6V4Uf!1p`21zx`-`X0W zq0p5H@|Zs>QDaj~;*m;7iJ{y3n8+;EXEmXu(b?ZUMpv(`DvWd5(p8vvaI#95kd}ld zi`XCs0l{N$a+enL0p7}z=I>h60|2pcf1O39hUc_9pfBkH} z4kakg0&i{(^OD|{0J}IZO*@wN+hv6mg(zJY`&FCJ70nP#KQt9BOgQTo8&Bj~q`FIb z1phhPenNfzO{x~+C<(s#N85NH2mgX#hG2Cl8yN7 zQ`zG2bYB-;_c2kHD48^QC5~WkLo!i>V)ei##_d))JDH*Guh#cl;`#5Lgtb@7QVU+6 zYFB~CzxtKUI4#9|9k8c{0Pot^_ojCvKK3_>J8Zwo1O`{UFGYu2n&QqKkt@_vXaH^tKql1*hiZWH7*sb*~l z0W)G7?-PaXO1Heg;G~UJa-WGT8X+P`O7@H>B)o0o3FOwmn7!g4>&-QDE38t zey|c&I)LpVZ1VSC&-*JyLnK2F`l2jO!B;wDo^(#m?p_O}h!L@=2TxRsk0Gp20@h>7 z8`3$LNHcG3J6`@(bf#mdfk(-=RK@RY?z*#N0!}fzSL9_egLYL#2>jrQ`Q+Q=H_;Gh z2oG|hB`jPN_HD9ofy3=Hq5kR zd6w|Loez#upUcMF_8W=KrX9EYF%M8Z^1rI$ zINnxLhq=*y)(f9c=RAR)!`{Zx1Uy|x55U}>J6@1xwaO>QUn9$+hdWe}BcBELa<}32 z<8}TfY<Wm2-8Qo~D!i1OLp1H%0D|IlC+?d0-n`+H&eX$k1t(WTw;An|l8=kkjqf z<|J6p=L_DItZTX}gdj%9qm-@?HcBuUxOshf?Mv?ki3VGNY$p5PTwt7v99&RjXwR!0 z7w=E-0{+6Y?A6_XENx+aob)2jn)^MamF77d$8#o)JFz-$KZ9p2;_M#7%XK+h z7hzGj7)DmW%sYzi;wAEtNE3zV3r7}a-BZc>uXm?nSuZvlOWO0zzRQo1gQ+~1FFzJ$ zc}Lv!au8Ym)r$U?FAgI4vRa&0-5suum=iU+(tFqeF3|RaxRIOu!<-#{q+jB>UQhUz zIC>anFjbAdr<}X8NJu&4gYp5tH6v60j%)iM2lc;t`8BgNP;XQ&m$`z@~s0M|BquSvV-aDED6wZAF(Vu@%YQ}YI3_4I5&2d>I$Y?C5t?E1+t zBU|cYF_A!cHMc1qntLn|hnO2?W#o6-Pk#Z{<AdRb-N6P*=P4Vk4f2ncw+3wgZ$DPX+CNC>*q~#I=y+6{FLdo>;}R zEGC|4smLl7P;|-sJon`k>eAJG=EP`7V?%8|N3x{sKG%>s$=TAZTcbj}I3ihL#!#@+ zqn`7_NGCa4a52NGL6OLee^qwWTmwdq6mU^`$N$4 zr_nQ5__@-Wv)cJytEE(li+`P_$~n3VH8YKl(P)&XQ9pdp=mb0ej8zmzpK!MU{i@n}U0aOLk*kK%&-#@MYyS+FP zwQEEphyDo)&o#Zu{)OToWA2gj$J{a|iBo|=-m}vKNyb1VrlIso*8KHNl&8wx^O%(t z(eXWnDI$!=`5zVeq_-=^i8!g=&I2}$*t741w+fS|>`S@LRL-B}A4Pt4Nnmb@^Z~rK zVAzN;TGu{!40kiaIxq#CH>yx;$OBc-S%`7){#dV=Lv=aqAva0gv&*AlBxzZ(-9+9P zaL*W*tY`GF9rtssvPH5b_J=iNVNrO8u3Fditz30ZcEqE;riLkZs=9DmRx5C9=IWDo zhRbnBpY4ZWd-@lc(oVK?|KK&Uwm(BLEjQTgX^mwDdO=L5e z%3ap+qr-x!?9goeKknuOuMyb!Im^*gpj&>AuK#f}Jn7w#acNICNc3hk2JR*Mqz{C>Lb3N0GhW^8ho#!Wsn}2-fW9Szp8qHU!vxiBC(NBSgW1LZA z9Cm$lfbo$Ns;ZJSsk-}aZq-OTXitum=DT1)&L1q|P4bq5RWUCwof5=(B37L~nkQh_ z>6w7*Ubt1O;~=S}y-Vye3e3`SkCDq{EWj;uA`TQ7 zleBwBKAjNxt=Udf;8%OUw!i;`c@x`Em9TK~9WkIJRVwv12Y0-rEuzWqqu4ePn)36* zin*cDZ%O$$Sc}7AYThHygQ$JIo@VL4Q%+~#zWiVCLzL46eh3<2E6LrZL<@(CMI=yc_1k+83f5Iv@MZh(_iF@7mLYgX{&$Gxx{X%$po)=0-1?5PU09Ycar zIw|-RRKa;6y9o=T3=EbBzLLM5nG;zl_9Um(cyV)qQ_+^*O z`|08st>=9hq@H@CE8zoAqwY?d7}dSR7ame}Jsnch+dOL&yKOvAA~eSPVQC~IK9A)J zcESxM0T#Lm6L!ReEc0KjBrJBq`($Jen%L9wt;z)UO49v~IOW=P853cRF*8hPGIC$O zer}KVPpF9XEWB!-{lnZ)MQZaKMD_s!jn9{ycB0a{mfFFOiguIlwVi;n=c5?U`CY|U zo_kJ$oZXFN^YVL5-ja-S$Yn4}zIf6Qvb6e^mB+c|VHd)P<|JIym0yi#XC#(}djHp& z-8>(bY#7Y;Y>A_jSOUA_al@=&Wyq_vlvJeTGeFWrtMoSwQ^;cw`cptPUZT=A^0jc5{TE!BiDixq{fk5di2s9Z{+rn4ziZq7@o-~vvHS90Tb_K^ zqa=GN&uznf=^9vaY)p`Sa?Y-)JzCZbZVdbvkPm<5tCX-(8isCmDp8nwcI?0#gTy0X zzJDp00$Elv1FsE#q_&T!<7%cW;Yds(l}DY>(A z?(%mibyUUn%r0|7Q_$P)ppzYjLm@ERKVOn~PUQV*O;uWcQ-CMicb-%(>fi6A6==2b z;_h93*NFSl7U5qL|0nSHp9L60^ch}K1}CdgYyTP=e}ASo1y6cwT7o0Gh#p32{9_$o zS@g{Qs~`I$CqF~~%!!7-e6bwY!}rgdH1&4NSxdRjRN@;fw#Cx_oC)=f=sPA7k1jux zqx(~r^Y7gMKicyDy6*)d^Bz@eUS%%s+a?&4#UGL1RK^P2sqxZ|2*UD64Gngtf^6c1 zsLxMLlgctW&}w<}F2+qv9TWJzn| zL84rt5RcKW9r5t6^+e%MGv)_R z&9Lj=IghtPG(@ta(tWHZdRQOydyMOonr1+A5Lq>cwcLR%rU6<9YzUH1{l13` z?6YPH_>ApHD#^-%O#JB^2RJnjf@nC5i`w^k^S|GJSMngL-7?UrZ5YQeZBvoIq0NqyxBdvQ+RXocXRL$qGaP~ukpNQ(Qry|`vP({;$-N8%iwW;GQ0!Jc$&P08IIYi-{WRH;EJQVCHQG8BhU_KK34aM;Vlzu#Q<%NqZabwv+ZEcWJiM=v7z` zVQ(5QB#Ox^<{U{yV=u-!%W^1S#X#Fsot=YUbc&)e4<$f8Gk?YxI&u3 z8qdeC+L&F>wjHzhv)7;TNhGeQv@CRlxn6 zkJo#z#*$=gM4W>0#JKw0cpcT8Vs#lE+V!DQ=(UnPO9%8jZM1VWR5FLJt8FQ&;GJ5* z#)QQQtL36{q%E$_t+2+@P-HTd)Cq8K6QA5*Z0s+&_+cl@D(X@op#=A4fq>)9sAK|= zo{iL1ezd*AZTxXrj7ve8wIj?2U^Cr< z!<|`vx&W%4*g0MXL8fubZ@$j0&k}CRl5V2e_O;$Lh=ldC&9)rfQ>5^vr|dz$MPQRX zdEQO<6gMc|SZ?zV43wH2-)l&PgO55z+Au6rx}^Qnj!f;0J&U2e-sdkZ&h8om4!K{F z4x#J!xq3AgsoEK50QH{`gW$IE##R;IpYSUn%(6&ZE`p7@@qJN)ojT18s4 z8L0L3d`<;P=2$*HVco8rQTAaTj6syTvzX(4qlM@nC0o%j4X zrCjtJCv{ujt-rU@jjh}wJqp0EyUAQs5$ekPc24Pc8h8hM=}XF4*?ZWFt-ONm9fbz+ zSUzm)Ow>fxA8b2MNrPS8oz(3Do_&c=)H?l%o_EzRL&dlb7{rTfuui(m~hgjYaR9oWx+>8nSDw7pEVmrU_s5MIy1sryMwT48; z3cz1idni+KXUp-7_Cu1{JRt6}dKdcnw_FWtvcTA2&&SrP59bXqgYXH`5A5wfy3 z4q~PQb(DUjMdj})bs1=5VjKjI6z$8o`rIoTk{fvEw9k2Ie8g$^=lrU#ekk2(Qju?u z&S>6yc|M;k$DR0K*Y9f0^G%9R$E@%F_&7v$hd~SD?1m-7Bl2#t0!*HA#Oa!KZ;QKD zw=`S&SXe##Q)R#Z@>x;DW;sOB&hAV@?vSZmI$OAsd1%nrNyz^iVTbinqAW)h%fkb) z39C0mC$STOlfI#MoMvW{5jS`HiVME3AC^NIbSCJzFX^IxLPbafg#`AHshj z2k|yw57E(7P^XUr|Evym^q2VCNWz)Zk=iU6@Iw^i?`r>~sC+(+GoTNoi zmtqZYNAui|KKI6Cb;ileT#Bx(UEhqIU4o|qiqQqMvPHkkzZBqJc2qexHg~%=$2fPf zDVmOnR`;}QT0!*V=Req2p?B*MBJ{FiVkTNaE$%tl6&Zz&R)z-lV(ycRR!t0>xCp7{ z=hg};+wk4PrpkJk4fF1|81`Ls0JTp5?o-7xC#!}MW8vOl>g$4ztayKew6@plbsvtU z<6K6faVqX~JPuL%%}q}-x9aJ$%Mri8^*h@%nD#-x$ygAlJyH_(jy`g-`Vg(xYdXQ@ zR1#$B;aqA4ZM$2reg>o(@X9`E+@wd8^X^YE#++kJ!mtqLrppOq-RNsPBdOdHhXhDp zvQSr_|N5;$C*edj#(2E?yJ~vbP$WFC4Pj(2Pn*Z@h%*?N1_ z5M(eG!S9RD^J@Xz^a>^bk{`YN%XNU7CjsGgONU~1DK!tg(A2AtNDZRdK-7FrBu;vcq)4L)3VSZ?+XB@a%Uzmf3XAOkgk6 zd)~RlegA_IIKjIK))Hb{=u2g;-<50sLs%P1*hdW`s; z1MCMceK%2eF5xWO4ln8R+b!6*4zSg3u~(@X&_)zCHxT8)Fv6+E*wH z(AKEgt|eA8f|tfm2y!{sy34uZ6$E*Y3_R(e>kYARES6y?mfTf#>2;%&U5H8Y zy}jd9;;s3EuEXrROT5zTM*$~g&K_T4hi^WiUEhKS?lq33-#Nqb{GTi}YDOI!S(AGcZBJ}&ml9ZbEx0oJQJ>VT>4(rH5DU=~TDmC+ zJsR}s7CYwk8uOG{x+hLLKIr3ii{A2U(};5HOrr3PGoh~~N}gQ7)_l~qw%@r;JCjre z1mB;j{k7*#YJ-Naw2@7sc{d)uLE*g!bRRxoLd9 z*n5nGY%fM(+Pm5dTnh!v3mi|@ju#hi&+)ra=YIp1K{+i7UXb?RWcaz>Yq&VRD@~vD zbe!m+7#IlXf3SH@P7xXTZ?DddUwiwL$LsW|sSEf1kP@2ZRKs!V@y+Bio zPr+eqn3&A;)rT57?|Ew8dx10&4PBZ_PzzY93D7iNwqv=>W5fDol*2 z^lyivYQTW51JPP)*6%S&0O^_9p;HtxC}r?+k2GEEk>?7_64hgscT}GTy%I$1FWyQ< z9Q5xbxkwkK^&e2E@Jv+X3^sdw(O?Puc8-;6Y4{3n2WYlthpgs8wGU>kW-nAU* zuY`{lS(m0sG;tf1TvjV|p{+xa>FEk*MnA0&QdUF)zUjMH?_2rTn?awCE7wguB`UhX zA}<#?-iKoKLjD)-N`E4>oAGoRm^(gl90BA#KNVCkV>$wltpYboeSBB;I1ZD+V;rjD zD!i(Um!^+_q%RC>s8DD;kWK604-~4iwH)K9%U-ovV&!?q2&CQbUPqEUwy8N>@g;xNjDt51Pb!t{hmR*|e2jcq9 z&XOpz7Zhx3OAF5#^=-bzNq1{mlf$$|NdQ1^$Ft#Dd?rU4e>Z1@%guRf%9A6%cz{Xk zXtXaKLK~&`7+{kCdf(N!e^Zx#_5Rr&V?dBoxvljXDD{!xxmt%X?(lxgZfAh}&|BI7 ztWDEEE^0`X{mliN zWtWCA%(gK;MPwaB9eTJCfjJA5@JxzzKAzeOF&}Esb=gJj_^4NM=cnBXO zmBRD;>rtNTFo3;7)cFr9d>xO=bGh)<^}3Qfcg>hvu+)BdZik0(iAE0Kuz`FvvmJyd zqK4?H5p-|h z)by+N2`k0K?Y@n*YZj~vlk4fZ{jSS#mK~3}Ug~IhnRe49bt1)VO!H0j@8}V5!exbr zxOPp2^^-j`x}hPd?$WYk$4#v^$d~n`gJVGYVmw?zUhdBEHf5bc5FOd_ih#{_n4Ddyq zc-|1ch9W|UhmgfJ(yFG-tK~y3$Bn6z5$P@1$eN)Z7lS7?^>Z#MAppQ+3@G_F=;myK zu%lgt;h0eKW7NxoD^|gL2(XYg{lw_ay95r-h8Tq9x6=bZ3@O5BQz;h-vH>FA) zxBALINIL@IQD_EpLnis>1Ys$asy+^82fI#9!cKfqtHCGJ8P8@pS(=~5a)Kr~ zh?!iA49Rz=jhz7Xo?F@QNEzvL%`XsZ4A*t12rciWr|;DmD~!kp$=4*xP5%t6>)vZ0Khza5}2lJuQgYIjn>ILryhb@YrsyHLA3yX~aTd)R3h5^jQkG^bA> zd9r2cl3}@4Mxn!&jZmQFHgY8)tayplhxzq{W!V>3AscZaM^6I*$aLK^gHjMRF^lg9 zo|0*IHWwE%3SzLt_9T*|3(wX$=od^gzNS1B`}%yn-uZqxD4iVP$7hF;Dk(wL#4A^s z514gb!JK}zaK3*XP=Ta6Xr2zgdPs=e|BWgff+&FLyN~UaPD)H9jHX-3dM3-lBV=DN z;MiXR>ugpuS{&%FJ4DDFWqz*@#-M6sOy`$6N3@$$77yXOS%xeu#$T`MgU)}FD( zFLo`d4Fs+bV(lk|M+NDmBO)q+Hxkp!2Q+oi@A|2wc{4+b2tgi}s}-xRlJ&te+R1tr zZ8(^8DsfX{yMF~5YQNA1WL=bPmpz{+$Vh_asv4C5722|OF}_OXesqjz`y5uMW?*mk z2Uth9uVx=X@0TT&{3%+7?MWC2@tU2*bcNnse`*ro&@ktSZD&VTf3kO~y<1yB`kp}e z`OZ;O3Cfl_Xq$9$jkc0i8{9t>p(04Z-6aPj;1M*I-l^vu;Ejeyn6wQOd}))bVx)w4 zEH6KAw*yp={4=3my}>0^$9`6Sun;WJvin2(Dn#2PAE6<+(`UmY007g)U z1ma&m1Q9t4n-v(xjc<%j;`IVd#y@kz>wOEuGft!vSW7}>_B<1q{m39NDD4!PRnOzv zEl$)IcCoU55g1j`5FA9co81`5*@n$@>+JQwI%aI(Y&1!t=A@l14+da|Q2EB}Ixo-S zMg>zh3z>Ys?$)m06Wtp6isz;~ON&hoBMbnDojx~$%_T`-vZS9j>>u``%CKA?<*0>? z@loqS-5fkkMn+2CyJ^^dm;Rc=Pltua1W?CGoY8=oVk*ihLHOx%?>k~yPY4Y)ovAUS zHQa@qyA3i6)Fy3_J~(+hDHaJBon(F=wH>VNV$xP&`&p_9^k;Ks9nuVa*tsc=KMo5Q zOZO>;xVKX5mZnRU4Q&yFw|=1jCH#GPG_lw7b)eAkInq_Srkkn#6<8wpdd>cHv)k%p zCqJ&RyoMPsk9N(~sG}l%;r8G=JtgGPU+za9@<1Hx?;7p*mSA4QWK-kZG{tmBhSQA~ z?`Cq?>DDk?mV?S<8Y&+x{;pZ2%-?N)bJgX8fAau@K+gyKuE2x_{z|@}g1>1F!oV%1 z&wqLr2DYCDfLrd@4vo zmxJ=feAaBwgo~Hg2d7hgXfDIkFYjAhUF_vrCO+_uhD<>Sr@aVBOSUU;MqVd|Tb2Rq z`>AOwcE~>6%$P~1Otik)igt{lLxjm;=BN7ZM{UE?xyT0RTXybmGa051XZd#O-`NBO zC^U+58+84|q^4u>3$@CTR-n|6f|v6%F1J~sG8%u|g=m&Pp8dY5&GYv(uv+ei%%7;2 z(u0iWr+F(Z(ca_AS=Vlz0QQ`2CU5*&L++PlrH#$^KQUUg=8W`-G4KL1R(VbMcH9~& z$&kx%@-h~{EY=9@o$488+K51a_1d3HLqXEGA%D{pZ^;M4y9;B{#6{8r17$oX*X7Qy@|xY2u%4^hvXV2e$AujVO7~0~ddOgMPW*3OcOa%T9k^Az zF={TkjM4{{#JFJ2N3U zs&<0O|8!t+g>M_sDlH60a<`ZC)=599HnVUq0DPcBMi4Tbe47iX0?_;%y-U^IlN9|o(#C( z&p4Gt)OOY#vkR%1?WR2n_!6MH^3JAD{?Fd;*<}E= zh-1W6%}Dv-jNubS2CeypXcyEEJjsF_*b#15-DXN^vmDw+N*Hw-!cI4<*3Sc)?Ku>C zGax0o4l8Ce5JI88qox5A;`tWob|duR65pwV#EeVT=jD^{{)XhCC3aNk7aQoF%4Y;~ z!;bA`^L z2dAYr)5E7u5q8Vq^q$jK!tK!ZC^!{goI{kPzw_ChviKlM-hc?)z?fb03MZl+ZINpu zX!_{RAhr#-59kG7OoFX2Cdi}H1nP2U{l=KuJ#oaG)+-vIeuMB-J=N?{DrTu8!kdF+ zDY9Rx00Ew^r}CCgpR4a_pzxR-D7ViA^ts$?cap7H&!dkOZxv{p4@BBL(tfxsYvG#LWzVU9S+c^0-82(%NU{*n z=q%KrBtu`j+XF9epcY2YKSs?+EFN8x&+VNF7-B4Ri?HpZ(}f*tA2%HcwjC#DFP43) zvpT6few8g1Oi+l|++e?fKcH!U4Hf&h_pqse%A1*fDjOyDG-Q+5e{)#qxZov>$+MX1 zhupktZ2;Un*J70=`d6J7c@g}DqPp6&zQO;ND4TDR-{=47DXwDNPm|zhzxg0o<63MR ztydUecBQQ*VKAo{$KD(8M)6JpYV$ z&(3fwh=cIJx882GJ-W~mDUDH5vTd*8xdev@JEX}x)}GHH3fTVYaEt-QN?=A-Cuq9y z*olYu&3k*PewN&JNQ4L+*RS&}YWGN)Xfq8~X7rLnYO4Nm+G9ihZ*PV4__;)Dz@E#N zAsnduhCgFs9`BAaea%Y?+zuNiH?;scqWtkS^_T&jBiW7IldN(}cr^>l!Lr_6f>SO) zhgABwGGv9L$B6X$a$WzQSC~PY>@X*=J3AV8mZ)RD>d^fHZKqOWAPI9ea*UDLk1hl1 z*R&b>(Z-rYM=(s|!xy?(=XIKTop==h)u8K?-7-7>B8M%99_!RQI?ezhbzo4PiU^12^-JC<4iY~- z-P{ZgX77e*`4G-N1J<;wBrno*H6fSdA^XbSKgwf?JbH)BXW3w4<_#y$=veOcXyk;9e$jF1>-_N6uB8Ri*Lr+Mn#hUSur_3kws2XsibAi; z6BE`d&J$hr@Q%rvKuox(c*4yacBbPw443J9jt^@V4yGS+OXB6)?||iliKj8x$4feM9Yeg$*d@VI$GrEo zWq&wI@M>*NL75Z!glB;cp?cCBFkhF9DB zl5gI?&xFj%nWqgBWrl#(Q9*UIqrdgjGHpx0R(Ms}hO(#Z4FX zam>{Z@15+PlfVKmI4jWo`=DXDwSy+zO#l_YKkKUokHuVn(|so6>sOTX zxaNA=_yVe!qCC0Q&j$WX%}W9^ydF`3bY7BMB9JmWPF^%pa3>;{_gTpL+dIUpM`(r=s}#=ho(z zLJX+2qd*odY1-aYyBndG`*9T=tYakaxyB+fYH595-cS@V>ZJdcXyC<#`bVI2*JC-H z0{S+|mIA7*-bS+{P>T;YnNPn|7;go30_uffk7=L`z^F?c<8 z)X|yc!}Q?wtJN!$zDP8mEBjs6lvnn|m!ieifUAV${JW10l4Jn&5o#rl!G%jtHu;l1 zY3%jyw5wh!oRk?|{KzSas_i`^G8Dz0kT&ghYt2>IML08WLD$HtS*;!)u#3BH zPul5w2_{oi=Z=+eOAo}QLcqQjGq|nn!JD)F#%++n0#l{(sg12fU+$;oR^`vyVPQ11 z@->jLM>%jSbyp?+iUEhqiur|Hx`pfcFLln)9f@3m_dg~T-{!uTk!p=Wzax_ZaO9Kz zLbE=Yc(Tv{Siza_UXfX^~}rik}2Wdi)$<&r{4O4rLEmfQ`IKB^?ip~zdO+dnD& zuSkAezs*uV)-Q4F3-45&JO6a1|BDg0Yu2(W9m#k8ZwYqRwZfZsoogvR7q|o;s8F4+ z`X0GF9hi@`fWkfKc6*;J9koyYefk$t}__K#V-H%NrU0XP08RFI;@{o;uVK2 za_1iYyIZ)l+dZaFbXUHzM7|JFZ#QI47rZuj=ap;o+@h$I|7nN6=_wbfQjy4-U;#Yiy%m5S`0Ao+g=P1c_I!x$+XI zxlP19rW*A_=1$W;;_!RwbFmS4>Z}v2j%acDv1hYcO0cjWxf60N*Qla*^GBlr3Uv-7 zM?GqnDO&x+{aakQCQ37H?vaec2{rr8EzDO z3KiGU9Hy0{E8|Irgiw>eL2@>Q@KvMrlJhh}o;m&RYIb-)s)s~|cRTRIx%N!v7Dk0) z(p5Zr|FuAGT@)N|{|+tb5n%6*RN1BN6fCqj-1)W3?_ZGplsF~38MvGWIbakvtgzTH zp+Z;^MwPt5`X8gU{ws6@^sK-aGmoP3d?c;fNC!%C8+d*S_{?O?SOOaXc11Ae%|;PG zz1u(c_cp(Rb&Z6n`s5bn%ANW^+Z*|T2S!LK*M5BSR@6t^b)FATv$}MdV_M(EjHC^4 zHWDbctqPET0_u{MPl^l29JhWP5jD_xdBzmFPl!0{rQueM(Xbu+fW%U?aRZ`w&Q}V& zISZRB;z%Q;4}SIODlGAwUX310J_TC0{VhykrN+O?0~s5yW*Q+lVPpoXtc}&*jtDhD z-K;h0sIKmMXU@uWIZZ=99Uf*1Mu6n~3*SyM;PNox_h&&n3m!b1&^+GHsQkqUS~9^< zqlE`Jk7Dko9Vxig7}@1_G4vNTd<6rJklpw;s?5dG^X&F}5tF_PczrX4_QRsWM6ZU1 zI!vFBaCh)~!L4!01qNyl>G66hzI(bb5r;)N8E@6L$63At9idr%EE zS;{8kn%dNR!L}tXhCFLsN{d-LX;G*6&bi3oLXo~Cxz?rpk;A+FKaqyhWQ0YfPky)5 z&y<}_`ZXEy_%D{>khoX=hQ;BhI8~le1TI_pO9c*v`T`N3ED>{yolWRV+*+xeX<=Q9 zO3(b`D1$_-Y;d@Bsa(cM<(v4ZDvA$lA`?f^ zyaM5&VZlE9{3qkoY_xH?fIuB zv1EFvsKa#)c#Mcz!9JNC}HE~AaO6F&U8je z;rj(&)3=1U$KDZG&|x}j{e>=8BF*N0i+uT{eWei1Vf5g=f7+j-I5SWcX3z>T2`_VY z?$2nf+XK5*;*Ey~(~j{1Bo{;e zjjs3J)J{(L)^{&oaw7>GYcvSngOon)Q~YzGcKpf-Q~kxonmjGn1tiG#c^22S-AAjm zn4{saT9I6%sF#`!;rgFLd~(Z$+R?t(=9^{$cifi6iw8xn7+(#MtRi7+ABTrIgniS9 z@8yUEb9K+CtwFv7^}X2A<{#LD349YuG#_ch>}JdEgV!F7ZNC4G@)JSD6-~ON2sio- z9JRIZA5U83ITOkI_RAfh(zO+={m88v%6U=8OY-W8n*wV^QHtPu)Mo5f1+@)$9?0rS zBi;>%f5tcV&(l;d%yB8elM_@vZw{pRv4!ai9U3RiFEIH#emC5HRr3=d#(x-&V zVouX5V(GuvA4E@qll~FOElk)Lk%!@_*4DXdMY(3<+z!Of0kV&}{HfFYiwEv%N{Y}!>}wVDgf)!#J;;kstUr*U-EQsBt1weg?)gC9h#Y8k&1vE( z-iKwWDxAHAys}FGBl?Pbo2@(rN-L9A>}_i9YXOABQFjM?9fGxVC1xZ4BzYrcnuW1cy??jW4?@`_7yxF%M=j)=`L0hO4iMSjB1EK(Qq5QU zX%9<=*JZ5RM-R`%qC4I-N@NY$b%poY8c6%-=Q+x*1o6a?_zH;n2qI#;0P(;w35;dA_yo5BHhy6-IpSzFf>RjNH<6iAR! z-NJrd(I+)Y4%OEtByM-)ta@|DCosCy`!?9zzV_F^z90wC)kFbh=g7 zo3@r8AdXU$LkDEfB39a1Dr{Js1mD#{`bcc5$1~i1{j%&g7%jFVTJ@#;aVFv>YQLQ;pMNB3xFpu~ z?^ADoms60Y!(CGCxk+^BHHYTtZss`RixQ0HTYTbObJgXM89nVg>f{?rTrEN-o8WzBc<0#D zNxG^%XkKOz(hKd2w=ZXSh3kDOWLIfC5@S{{7SE9x8aJFt7&%E zqI|#b(sd!7a?F3_PloAvQ?>iXpyAKhmNwV~jO^W;33cqa5e;Gmj?F{3SPWi+ciGN4!;CP`4%b z8+H;9(;V&{ZkMG~qPK;={tMdWGdCWHDgXW5{}5RIr(NN{pTEI9E4EV%gDUOsILGz< zJSPOOD99Mz6CLF%XGgs*JZ+1sH1=3r=F2t|1gCKN_$R}b2dHGm)%d^=sRvQWES$0I zmC_J~2GYkuZvIaOhIHLssB0@@`NZVBc`PP#R8jtQ{f5q74vSyO?=))+k)yzjcPn3> z@l(}Y<6vQYCHeLN*>!;}txU@~c|>q#l_AngC+1^DH;<`0+HlKkupdD<-;W^saaVZ| zL*z&3Mx^A@SVXRTeVEFLofbmBfZq?4!dT%NLk9<;aAAL-K$k-(Z++pGg-NL>tu2zu|lS zb^6YQXB+k4+spK$IKX8V13d4N2xKJ(RmR0wV(&Q4SxLSkQqRLnhM49*c3r2F$a!f6 zQM+8*TOGoBKifZ-m?j9H^LwD2Q1z5Q;VxdG)i`6f_4B!vCc)j3wshyw?cw$w_k27B z2fiFH3DakmLhbMEYvDuhA8l0~S{m!@icCnq(uykR_ONox_XOK~OL0pB8zH*qIYql~ z`2zVCi23G@7v>g(16darx^``vThx`=a&;_k4WF86-s69`WTZk4)6n@1S78DU=Zd?& zPIJrYiM_;&O5N`zO8bnG5UO{E^LihwDRt9#LS^(Tq$plEqs7EoY5wa^vR$UFx``A9i|kxZcbB<5ug}bK0s^5E9yK$KBRjhv zh&xB?5`WFao94~36W-rADVw30{wI33&jekja44w@<(9Uu7gt-)nZ>nkZIPKD(pdVP zRywo>^vIzt(+bJkDlcr%?-kQ+Kh7|AR>9jD4?jG?SpQ;|K8V!(KH)8~;6!(Xixk7@ zseIzjkk?@@DvTY?rOyHDf|(>>qD@CyR10arjrML(K2Fhou-)RU)kRWOJ0uY8G|AUM zaCizN6c;!JX@`H*Gu`ECDbzI}A>YEb8ege^ihlRWpvRVnpF(+bHVlHv%G($cApX{ZheMZcNoW{c5wYVA)`4G$g55sPMm4Ee26DO zFq0-1D7>fU81;!7=dD3;aU?(9o1cC3cAGIDH7nc{0J8#*WV5G0q+qOSHI)eAh!|t> zRbeA&JmdLmbgBU~8?EV*QqEaKDFJHTxF_%5y|oo7EyA-^<5qO?Ab@GO7&~`4+o*^z zzI6sYw#1{~Y;f!149hi?l$w+LVRE}uxuBDnQ&748TbnJ#I#s^AazoWQl{Rpq~=@=i`(g79?cY_x^ClI8%I-ks9MLMZpq8YD^;fB zv+ppgq)LbTRyV|TsV2T#12}%bRhgieCgAq_>h4)7Q~2_YGFN`ve_j(U_=Jg}u}%A)3F(z-Kh^6qq3=#vuc;8n8&yjOF1Ej~ zBrKX-D4-ehuL~Iz(dw&Lq$^A7k+N55R>qNnb zzpVJ_Qn5RTfBo&Hlw{$g3AiVS`~@Kg?=ei*5QYd|Tbzz*qt4uCN_>7oA?=NKz^9X! z&{wEq1bMXNQGk+Pdgp+aNW>fR7vG}K!-R|iCwsub0a|++%?g}?akueJVAjo7WLq4+ zJ`ZD2K5AZ`?oBx8)f0*Nm7E-7{nN((i8 z-i93?gt&B_9=S(l)<=8r~QfZoW`LttwT$yR*A6JtKzQ@yN(Es%G(Fn z(DF;gDn={y=O524w;Vg=ei*a%AdZ<^SdP|q*6>?7f?58)*P^AVqTGfgBv`WwX`5rN zpH5l@FNP8ntR?AV({EPGOq5zUR)p6ZH!Rvt_}ZE`5?|OYI#0STC&p~OVLE!k{30~EYA*L&fK3# zTxh}LUm|+=ZitVwV(@!L*mz3$NqA(0j`6@k-n`Lo=uN@R)@IH3z0PxJf+4WQHsw-v zJ)U$dKTNw`=Oe>sh+Q5*ZV>Q89PdDY^NyQj9n$^~uR_2ff8tfE0GLkz7;)PydpA!y zYZqI=r0Jcq$b1HJnY_h0f}r27-9$an(UGEd-}$?r^6J0OE)BLAs9!8X&hN3aw8Paz zqMj3b5sq`L2G`hU;R9I9)op7z;Y_){_p>1bjTx1uduRPwqfbh=(VG3(vtAJrCXlZ$ z;7+{bc2@;nw?K?Vxlxp3jYiG<$Ft@(Q3beRGLc9%l5IUSGHT`QMVizXSB^ez@lF&8AQ^ z4#5t!;{ztoOhw(P!%d!vF@7m5itFM?fq|Fe#_Lxg^|_xiSk)pJmjVu^LMNxUa`b8M zV@xICY`U)$?5a zt|`6%{sD~j4hBKRE&2IdZZx08E#^Yq6_P5s_QXX1MTwJeqJ`7pStMI=I}s^G2T3dD`{S^z3wgvE$6%iO_#y$LVrXTmVcABRo{hbhlJ z8EFJZzMR&gxKP=?%gUdbWc#khLoky#mG5f9OfJVz1s~4I@a=dX!Fi|LVSugf>@wHd(zXq0V{hAIY1Ll@lvBwM_VD)fv+H&*5*0x2DjvtIdlj}qSS5t9RjbI(#3TIkpf|mniV8H?(X8UUM zU!^LNF!ej5#=a|oA)MREwoX8Ekf7~BCfgt^-vWp5^1>k3X8v)sda2~{$s274W9e)i z+-wOYW)`AD=$pVHPe-cfgf&NQ+Y_(d5we-;Oi1e3+eAohes&w5mlvbV0H>vhd2KB4 zHq77W)Y4#=24@FNZD=Adt6b+pVachI~5sbe$mAn5oD|tiChW1*U38ZLcspoz_6`eZ6-&%(=KgAba?$aj|#7y z&A6+_;8rma!jBsZPPU$8 zn>+{Px7vS&kQ8u8xfYd~2>JZC!m%3Z($;-<^hvdvMNFB(k6A~ickpg0yYc?}PCSXS zM?d*kzA7{yE~%}F_V|vpP&H$7R^|*Zs}79HVKkH(#5IA(aWJT<}Q% zkAy2dHJd|DRg*JDVAB6$nXdB`rEQpFd0}Z^Ocg85s2>vk1_&V+U!4AbfA{~L#Nw{Z z^3U7__=&yDmuw0wi2-TmzatlV?rKIbU=r|7m5vVS)(d^3^PKC2J{5C!HoAivb|LbM zvtmi1{HV*1pY(F}M*Yau-5H8{8Pu5L`p;n`DUp;jzlg+!t==>zPjp+2#GW+t&49(l4KNr9Xo=FgPdKTWQ7(L+fmGP1tyog+6j5p>4~l|{`u z)i(hC002NzDf?d@K0l2PDe{+lod1f8qVvl?SrYckhrS!fLaqcO$;tebfZD_dTL{zQ zz}LNDU9ouqffxzZy>Ue8Nxe!Rr?~CQ zjAwIuZOyq5#Wogq%Vt;yDH7BJ$&`K;51!5FN?J06FqIX$y>+#1+wRv9fqTUU%eRRZ zo+IRa-i6j5$%&#gtZJ+aZbL~G-2h|BhYU}r?Y_^Qic9@Y>=V*=2-D4xj@9<}egwih zO*hbHq%%q$C?jE>sX9-WsDmJR8NZDQ`|5?7mq2HZex%Wy9FJXOL+Trmgwy_}{7>Qc z#>~^>dfk$GAJ02gvE0TCq|o{rU8Tb^J#(KiR+@?7!P3rEY_f%kp>J`?iD{N1E&!Y$ zbmofHAxK=st*pyx_$2{t^d4fVZa&I$?kTMqn*;fLUf-Dm%%qgq?6i8KWww^pV#90v zk0(NCu>b6jDWU^+l5WEF7M&B8ruLc)9;e-PG~!jq^IFaagiiD!vmOE9;K=w;{rvnM z4WnVxtM;42F^+219}MM;qO3~a_OLAhDdk;7^knB6iga*XU{yPyrP9`-TT#tC`pTkq zFObAfb^8k+t8N6+StI>bH=UoQ68E-F1*^yHo#7*6^YD-pggZKGVbz*gg`cJR2mID{ z<@P6goQ8FO@jW1V=;!+wS*BvCLu7QpN8lLhn7nQCYE9vJK^)IPdC}gFh&JO~cehM; zo?fl>*D0{TaCl+dxTTMzbUke}7QtvrjM**5^SESX~xfe}HO-{>eGbVY~FnEv07Wa1d zoAHxWe)E*oT9N0-%$Z2GdVLE_+Z5*5k$jT!>lN#GcEgz{PqeJR^rKPU5lH5QU zI1+jbH_Pl_MaZB4(Vu(oibiTnR`v6g%w{NzGgXTu5M1Nh(vF6sGWzfHh69C>ZKLER z+j+V=cNm!VcHR|3mg9zses*$vb(*^uBO&BANT$w`B;i7=f`-wBMN`RA@Z z-P)ez#RG)|*DPndh?J$ev`^0>502{l;|(+CuIYMAJPcJK5M)~?6b^mC3GAzYfv~!d zeQ`Go9uB@K=gjd0Wj?QeltM&;SV5-fs_ENm}jTEE+E#z66zt=0=?AKX^H72100&RvmW^)K;gmoO_lO&;STri|jg@QTp| zzV@u)V+5W?h4xsK+5qw*wZH0_o0)HakIn8YK?}5V6vSiq))bRWDy^G%2G$E}xekDjQhMzXk9;NEiYsg#}lEN+v%x_8Z`E&%SmK|cWm zQrZ`BZ@YOQ9I{xvDfw^zlLV+9UE*8vhXiO0s|G-DEm2C&#&;l0W+v424q^hx!Z!z73rK*8>rCjm4)Ko?aY&pT1MAa>v*Jg1A z2g}uWZNc?pT@*R3dW@RV-s}?$ci<8Bn(N^w?c@T7VRVC7p_LG8lTZ175RMu9_Ag!4 zdBg+zaz3X>%ZOuQ@Scq)$ClHW#9_7+;k|^7++hA5$;UKTOt@^<-goImrg7D~3Ea&n zJ8}$YG7x^1T|m~+6=?nHa=+C(PeiVoviftywhf+0Pi@QCKGc3ZK+!dTk?=bYy}tfC z4?SXI6hKIs9&XcC@~$Ebo2^Nazg2JHyB(`+lL_hm*`qcd3PNzK{nPL4lpllg&n)#R zy%8Ys>BaHqDL8J!Y9A=(4{JbL4xKVzIAo+$fkP%`s!JSJN>T7N=?K+?PZ$r64g3Znj17(G|K883=Zsx z9Ofs=fm)aQy$9T5tGdWN_agnK#Cdr;XkntdfBF6rv32=Vuv)XQ3Hq!*)y>m#G{F9i z$GP+zVx@a7;c1Z}kbS;T*qqwM>p2vf-mn+ikXojm7+WL2qYW@D0uKAN22UG5dJnu5 zz+)o+rAW!DLZLMFq41*WXvt#Z&W%izv-YO{dDg6ZMV~lX2Adt-_J}?2HaZ*<;p$e{HAb`MwF14j+ONTYW51MMF9|UYbMi{HRB$J8BU>xN zm*P@Euvb{i)d5SaK5EuAZ3ip43@Hxu&jHt%35Me^XIHyj19(#Hf-c-TvcKFq&3$^A zfq;>l8U*CH7gSD)>!>U;uL)s5Z z@(WXtWX!=2>+8PJF4>5S8ho9G0BDF1f0r}HYYQ!g$1Z{?O~+<3Wqj673>=+1IdR_t zwXTK4A0E^WqMEP)quB7{R-4@2F_t@6xp{e_(|t3#Ab`2sJEdBMx_N%Giw=rn;{E=N+7 zBK4Y+`?ymvZ3O?Y7xHNV@5o`iVVByV0qF}`G#1|kFZ<47R69xKuXYmu5Y_$4UvOAg zr+?cAUbDK1E_IA?JlE7h0ItMi^Sz=2GB3+nJ(`t-4;B zlo#H(s_CJo8aq_h7YkFVTVhPs0xR+BmYYjyBhfX+K&gFbJ{$+vH&}>S0!N~JjKnAh z-a+kB@-RkV%k7$7xUA9BY;)4^991wtKcwF4W!V;wQdF1@q5b|eJ12!{*ItE|ro6ky zY<(Q`Ja1;wW#Ur8_=NP5}1Q%>_2Y)6vhA*X@LL?2cBT zYY`n^0be){@(gw%{Gqv?LSo=Bw#4IWm77q2~rAb6QTtcMXW!fN8`U)EtfbL z*#z#b5=O~MG`CwA=MmmA4#*Yw72>MGjp{6q||SIH~E zmX3LSfq(J!)J9itjy-kD=g5{*npEUGR#Ev-i$AbWw|8Wfyry<%*fO`zOtqWdpRwst zZyx@VB+@*2&<#s{f6(IMk6){-1o_#ec{!BfI0g=5Z~k?7eAF7-T19Vs)b+^Xl64&S z?Fyv)?Z#r?_4(s0#p~+_xLT8~MmILDQ@-}8;AWEkV>qreo}igk`hJKzC`iw}b8x!x z`E78Owa)>rTQnTMdAT~=gvbG0?y{zT3K{)m=x}50$Q>jd4fn%1{G7YOh_gWA0g+Xx z|K@5=@&y{Y|MNi(dYv*E0VdzGyl;B$_^&;B`Q~4J_nwgMSg-imSy{6;q()zruNxQm z?^I{+tIBf&pW7b=%O1U|XFy#GCoHwCs|riSp#O=J-rW&B-|yZqV+<(KsQ5n5e)0Gn z2{;W2vb28ei!Z^9Dc5l-!ZbRM!!%?y*A|enGg(PB+>- z#_`1N&}7ds2>i7;Wcx_IjR0IB1*r9-z$82EqSjj!r@vfRQRN zkRA~O;A&}~j_){ptby%)0%NC0ND_zu_IWC@X$DwynRL1@(hB(WwR^rDi_H4Uv)r>N5U77uUEi;K*QGR?KNdAoGB z$MNEi$a){9DFe2%*0njJ52FIAzyh^nc@{zq8H|Nlya^6Wce-K|%Y9p=>MCntFtQmD zJM9^y^e?LVvqvp`2}f(}<&$Su^fQmN@wCP{erkU_I!bynn_v1r1q9{B{{#d%Zad!w zqZ?kY;kdoj8dGA9IzH{>viNPzp+1?qSCQvOMNoGy^xkz&$!hbs%WPbYJIibDHMGp) zxFl9rp%M?H(x_%go!!K1uoJ~o!cmf1vulB>Y7uD$t>Kf`CL9N5D@1FwNE3x;5|nQD zm^fy^&0-C5bCTThK<)eF!FpXhxegYfV)M7|N zDX)M}6`)p?$O5w=MHb1`e-%U&GwEYI|_b~HP2hEFOF zNpP5D68Jh6KnK#hL;ldX2W~ayo<8Iq-f3wFO#h-fABaB8lgjMPxC2>1&aGT3pGsCihn%_-44b6X zteo~sZZ5eT#j&wTmGGMWYH{3rbf3lfMfXNL^fEWL6Af}>EH8oSoE!FkGMy7O0(8%? zJ<<{8UK@=RwHg=*>YlpIqX!SsU2Ey;+=2g;gAR+I3rCTkAbDqPCe z1yT-bg--2;$L=%$Fx%*h2CPfW-mbyFHiD%tc<#0ZQV~KO?9qz_(1OZJonB?)F&*@! zCQu3T#^!v?`~4CC$#75f9V=hf^Xcqbkl3D=ZMP^s7#KJvw8dq|4*S^$Oua=GWU^c}4B4q%bSD+$ycm zU4(@FGlV8T9^Ed~ot{Tv&`bi9>+N6$FIcyK$a?giZZg*@NltIxYN3+FpHaLFJuxgP-`dKEh&9hDhpPhl2)rJ+X>EYA30*i$Ww%5Q_}#t6eODqm z#>m8f8&`gOzb>Eec*o!8PwmF9QIxA7Y$AL;O&)89sC$MTt{2g^*VM%9F^+p9tS^0MZwSP|#vcV!q*@i)7VGrrf0$hyZp}*uhzL70$o-c`p=5qRRw z1PiXwUa0CaaC5^hJHab&^o~PW`6Oe1;A?T0R8DUZq3+D7KkQegU(iQ15>Y+~iX_OK zKTVqq9BU6EsmS^8;e`#Hqq+MXNrfro)lSes9D8H0XDGt-nfjNRRb=^A3=mtltBJz# zQ65OgC^rz5BY2p^wY^Ke$qtyMI7$-~X?ic_qr$X*lsl>Q+GtiXiF@p5vz?)0bmnI2 zCugX}InAMV+w$U`@|9|iF>|$f=b-=%J*$f9PG|YHg6O7_#7$`Tk-+{B1@b?iR&Ogy zXj_Q98qO}NKZL7r)eP*Wm-h@ogUF-ixscbYAv66}@HSwSN0P=lb)@L8s_7;U_CGRd z+HiG;8smO<@I3hHReJyuck-#-DmoP{$~wG~I{xyT37p&$bN|U86^Jl$J$BfpmhEds z>RDbI?71yNY+2*G(HD*`-^HM+d5G3ip45R!{?2h@j~)R3Olj#d#}(H5eu? z$H!51-snA7!~J&She70Cv(N@+pj*m6DHN~|B0%wn?j})J&(-Tj%lh56WrKPB%G~XbiVXwKBJV@*quYAJj5t`OYWD}YA^Vhr|a;hN( z094@JcNO)lpuh$x{Upm_cukFHdw%ydtcb9dKBYe%1~f+mvu78Ii`CI%Qag~to~8%S zi}vl52ny`MKX=Oh@T5Vl2SogUHxJ59`k8ma#ra41u}2l7jfH=c#X8M`v1a8%-(0Jc zzX!di$Xcy|CR@FHDKH9Z^jc7s)CYW6MHr_zI@}(n4lf&bD{!P%5s2aZWlgiDP-M55 z|1irvw%cm!sw43|QS7Bfzb(k2`?7G~nIFU?E4)!$9V=O<4|%e)^~=kjuNCr~0!Z@* zp#_~$dH@el49xmvh-2igH3-^QksvD}%oXa8sS!I1o<_i52e({@c$?h93kj0w?T1lU z2+RA7Qwcv3R zp;QM)AR+)QibS0?l0oo4on`+QVSqLIn20u&8}G8HYe*mAqvjYocjb*C5TZ|w9lMDC zS*~QE$^Rq%SITy;v7~yN9Z^K41Aj)tUa?WgUAvpYCfj5KOxO=j)>)n)gCb41uV*gm3M;2{j_}P>1iji()5^F7YD>cm@ zhRfM=73@Odt5~W@4Q1@Z&F4B+ITlTb1}pc`D@GfmE%tVUh)Qn12~gAC`NKO2W7Z$U#%y&dgGghjN=k3l zd&1_I?j^^YDf+c$qyN6o?l8lHSiI3^v(M-E zuWwG-Mx6J_TBSbxQt@_!YimeXyJ-`X)2q|i!)LL+P~Ja*!?I28FZnuJ-?UKruWyzR z)=NW{yjaHq;0m2<1}v5OPtTfV%5H55Oy@SpH-PG73LmKdeA4aUa*sCY%e)}-bLCk_ zYVuvi=YSgkHKu2IucXe(lsQMkM*RbG)MEL83G8G~@z5~svUb=s>8D{qg@GGf{l%lx_eJ`TKvWmx}K#dXWwNE zvHhj05#O+cLysjW^r+1P1q@YGJhmAOp$`(e$;TXhK)->;Z&ZOB8PXDPT}b6WE5#!7 zI^2Uk2JzbY&Vp$c(v!F%ltP)hn)f`wD^pi^W9TcixfSsO&@jRMVy-z~l7nHCs3be= zy)zr=ASmX7%W{?qq8J49Jlm3fmY&%XsHtlPHFX`H!Ofz(HEaZjvp8cDz+tMj_5m4G4x|mVJqK@jUh=_O<*_ zE|B|vOzf)*uw_lSwvVBMMY;(w11QPc!f)4agDAqC*Rldu#I)8eCcgReaXNRGuQnTO z(~0t2I-zAX`RL_XEwQ4EM;apn8M@=KQX&R6mhe$5{RYhtrrhGJGx(8?ly9rXAjxnq z`;4SEkd<_hKD`4A%V)Zd0ElV*kylV~&?DF15n3x|JfOa0n9gEzIMZl~Q67@|wYB}( zGvh2UTLwt#KnM6A{WNUStycy)%%N@icNA*C7>mVZWqI*hFg25stg^5rE!0($V2-Xv z3o^>)>WLC$F`B#g1ryN2A*+@lgKb`4SjMSbElJq7Tj?*i=-KbV7X4?6&F)t>mVjTB zHk=;RPP@R0LfGbdO*UD()95Y(5Gs!la@dy>-S)qP09lPYyakZeV&35;s`>!n&|0$A z)OQoJxdA^zk)&)ofUJiM{;Fu`AWE(RSZ|%X~PY56C0niq{HT(+%Dq?r;a!JBp#<3 zIn2qkO_}7JW}Y#z9-rn)%ZtGW6V1niI@1JXUq}^b1E8)<;@Z1M^_3wAr<3KY=bj{j zxnc)~;)sDcMJvAH#%c}*(nTe)RsTpFu7bS_s5W?n-8Qtae@E)-8P(etbNqyz2=10?;iSH8V13;5_3eN$b;Pl+Yj- zQS0-`qi;>*c{%6O)_3i`*4_5uJST7d*)krYY&uXGl7^JLROtno;wXaY3%K$Ef?VS@h@h2C|&!5mkI=CnVcBm^wgX3IO zovRJ!u{=7iSOkP6-SZoL;>Hbm0iIOiu@wcV7dqEDHN^hV(`_(6Qa;7}kgm08>Jj#IXjg_wvp11BHuCWPcwrsb~J+bgm zW2L#_75|#%KrSj@f&nDj~6_RY%+^N=*>CA)=#fo=d-IPE(c*!QhQGmDQ2iD^q z_9|U=d~Y#9K_JfTNDFJoiHLoHL{aH7I!P?wILTChRh1jKJ_SP{z@smQy?`@^oTmum zH=pcwwcHw7xqBf?cIU>9w4-DxUX)|BxiLNjrdNGf5E!pmE|{efqCQb=($W!RxZv(C zDY1BSl8mbZo_RZFt(yZ}z-AF94ujS5QNbdmTk56j-0)EYO|JE41J09=3Iq3<-o*!X z>uH=~Iq-;l-<(i37^MUtZ_Uc=QmQ76Q2RcoD(vl;YXhZN3-c;!yFKEgJNrUBAyBsM zVtzxSeJE$NT=RQzic5pfnnAhb90jTXIz%4^z4z2yY0Lf2?elQE_i)&62-PEo5YlkG zLe*0n&&#+;IRTHkY8zP#?pJvXj;r0}O|GB1X1A^vN6W=!|1)MPu&9wjnM_J^-@K)< ziB#t=&i=DU1y(C^fFaW_j*6Xuo=uLc(jpjoa&^atFU48yH4~i3v;?h_+*=L$z8REu zv}y*lSSI~Ro{lFP;Dk01NvY9bz#(YtE%@R1297_b(R#FdO_~EYx4!d*zOYce1MIf~ z%$KdP(;~)OB>eGWm@+M8%9>)Xs8#pIno@<{tQe7qlhx=nmNoxlwpcrg1Vl9)W+qg~ zA@yhVJhBI*5GNl_2OOh*6Az;;zNFfS`dVVdv-qEB%<)RA1oObWE5##IPW`*C+=iPwZx zog(^TltL7ou!7-lHmDXdEyke5w{fA?YrrE~8+wW5rZ1e_Vlt#5w-NDQN=)zOg= zRVPnqRqj>CbU+e|p|RCtA~NKKajAjvP7yK!Y!v|sP-}f4Qkva%guZyjoEO;qOfCv3 zdB|KsvyhnbYr)n_fTCddOE$Uon+ow#aLpI{pn8Qj4EW3aXbeoR)oqACunkq$=m>{| zTc>m6MRI^*3Hj8W^g*uhKSqK&G_hGrPk?szfy+tvs5*F9iSoCHU?#;V1*_aS@DhhQx zJZ$?Qy>%7UC=B=)hVbkV-&nmcuqn(#pBB4zc>3s`s1WGoVmt-8%i$UfVZMNzo89)Z zbmeve30oSI!cDWl00WH-U(Y(Sr=ro`x=>2XyV=r!r!}<{du(8M3Q5k!J8JdFx-fHl zIzP1TTZNCcsMntS-mI~=S>P-TjJsb7 za`P@!Pll;OJ+#AiI*^5c?jZsyxdaozNg**O2Y)m^*C=q>AwZr72C>vn_b`WF@$|(+ z@b}tDswfJ_eogWx#;vK+;nxg?s_;LjPKbsXqwiWab|N!wUqfi~hp#g$cQ^a5mgQpv zUem@a85kGxTO*l|+SJ(Yf8N?R2z{o$4eXW{5CjF0nzsT`NT}9^`xz*T*%I4m#7g6pBm^u<+H4>5ExU%O0n@(C3&qEjf zOSq6NaJLD{Zm;l+hQ4nEG!OjN4r|wX3R6VNtX{r<^ziuFW_g$en*wpWIflYl4B8})%7wtZhoSkV4pakY_T|7I6os60WjM&qPTcXofhbrJp5F%Ez9T( z_emW!WbUk_Fkn2m&paR+goRh%N#ZSJhB}d;WHT6cE5(H2OgtVx@t`!s-BNZ%0YrW# z3OoZ-ZgR8slilFZRTCavY_q5}QU8*fWabnuGl5^izaBP8RA#T}|7JVhXjPC}53wX$ zv7EUO7~NM*h;n<-u`k$5f)FVa|8?2K ztZ~`IJa)_C%UAOlcux1A^Vf;Y= zmiTyM$1J6>TO^0cSHx$z?NS?T1+K5gX`WsUi09JodBWWVTSeu>gSrCLy4Ne&MgI>*9hV$@7ZVb~Q3v`J~3@-LXG+guK zRSytOqwayjxF8d(9pxjutu`(wrNI4w$ql8MNP5hBQc@y=`wY6^$4XUM3V1X>AFnRo z`QzTaWkZ&Y8d}XI8}O1__zQNsKK;M69(k4EE2i}pFLW&QabLOU5FL+LT5Ef%Qk-|p zmTytnzx#Aa4H^HXAdDQJ<-RV{@zaoYf&%k=gsr$ULJ6I|(m66b$cRJZR z3UVV+oHRUfN7ENp6_l0R!q7cm-p#evRT?v35$$n#3{>>5b(T6(#uDci^+%*|_i+ah zYE1txOXt6rI~)H5nwe9MDlvYx21-y@ZM*9-7Zc`LX%1Gdor_V>WchJa9%$jY?r;#* zVm4Lj_O+9#vUP6KD3C=S8hB&Z^nw_z>zL1Af{8UaUt<3q=>#a;={J1=%L=gDJPz(7 zv-rKW{|RJQ>jTC6tz|mAW0n%$M|bP^ufy>J3-YFPQlQqA51XdkM4LX> znIxlkc(^6fQ9mkSeN7kMIIkm}g6;0)opqskoUw-liS{pU}qE(o<_ThGZu>KD=R?KJnpNmX9+T8t?cqNGvM(NNT= zP>sTy#F@fc7V;QbontKzYpEypZ{){4s13?n^dhXP&Wd4`;LwM?9*Q?AhOfls6G3km zY`M>RAyeUAUHYJ*@P+Y=wpa zzWq5*@ZAdfL z?TjgVIra7E9tNL}6}qq(JR<5N9mH_7_R z$4g!yRL%%~BUA)d`b$ywP_{R*juLD9BDVuJrXHlNQ^B2umD1ik-z1a5>93s|3ZjX} z+Ttsi3rESS0)iJMz-&vuX{8-VI`Uu5Fz#+B1s3(iW$<^|Fj%@@e8GtRiC@{VS9?ya zNr0RBe#QEmEG-G})%lf#9cu~)%tc(V)wslfEJ^23qL5EA_|G`BghV(a>8^FC)=#aI zlE8n=p(7#16d8KDlrqFR;a(;fnm8(-Z4}l3x{{z5D2|gTS{GaGzv-*%qU>iTH6~G; zbKs_KblLq9X{{g$JNK*SX-8n{T%nn~*Oe5YqK4InjnZ6CbNw&tZ{aIQe7hIK@mME& zS*jgv=@Egf9}lw%Pn)n;brt7XnQe_l~{YkJgcYpE*4 zS@t*D=sd*L8gDe4@Xnd~xSvG4hXVd6*LvFEjdpi7n{i+r)1nT8f$N3gx!k08Lj3bT zpHi+9VNsK(P-o&h9DI#)CR{%Wkb`=K!df&r|51LsL@$8+s$5|a3S(BxZLJegIPG}( ztX0El`7-l5BV2RQoG{mRI2E)lKIZ+M#$GGmC+?V zMuEa}wLpsdngzVE@QWBzZ+yzPN@s~$YqR~U%1MQwh~!@r2RCoIU&SgDvPQVr%o#mG zKAGRY*sCkR3&T;X^CN5YS2e3fPJD>` z6G-bxR=p2O17ZwX3X*TGC^4d*t50!cm1!^N`j?@2=3zYDA<1xT3*Lv+_>Q3R?=jWP-LE|O^8(vr3aAAI zAsxpm4oebkBCSLfe(%AqeW*rG6KvYy$kO52YIho` z-hlQP`|8Z6*R%xKSGAGf5Pk~le!j->$6lGVCBr#76WPfxxZr}e5{g}|af7uf6Danq z5sE!)(osX}>=C8NbcwQKs?d3`!-puP*83GQ-^>A&HkPL;kVN6Uduf)<{H&^Ye7M!M zYHUGDAOyAOScuUaNu8_t#3_7yx1B3@lQG-B50&>WCjtE;pnCLL*|Ar_Qd>yw?Lqu} z#u9Wpys!{Ho7durzhsTW$GMT&>TcuE zIyY^A#@uLub%|+PPj(5An|vJYFgxE^GY-Ly977k3%_bVC>+_@pp{OC9LVd;cgYqMC z^GS9khtOt3``a!bHaopRm%&btzQwYXI)>!MosxsoJx%@1W67g`M4t)oBr>O?Qhzapd}P{THG(yS}4c#M^_p4Y6xm$KZ@Ge z2cWr}$U6HdCCHtwLkEI#;@vbu#Bz%*xL?-{I=leZDWf8h`jzWs5(0x(A*NAsBYiO2 zzTsl2lTIT3MfY*(3cu$THo-38Nx`NI0-d(o!$KV!&-Nuy<9E zv{9N7SOz>M-nHd$D1nEZIG(XO#n^SH?iE>$-euRapVoKscgrY`&uQz<*rGv(m-4`J zDM>FxHmAfnRMvgoE-$xjS&0|8HO0wn3NdrNWf+*OmM%4Towbish76Ged)*yA!l1B1 z1D*`brvBCQA6wJbuN!4)&n*5wqi388q|fyeF1g9U6S z?5JK1B@ge-$|ld))ym>2?7w(kE&&wJ`@&kxP6wyfYO+rN3k8-ro~(J-0$wLHl*8J? zrDyXPZNWvj8#tcxc_V%{?A&hcp#NNf6?-I>*v>j%^OCCaQnHGIXc8+W1bSq5j?$o} z4+ek{));H^cu04IFag+>(Hes~PdJGYcJ6!%>~@4@s7smEk2htRZpuV_D!%ZA1a)&D z*`$GUyK+5yr>Fh}i5N7?=Eb?^Xmn#(1y(!fzmj_APq6Q~4`{l%yyNaQuOiOV(OGt+ z^*ish#^OqD>GxVcP>_(1*u(79b6jhhjxB}fT{lf9LlG4^d;h&IL+IcwpJn=X2dw}I z@Xq(8gk~w-)nGQjuLLn~y!`PuE4)kENt^=nTHhoewb+;@Y->oGA8+)3|I@e2m>8$=>d4^a zB=tXCQU8X}n}SfEnKP*V5Ms79fbU@$aKR{00A_kvf@33H={le|a&y9WXvA6P?khWH zwc^AI*yuU;lISo0GxBdg)jNk#&- zGR1f}k&CQ>&(O$$yJL4|W7Z_pD&(qCHM|&WkZ3yvWs?f^^4j}kY&NNZsyJZd0G)>V zXU-GQyAR&qz@@&hiUYbkwbkd8%$xV_wwX`%f!I#G&;YZPodRH%ny))aHBm2RgExjr zXdSz=SVDD7ZweNw035%w2l>83?&f6@P<@h}yeo+zWSo}|C=^H!|8(sqq$P|fF{Cd; zK41mJKj9LQ!uf~OU4Kp$&ECu216MnAZwvl4d+=e3U+A|&wJ>Xv|5CD9ZXzYtda3KI zKl!aLF?C`X)sVdI=S{6Ivo0TpafZX(-*dbp=O5hW*tI@*>XF-(mrmX*EHV-C<@7J1 zDHrF}oNN@a58YC-4+3N1Y)ORLG-v5ANvlFRnPAv#Y*7dxY7mnXDQ^ItR{4Et1VXZ{5I`&=f@KBO@tu1ZGPtTL9>S^r}etje=e~$ z(E+P};0s&*-ntwI26TDqi1yU*kd+*%V+8`j2yU&Z_52EvSy8FMCB>$WcisCrpX-Gt z2kAHgs<>$o4PZ>MK5Q?s+MTece8oUPl$K)^$-w@?lf??J{l>+6Mt z55+rRDe*THWY_UsK%%-qkeB@RH)H(5Yu(F*9f9B-1kT`fE@D(s1m44?_L&x!`Y^jN z>)&xjn`J!sD9u7p{r^{5(ZIIz>c906LHB=np-kU_Ccm{1FAKZu|D}cC!Nb&dlM_m4 zw|CW{edhu zR0we20Rh5O3blROrI{%*lrx1tGG|?EvKH;wZUF~DF9-f{j}cfdi}3U@ZG*QKLJXCF zq;Zrwzlze2W+W@}+@D0xJ5J>UpG?5K7B)_-N_A$5j*kEkNv){T_q}{fQys3D^p^n{@@SM0mSN& zC;5|M_BMfHHoiSobW!<7of(O&%m8nGIz%>a-X(nKE=rED-gI%=D*P4|UM*bfLsXv1 zSu$R8gpyUb54B_6__ZPhem)r$C`7-|GzKloQ|q$1)a64RwL|6gEGaz7pLtfyTEquT zihK(OFS-u_b1j97AWMz>lb`C(BmQUy|O1?>xb2Pk(L1?%Y089o? zz1BWFNVIwWgNitbe2uN6zkX07W;?9uB%x0$n70-=8|-Fc|7IZP&ewg+A#%# zNH`Fa&@)I9yWoM5^C5Msm&)z6>!`tjaAD&T60CIy=P1CeV zGm$4_T?bVHN1Uzh-+y^-83F#V6D7W6{g`~GEiFlP7}J`cm9~qeR;kLuP0oScP0m4W zveMXq!AMn5YgL`9~+Xp?3g3a=^HQ_!QS(){3%!Aa*2jgT)Gw)0ITB_Q00q84M-$M z#GRS*S*skTz%V?xE~9gS;oghV>c4_K?b<)crpPAXi98LHD&0=$G0|NT?>R}|?zY|# zln|?2xZ>xy59{fbd)L%VNhZSa1zj2iuqCi&BN;*}u_x#(nP8yOiOA^Gyj7vfc4PnQ z0kip%l)PQl=H_Ub;tBqUAm-P*_ z8~Zk(jYHy8VIH@+`23B=Fk@HhigqJUBPA95AtN-NpWq`$h`T^Lu@gh?vh|#u^4v~M zM!nDRR!{Fv#*5H{1(`q&>cXrmrDx{CYS+EXFG??k{t7W{@4|=RBJZ7WxN#!cI*?CN zD7G6AMZ1`H8uC$SuW+iLvnMD9xcjn*J?Ky>y&a?A^|#8^sNZ7n%GXT5yJ>ZATc#fI=Au21t}W2E^&i$lp?qSZPL6N*=ZbUbxh zHOfTlR4VB9E=_N{2sUnU6fE@jrN7Ea=sc+)_A1k*NoHJbW zfjk98r*V(+j1G)?HLv5P^e{*Yp=L4N^0=OB0j{U=CnZJJ*T+$DC_G@ZY9nC3WG+N* z-0sR=aZC=n-n}E}dd5AUF47=R-_tdr(LhcqpeVhu$sOm^szX)HAMuUpogi#n{h?li zVa%J(sZ6}-le14~i=7OMK4i9FQ;|%wG+hi?YOAI#+#kwE9pB=s#P-)sr#+7lffR-I z`;<*h`mz)~q*1wO6-6v|Wlf*M@fx{zYvzo~h4SVFD^IrOC^Fq1^5cIJo+&)lVKGOM z@MceUfjET|YKz$6FhZ8{3>yqIR965`zI9*pi)P{-GnmrL6p$jbfS!$7?C z-k3pN_^M$?KGnAba2$G-NEy-I_X@X;n(SfHqs`cWu#focK~3>}n@-8$x$mdtpU%CT zNN>NbcoFmAUarSpepcG(tiSVNUI79FMq~82okaizpAZ9f_%UHUep`>QvS$Vq2 znc62~q+Y|sIu&27bkjl?sNwk^_$;yu*J>nk9JN)o)Z6Dy4Lq`5rP~8i7fRA(<1JlV zq3-??<|9Y55_7NugNMJ!$cdT1ob|B$QPd=y+s3ELH?v~r+#a+wlu~qOX9enF9vd03 z!>y+dm$s|6zVHvRH=EeGf=vp4&W*1so@S@`^gVXeV1yF;&n@5mOo83w&=jYjXLKwd zsvdV8+7NUCN#~UVGnG#mZH??SEVC_?gWX?6=}GH$PaiIeAwQVknUQg75jX#)DA*-o zM36k0CECQ>Ce8bKXN8I$YL<$MRGk+kU4s6285LhuBGi7ebzd%@l0!BATLgLt|Wl}B2 zGJX6_EJI)qO&TDe)*|eWu`5CoW#eSV!HqzY4x`oMqaN4|nhp+oaYsqw3-X3-5b2WI zpQgIQ&!)c}aWAlje^dGI{-*L@UAuI5DaZ0A=xk~N!%*P|&y zn_b0egT>T3FM(VJ7Tdku^P5D}43c_(j+@l=YbyE+pJes>YvErC9AXA>WQo_iTp5an zy0J;uKa})We>ob9NjtXRQX00AF+=m8CtqIr!&BJdW*a?%9$G@};_V;otsu7M00&!{ z@f_bBr;qQ#Y^X2gKDc1O+5gqb;CczM9SCwBE<1cb$U~LJRnynZCIPpy69_Nc`k`V! z4SK-cukG)0>e-0;07k;*mxX{lu{(_;tOBINs{21Dr@i*|aNY=I1~%7h;=spyC+dZZ z;hJtHFTPXS<(bw#f1EOTO&H-5cq)8d>HQ8h1#v#e1VYeMjiNORR0f7-*2U^p2b+}3 zQzA=|fiH&N7fcTJ1%b?uB5#w>9y2=)}-o zt}$_1_|RCZ!JWwem>)WD?)xEq@exGC7-9=8`=*{#v|ha{a8$#De`-wdgJjS9bLq9B zBt*8bZ)pz5cUbwB*unlv=!lm6WxmJs7U6V65?;WM!HJj!Se6!fpDgj4%bQ_oE?dIj zX|z=EXDgKl=cU`yyaN#!Gj3m{snScgVp6xxi%l-F%2`dbtG-&FO;%iDM8*|+m>N?e zSO%*c>|2`^Co$hrlC+y>GJu;WbA{&Dr!;K@X09!?(v*50YV1|1-e2W+9I6xsD$}5x zwsUP>iK2oRkXmSp&DtsU%ZtwNkEIEG z=80^Vu}4L-_lbkZwyA`7qA42MHW%pIZgE^5-d9|IlAs2=_1!CryKTSMab}0+ZgM}w zSN6sA72fs^ma|2tmv{H(6&>MRn^K}sSHvQ+1quEva&;)_x?>yaghX5)ad>{E`!+w1 z>)UTU9ER8ebb>-H5KFD*@wcafF*E3}8z(7*8Bk0>{N_09fwV|w^qG0b1hukv4&fa^ zcK7q$oZG?FhZp#7G*X@;bvAd(6PSA)o$P9MzcSlVjYnyjW~2u0nXZ;B5-jv>t1X9IE2J}ph&17u$qPV7=!MtMFPBZ`ro9r~=Kd;33$+Ww z5TbSonun(Ew|SbD4Ji&L?a}z)3v7joL!3pTLdT=L_cdia7oJ-0vxn?to@6^~j^5Ec z!<{LtVp5W{z_92Q)_s)=AF%fB?t{;@X(f7nTujS5GQNcz+mn7tDBLNT9KnhZGTiMT z>E(9THK8uP>DO_zd{ITc{#oRctb+4ETsyk<>HE@6I-&P(cD6_}iPp=y^I~z-jN-dj zX~3uRd)ICRwlrYze5lwnBs%ykLLUB%e68u|2N|BB-`v?k94bHQ5nn?sS^dv3YsNx6 z%rKcO)%8J-PoWzPxkaNtPk+3-*VcuwRQVbPlyauBHJax*3@drlM#Zxi{;JfyLia)R zi8Y;UOr4d=irP@kh$dd&6XrwUM+_=Qn^etB%OqlhuWrmJJE$L`_oGg^IBu>}KvMTR zT)C7;R^CawOO=y?o-Fj4+u#}OjZlr(A4mOSq_v>Km_>zh@{*k+$}HLhXw)=_7-`?w z+F$hfHS`X$KXYn-e-ChD6%5?Fx@CLWksx4h1LQBUR4Pp9qK?!Cozv4%=`jEvRDUJ* zxBVL+IBHLxoHNU@tX;RTa?4@zYDc{Gx$Eth0plGY{K_qfC)k$;TaUZ9++EjWMQQPz zlvwSYEH=r`nw!|RanA~W=n0E#7AYDW77KYI_L2|1#3fjW2muKl|ld0$%*&U zA)Vppf9@-uhR%f{JS28!9>nof)D=~eXH4Yb+clAivN{>dm7iPSRW9*9v{&2eP*y_S z->vs+k~5>4evC*z?Qhh;AM}8IX|wc}T;^K{w|(ZJVObJC)Gl$iG_Bx>*Y{A-WN&5a z`a;Xojpk?{41Jz|F!i_vIZUxqO@SnN0Id>*%s8w{)Pyz1%;>>So5Swl7k7+_GA6R1 z5a@=D;8(yG1rYr-n72tR1iwiW*dYQ7QFnkNZ1++KxRk{>9Hh1h%PbylxyQNQ5pRtjF`|Sr8 z&97z>ST!dXS)LDKTy_B0xLaj+HAR>tt4KCTR^QuPMV>ez7b%x?tKVgMw?WQ1NlUWf zy+rc@hPKVrn&hLA6D9IoGSm($^J^PR9Ie}H&`4jq!H`uYm z6W0|7^FQ(47itr;T**aDc6EZ@f4QjlwDlv7*v`s)ncTy%WoJ_TYWrByn)uIy6$(p`kMNto zo;9eGdmo9Z)uXMfP|GaJxE>jLF?bGgYo?(4$g^;HSNA%5 z0g1=}b=K;7`*n+QybTaNL@Xz-yV|bN**ApVNl2TDPBt+>^u)skk&`fE{889L(_L+- z%QtH~Y=m(QiN2wxYbMuV=*gP<%f(w;St605Zz1if;2+-ODZF=WhBz<8FrIU`#S|3p z)cRg;j9mI$9r3=|)a~)~1JaJ#; zVW~ly%&JRlFgnJHy-rbfGKgHXc$XgC@2r`n7~lUD`_M$Q^xUbM$$emtp2IS6s*GjI z$r}xep;WpQZuex8yHSpB3@N*~{4(2rTdn3Ao8w|i*VY)Cz56?&nAL{G=3rEM4@q+L zlNKG2R9-&IX*)_dnfTyc7X0Cr&gZkcxmyHOx=#;2m53bMi;Nl~&j$DUuNlr(SbY4Z zuDZ?!7O&IOmwaV!86Q;$3oJUSuh+WbO1{s*W+wY)1~O=vH`N7lNeX*M}z zXBF1`cvjMa8cTQO0f04{2hebCqnGY3X`4W3`weZo`I`Zaf><@*9OD$4M;9LlVl7iu zP}|L9pwS-*tyu5!atf14A=mObb><{~f?w&O9_IJxC#p{Fla}KpS*~Xy;jxjWU z7iI7rv3A&Af@mh>lFbe|4-5o}A7;6k6vTwrWIH(#^hj%gaS;kW9v5(q6-F^Sh%h7+ zHe@!P=`*Vv#BwD$c!MTBB-n;PH{&aKHImJf<5}e@d$*a1$1YMKk+5XBs!10%9Yws( z8FxvdJgF4)>Q#5|{uJ(4-T`hBL*!m@iw|(l$tul?(~gkd`V#@5bTZY{V^x>G7^hky zLk9`wGSB%2oQ*@${4g3>#77A`oP*l*|+=A0ZeDqt`ywv^3Gg)ze+Dfk9L7s@G z4rBaE_f~sdzfUJT>*+VMN8~{EB;o+tz2mFPIq-+7Nbm-#uohoUo_Uq-bSLQPAZE#LUC4?s(W0yl?ta@X-_ z-@j>=M5Tb;hVT(woa8>c7>r+^6d_;qY5#n`i*kpWe0bn zd~M=8I(DYS=H8Neqld600R6Cq?5wfg7W4i&-^|1TJTw{cJ=1{vfm~$&SEK71qI6~F z^vW;X!Mt4`GU?#!u{ZzU@XD>&FIKOHuWzTPcm;Qx6ePPI40gME%rwO_<93f-er3zd z|7>{0w46XyNU%FgO}<^{fs z2gM=QrmR9-MI61C{Z{)8sN_iTOl}RbdQCAAHMtYzvPOa^Y)_HbL1Os!BBlIRyY;QiRfxeayb0M@lC;HSZ+ z@)3iT_Wjep;gMjF;hSv<8^s^H{R3JMbBvu;1(nm037MYf^IkU|{w4>~dux+zq%Fe`j)siaI9XHK z%*@Q8L^_$OC+~-z`&k(fo9hU!08tw(<_9fjvnkN5t3~jmN>%cv(AzTr5rb<94g9if zu$TfR#5g(vJn49q!h4ipP>p{sd!x(*#HjA~qt*qRJ zvEbsSonD9RD)sGz;oli=b#AhgM0|qXa|hT)ES6m}&+--MmR+eotI1E)-$`D%Luxc^ zXPnA6x@sBgE%152Z^UdDY_Zpsd-PyHRDdkB#dB|)&wg07tSPcH zy9i8BxO-oTr@nSfCebZlfN9S<;nb4;Z>(hI`kVIn{+8e__jp)dEaNhc+K0vnMOxHN za{XdEl=M*;*OBnJ%0y6fi9Ow)&94$40W@Ux(jbvN9L|A<71n>JgIYv#{pjole?d`5 z>Pt@@4p$?gx)tFr3y8Y-UQ5$KePf@S;w*$~gz^Cj29 zGcGb{6XWH^>1|`fw!seSgmgug99D2u0WIW#W%Gl#4zESnjDVb=x%LUk{1EqFjvnWU zP6a8EG+q%96&*E+W(p6k+HlA3q3+GqBKiB_h!?=2{jNrfm-?nsmL((Oy4Jx)HV7zm z55e1}eZ8Md*N9?6;?>&E&86ktH_ybRw$r~W7ti&Tgxgbw75k^rxJa7d%9x;%+im+T z@ApoJCYn?=2zsiMj`-%zQfyAaHxF4z??EXSqS^E zh$5L9?$x?RXcy1?Va3T$lKEzvi^N!Tpqu9_yPW8=vZ{db7DK?I!yRxrP9Asr(0JuR zu18@44)Gcxx@1{{OK^XZ#U6~tshQNBoGf|PXEoJw29@WX^~5W^+Sf7s43%{3t}809wz02IObvJ9 z=vP~Gcp(y9rCXyR$+xIOU~@>4&hwzrz9B63G;JlB@S=ErT(`HWM9=xeT9AWQW88jN zy0}8cM| zg=GaGAC^%d@Q7l@g{x=AxHn4v-zRZKpMB)S9xC6+=)VWRb;%cY_EE zAzSu3P|f~o$pN5T06ElaEWo4~N%okMVN5=rCK?%Qie6Rb-R8i5>F;HdA)LGE8M=LJH9d-Gg%gz8=t+rBa z>s>5o+5DVcE5txTUd>JFK_VBI*s2TCUh{RzhOmTAO0f%LJ0()ftx`dQz*I{iRZUNV z(Z)E5Y{Z`5BFA=5P#H78z{^fT?li=|m?KkxN#GuTF$~$a>7W{*T>uJnPZ(ufS42wtKonvbw)32J0J3aVwr?l3`cC zIWq6Om#&rP$<*~G94kO%@S8piYw8HHF(NT-9~cVR-pwKu7nXg>IqsmVRX)9XEEUueWB#MWOPn%TFX9VmW ztW)d!p+tGA$E7T)u8bU&!j9==)qRBs$v@P92g7zDnT+rJT-?J=6J8qwvXT*yBH!gN zn%D+kres=*>;_&rwO^KZz`Xy;?lhZU)}yW6K_OL$A>j{^%Mw5PB_+?Qb9CU_0d+o* zERUvhgz&^@j^gZZIioOct<4EL3gdRO{5k|NC({Uh^~H&7mY!Rjiq!nv=RdseR4;=L zJD_B?1J;nNoi}U9PYk!ao;_xY@3FqZ*s(MXJLD-`bQ|0YS+`j2{G+YVqlbXOtOvg} z8#^mltxk$|pj*}t7o%WU`9qplNp9UryXT8SG-Y%A)3U0nAQ2}k;#0x6M81L*Wh0Wr z;x_|%<`?C-bAfp(=Gsg14Yz<`_Z#_I2NbC*QWpulIXQImlEi17eys4vzVrgJa-@=)?@PK|uIS`ysl zWBeeG(@4zfituc8TS<^x$sdKKFH^f{6bp~gxhedA9h@sp=DAkju_ipIIG9}A4W4L!#LlDTWStK8rUp~LT#0+QWxkNniEgcMoK zC5-{m9+lW!1X;a6+*6w}UDU)^&)G#*&-Xl?x!wsAt%*_|-MU&Ev2;Ci5oxD@ zt0-Q7to1e+z$VW9^uB)wwHf{C{(1r{N9foQn#R1@<+HLipYTgmA!3vK2lCJ{n%cnqn%yiRrA&xS1vSrN znl4w?rA>PO3b7=E`a(}H6WNc$R=&|YF3_gf#DlL}#P)NG-KVy&l^^F)}o2xaG;~(UQ!*J9g+_9@+THgy9RHS7kJP z%gafe;rIM=k$cLy@^ER-ghk%?%?wro0pHGItfBOwem-pc%0`O}+T9}(v5O49%66xY zqC>@1XOPr(W|>9GX~7c!I&`l~pwTrYy|Gs)iD~gE{Ma8elfSo8h~pEu)=Wj*V%~ux zSGu`+vRpinm!~3jP^_7Ps9s0+-w}TOeLGhQ<%vI5nD!}#0 z0@)8`2i~k^SyD;S`qVOsK3F#WkTX!6x%@a-kohuTDku~u{E=}rmX z>u;6zFGh%WMwGlSsYYs9XC?8h9s(*6O7pC0A+^D`2-eHuNIH)&s@Vs%=gl@GGRAWb zGf3F-z{^ADt#i)+iJ4jn0!LTCJfKT9d|WBB#&>|K z>!C`IKs4P}oW;w&l-&u$8612?pbMJ#d8X?SHGXD^p?kF+aWIQ>g?-O~I4!^bu%gbf z&h%x%R^8&x*&k>#4qiTyOw~K&nVGj(&xCZY8UK3Sw?4ALa&JkvEEcBT7S5VK5S!9_SiXj(R3OFc_qCzrrJ_40Knvw zoU~_;L81<2orDz20Wu^#pn@Y}X`pP9jhm`+y6Ocy`>;Ax$f-{;wOnv8c}!^ky$Oqb zH*2Zm8?iXAVrw$5grso2m1*9&4Vs<2c?oiR`|F=R8I-kq2TThN>&7A{9qr{EE8bRa zwktn)`%C`b9dDtUH}zOcLh^n_VB>8iI@EA){AbD|~^V#||`CJS$K{u(pswGG|HT^KkS-Fc6XS}nid$LJK zIb9)rzFZ6#uQs^(fc{OaE~iJ25tAA*!sA}i3#0s(#rhq<&(Mz;LU6+f5mXismcBnx z(ufEtEl|eEv!sh_8DN^BTpUs(D!v7@=%v@Z*Q*^gGm(~ z8blPp`J3dIJNV&=O6><;c%Oka_|5D8Kxh9h75Fdv>YJ*rK(n@+Iqemy`TL&*byq;_ z6tIr|DUX#{QBHpH0X`zYW`0hFx1#E^J{idzqflCFE4immfg1F7eg8d)?XAw2S@}fo@v{)B&Rw_=vpA34TiOpTpINj5V+(KVncm4k4ybFT6JPt@{on zv(|HhWV1}w-Om2NA%6-?PnLWw08^85!$7-C+7e}6G}e(xsy`8@3E0WjbI>Z-w|Nb_ zgL)gP>pMMwpsg<-G7rKIGTuG%sJU;!KyI*>n7G>FUh_G?8rDQBBeuyH9pFw6@rP~g zZHRv!ySQFHz&Ti0_n9ocnU&YL0sh?h4YyY|AnlCt^gfaq8$iU33rSy@JvPm@II3uO z=Zi2Jw|&8R_M7vCoA9Hy(sAOFib{8`{F#iH3-V4iO4K;Yy;l2+1%ZYufKN`~SjXAg zjkBC*$*F0dA0jH?*Lh;9MR|s2uB{w49Ls^h(Y!Rf#=R#KUH*tW$Dc=YY`_eXX#$GV z8tPH=7LPWqvDT5~v$a|8}wkMLSo#B)&f5yt(xUd@8-?Th^|AVLup;i}vBC zDH|opilXRqvh_JC zx<(wu%jMS_5sn4xopIpU1=-yqU=}Hc)XZB@vKWaqY3V?%ORBX!Izk5u?G#DZhi`_F ze8Q;L+#kq<<72YFA2Ua{#t9T5iO&n6#%@HFScIm_Mb_;xO-xhs52qr@_#En0A#_2W zAZJ>#@gpsE9jR^Ir+X|XVuONQhL;09bDiF&f;jrI#iM;Ie?02vo!XOIlRe__3K;@T z0n^6C{)Wrq*0~&t2bU2rOEvn9pRw@6@od?eTvoA+?P{uDnyeltc6urNWa???v8^86 zTkX&I`Zl=ZwbU7$6O2ytu+v{oiy$#!%)XEcoQ_L5LwOu9*%368u{*)KH;4Oh2NU9x z7cbs5P#77I^;JWOL)^Q2@vD){sGnCK()JFC8<^;%aB1xmE`QL^nJM3|(dM9_ zFS^(B@YURLP1#oXcTHY=SO|xGgD#_0Dp4xsOud@3U{r8MZjbZ_kq# z{nxthQ=8o~lZ1z1Q*trK*!G9sFXkD|3JJVyLp?F0A=YE5ZPIgAO`83&*!!1el7?ga zT1tP;3}UWq#Y1Wnoihz$cew4S8bj?%gbl~p_L9QqfAy28dKV*A2CIs#&753|!I>bO z7+ra?`Ucq=J!d`s^(O zjG+q({oCp?3p2isPIQ43<+6s7kJ+*X;rY6%~Itjz4$f&sGGAb; zd(Pg|T7hqww8M&gmr|czJ%5%8}MCF&%b^RLNDl^Qfrc6U!w@pr4mnis^x4sKB==B266^6<@~CCFng65yUW%>Lq@b8QFp-1{zPs_S!Q-rrf` zDH#gGAjgNh!U5VE$Bxl`(^zXaOk&vf2s_PWc;vlXP`8l?^XIbCFWOs>@P2mM{<1B1 zpC|b26u)%Io4*A3oN^!)(r1xqO>jKJ-Mp=br~{g>v6hUl|7MB5^eSQYh$HjmI4GVkGUHOyl^NSMgQvIb;H{{3oweaU)ldC?WM`P)hVYudN zQ^FQ&dTY2(+@Fb~6(gOmb$H56!dLTnh1G0+luc@wuN^?`cJg9DTMfAv`~M=s2R*S= zr)rPCe$P?VWON?*Gq0&tkGK0$i2Bs(UO$P3_M~RJ9Vh)8Qd>z}S*Q6uXU~tm+k7QP znp#^X7XX9(F@B->uf;w?>K)(tj{dUwbyp7*DIH9#WSl1~%*!=&l0U+X^TowMTW*rF zdA^HAE}~I#kCceT2@-vJ0Q0$IYH2F?e(=BB_QQreNYE~@^0~=6qRvrP>A(w*XQ+yB z5V1q=ZF>@ZPPz17u{^XF-|w8hu6Xv02T)s5U46J$JADu3XG>B)y&~t!cmZpXoUz>J z3g(?Qq1}~BoHJB$TFxre4n~zCQBlPMto1I~=+^7>!*XRKQyUChZ{F5n(u5D?vP9h% zi5OqH)^06Fre_|xAyH54Dj*2hpaHTz=mUIR{Zi}7fBrl@G(KHM2lvU50-tRp;Xi@^ z6d#UynYESuUyB5yZJ2{RQQ1<50+bHRPm`;VQJ?0*Q2$90fTeQD+ZdJGOaDhOr4aaU zg@EPM+SFLhQ`@cYQ!bi3UpARxGj(J#(BC-g#0Q{yXUhG6|NliFQ_4**`Zb}#$hC{T z%|KO~MH9qSsP7x-&H3_OL=Z00q>s6qF9l{_yoBV;riDz;QZn~BjZ2PXkiPM5e!A8G z$Ls$#U++bhY2~dqFb{VgD-npB|NQgegL$_%LsOm*9qHaNPS-O?cBzicU~&ifSjN zR832KyDQ{DbeD}{@l_u$_U9j?2q)v;JSAt0-Hj8C0z6YfY~2xW%IT=ct-CM35^#^JnhRv7$8TU4@plzY0TmF7M%UTCb{W!(p6|_ znpdC;2*&_EewHo#)TiM3)Z6ymAGS>hjFu~z=6X;8Y0Kpywcx{~w@Igzz0>FC-+?5|Yhd0^WXPJAKtpYFCXsN(bl)2@w z`>ZKu@0pX=jp}jjLPdsmE~1x@0B3G+r3FJH*fPK^23CV~79abg`>_v|Z&X7-vG=FT zJU%=0`IKIG3)8%PImH~7^E|2%@ok2t><#Vli z*NElUKCf#E;G7IzjUcyw^a|XgaHb-HnfE;LmTTXiAD$PaP35O8Zb{7zv7r`vv8Ec~ zsr}_OAw#9>P7aNb68S=2+xV>cS$CTV_q}XSp>d}tSAJ3g1SN_D6)Yw>@D|AYPBLY= z(uSJBmlE(2WzkOQbZy~!pmEAnt`Z<<2+g(D4}pc#l$;oHG>z;2ndKKvRO@QKwtx0n z^zM668xM?DG#p%Q{#Ob*7HgP>Gu+=m|58QHXx^wIRc1HQRR!)VBt956oCP*Yt@Lf5 z(9r$TU!`M3_lMcyur5oRQRIiQdWJC=4K@+GO}E!;m&h~w*mifyA1|(szs2a~Z(mtk zNa{X2NM4M;R@?6e)ODqoVF!ueYY~xlw8YzeP#TNr6l>@##wgQ&UND{0_mp74_^lcRI)Ep}t)epN{|& zgO87XHhMhL~Easg7l@#`;+vL;3Oo8_vpj+h?H@z8QAV;;1*; za*aXSC))9kek(I8o5@|~?dmBQ+WAp3iIHiPN&>`ty|ri{U^s%zZ)9Z0@R_rJOxvXq zqUc_3-Jqmyo(%TX>Mzy}yfj1DmwTHaD|Bvv=3?na$YxZE5}_%KtY0~j_Ypl|m&TJq zEcet@^UJCbUx(@Gwy=DxF4)@w<_)ra* z-%d7}1=b^44U_IO!wYsxNH7`P(y7~vH=jm}xUpXeiF8BQALu`F*KYcFib#z+{(&wmenM~UqYKDC z=?R4w-|c4FuiWS`lF|QDhhe+>xPDONd-He^2VW%=aSO{$%XP`S(I23muNioUh2yUy zKKCCwX-%yhb>)S`YgoB#i-|3nEOJVIPYJf7uBHy0n{2 zZGNwN#qQ?8Rv^g?*Dh6HFfBLF+3x_{F)v99`}OaBIru^Afp#$2$yz+8a{|kqNBm7d zd!qYMED>HG(J zs0i`U{o|$=Fx9C4f@*afl`{JirpW4BkM?H(-4NJojS}Q>Y>8CM`6w;MeSh8Oll+iy zryFM_t^jkrJ(6DM0@+Hod{+r-k9>dDXolhT0^k}#{v1+ZIN`fc& za*J*BPJ(Vr@7cP8l(0^mOeC{|d*3hmmqx-rz=H1BIM=(TXPGUEFpB+2`Otc~E^{fr z5^H^-mzvHAuiZbJGY44{id~;-@|@1?XgJ^|ZJwWG=P&KK*gDdsdZcZ+k1$s1-R%`1 z4p?x_bH=XU*;_%Bde+X=pY675G+lz$jkBVS)w@%#F7~?H`EH)Wx__{IXcR0Vd9!oe?PG+dGWUP0I|`1LqD1^QE+~ik_^dXPljwVP zHHRaQmU+%Hj_(PdpQbN|l}*%Rpa8O05ZQalmC}nhArqoe#x6}y{Nt@~!ji2OIEI)h z>p~%1v6B(+mvQ~)zt~YE;1R;0#*Jj@u*MTy&>&SkZ)RDLDc{T&VG5hqe8rW6imL57FYh3r}kVpk^rn{_L}h)dU> zD{^ME5d{qc)u7ie*pSw!oQU>yKw-P%&!wotQuAoLDO7QK{ahYsP~ET_d~});%Mmo0 z_lY@;VS<=$gypf9+K^@~tnV9&<{dD0A8bb~TRJ2~U-(>03~2USODJ!A+9R!sng>_naeO0hTSM}`}UmD%X6I?Ax39Yorwymv-#@~GGf@W;DhggzSmZ@MaM~} zGX*&(M6qI`RV!MP9O5+wj^&Y{a8f3m7)_LN4p-k|D+1>`PJO!3s5D!JMDBExZHuzG*_@%0rSb>#0!)53M@c8oMjSSU|a8t zZ544wP)%5Gcqzzn6F4?}*Yk#~JsbBFNf7V|Pnoh_N{YX9En5Lb1t`aL%;vMWfq39U z1A1E!$jKg! zFrn*%-*-e?rg^{bEm>abi#!jPpo^nhQ5WH8{aGjYO7PIZQ8)r6C+@-otUn`67xzVU zgMYoHpR%LK8aMl9?-o3cw*r!Cc-Q5XH`C19R$76QCUau^Ge7JDavaoa1h4}AKh6{b zfS989wjVBgUr)#JUHoH@PZezX9R@uyVPI2~E9hNqcL8Rt`q>s`x38`3Wa_8+b76Vl z9Xvj)`wv@?apm_Zk$*F;m7sPkgI=r$^f;>LQ?QqW>{4AO1Du>+(>>kad9kdFr6-sR zk>u`7nx<3mi4fF`HjozC7pvW%%EzeDt3l*HbT7Naf9hU3rG(o1+Rt`W?w4KQ8eOpVN*aX|c=&%HZkeJeNizOa2~T=SK!vo|LOs_cIo-Y} zPH1|Qt$99Hm;mX>W@hE;=!qD4RzQg59Mi&N)K-o}FMZY=Nf`Eox_MZRwSEojE}1#p ztE{wLN#x7Fu{ka7`Oqc%=wl{^SR5UK0roj-$Vz}^PCZ+Qp*k+V?^!iI>w40~e6A@( z-X$7Q_XR{dh%691&wShLJ!tF_GxKb2P|I7#X64q28!#Iv>M&O_!^{BP^0#VQnS{9O zDf_v=CI`RLE5^m9v-^@F>782#v7W#h+*6AN<$G!%>^Kuw>v`8(QSJkte7i25iWJK=drN@4%8^NvKCj?=IR2~=Yw zrgG7s8&;@T|8T`5F(GXXJqqFcRmMMbL#%y2upqF>-@m0S&?ouG3Lrd?qa<2q(Tx{Gil z!ooinYt1XPzo_mjfq5!94GzZ*m^5o1ixhV*bo(Y$-a5x4c%c@t)l({UYibv{;Se6mVDSzvdG5aaiY?0T2nbYgH z+{z&~%? zMr2&mmyj&Y-tDPUS)EHmz=+=6r*$=cR>dEEVa7mIHhb;~Q~zC#P1u(nM9=(XG>mvp zS)etJESD%slMrr(FO)=w!EB5xLX~x1_)FkK``nvbq5*6ilkfP=)->k%Gp2wN54hq z?h?W&d8Zf734AY^x4QbMRZYm|YJc(^$Q3RS{x*h~QpF^GReH;h1kUoMt1oXk3TJ%G z-4NQ7?rd?|o$IdLzIH=;RGm|@K)~zcFM8qTTJI8P5t;>7D&Q}U*hut`VC~yuRlIdI zN-&$)mAcrnMYk;vJdJ()!WXx4E%YTW?ob$v4GQ+mt$-N!fcX|4HzRqf&iURGo!J(D zfL_AXiB3PbgjZR&li|I&-%n~!p`qK=j7CLZ{{3;ASmS9@M+5%v3VY*YE{#itbS>w6)6=f64Qk1RT2bqZ(MZgJ!?F^2!U813$^%i8l+ zo#cBea%)NdmQVcJN{eUAU+xQCMO3yuec0G9cE89X=Awdz751!n3Ym2SOG3rjH{GGu zwR6+IV%vPK+&kKI;1*uvLhF!$#Z&thtv@LISC-NmJanV52 zJguCGCTd&>S^Gs}kRw_>Xr;MOdtMGpMThSlx{I24czCTrCZrOI&Tmf_1}r1BaFfoP zWe_#6Ivef~P(SMPI}fCwY0PJ~r&kGhGFTgPv9;i7bY*}(&iCEmY72;88C~SQ@b^La zjK7Ih4(b_P88yelQ<%l7;=4NUqcm@oM7X|_ybG_o^eU|GJ&K4u!{P=KQga;px5BpW zjo)ED1)_2WF(Z=^e6vG?Svnnyw)*bLFJA$1)j+ImQIPMpVuGInVHRNf!j5Ul;LMf+ z*1E4O8B71z%4;9Fv*gswM~dL#pSyUxw5 zx7glQ6t!)rr)nM?LgqpMgRQu?$r(!zjnK~N#{mL**CaPg>#p6OG#$lb-QqSs69j-(mT`Gk5=+eBD0`3E;wNsvVW<ZeF4d}csKm=H{dNc zHdevwx6gEwtz@F#pj_f^qiLZWrUP65w2_0;?XnPuPTpzMHb%hzxa40Gb;S=lO^ljJ z_bu+4`dLP^hs&0gi)w#EWMS1-qGS|rU&Zoix>`4qMG-=+`(EsQ{$Pu#Z}Y_6poHv8 z4INx*xq6(B?*`MZUdx-EtE*C%Ap}x_yZc zi*7>oKaC4xYAiweKhTnpPPFi0J4FVHeX5Tu&nLcm0^u0DwGHby90{w(2ooTgSqMq( zL_VoI-{6KfvpP1_2tA$;MI&VVeO;HX1_{Zu*)w=JM03y8~QV(Gi-%G<;StW)aQ=*X!TMk%~1)P6R{k_p_ZLzD{JY0M?t4vw#P$LDhA~ zw-3_b&2jG%(69h`0*H;=pg3wQ8(tSMlVlaYE~7QVz*3c^4VWEp6{Y z`WckDB6jjTc>X94@KylCwJ4i+GQc4?^+amYyqPVPL5sH}Wtf$j{H>@&PT;Ak<*|0j z(@dURsB!xpSN3(3mAiWdW#wj1uwo#@sol9oP88@CX|)IHD(#6{haI>MvlSZX71W*{ ze=c7J#L3;#dX#q?^b%MriZ$A1aN=o0s#q$dG6C~-cG=B5t(lN-{UQg(urgKyT=Tes z9hF%wh>6=FsI5~}YQg=Rjv!=6d*i9W5K+3?6rrq(I=5w7^%%2&P2lWioK%XU>aJ_G z2^Y$R!6^DH#2gGUHf{U;m_b_)b?L%0TGnbnyP}(ZA>as`j=vFM4{mUS_=C$to0> zjJMXMJJ#Q^eI}*4 zbz|8krGMUo0 z4#eJwQ`+5)E_ho^IQc@3kp}-I)w=*?D)h9R)dWcZ$l`fcuC3NE^D8^=W^0n?$L?@@ z1ax<+qk3s96aE#cLXvY~f&hA^#x zEp!qL#AcFoQW()YKe;=ju9yy#U{F--fCvsfI2=B zH9>64F7w|;lXcce(}l8J2Gyp*x%D(W_$_^@q%S)_Y>;)6w^-cb?rL3lPo~5*1(c-% zxW4}aJUAi{_lkNrO!MT@rH$VRxU^fxzP>=fd{hNmzvNFw`10m_?8zisgC_uzJE$Vv zrnc>s#OoxddU8C})i7LHxuq+*@w;O;X@>lVyHutKW*ap4C09jH0Py*Nc?dhekZ~)3 z*mNEmeYejc9z?IND4o-SqMy7+Sw2vPxdkf^K6`k&>xV5I;#|w~j3{GD8gK!9q`=W% zdiY@I>2E`J0m_h_#X>!~SV=+Dx_a?k26Vt*bL;KA#<^NG8=54l;f(8!^cGF%bCcqF zVu=@~{<=<-6Woj42989GJD!EtNv1ML49+|w*_bLHh|RIo*n6$DL*|tdI;WQ0?g8h= zu<&Aj%EP(1knMvKS3TLM!I?UuH2{`@=x~sybuA-CF8kkk45)k~PxoK>#_d^Zh`4rk zWYSvu=cw^bYlI1x(#-*uw#c=IKL#Jl`RmYJ%I^wyqh95A#~o%8%&zi!h|Z^P^qR?b zH}Li!pPIZD<&$R2R?MyH+NP*rfQ_-_Du=f;wzZMPY=b996l=(%Tlj>MiQb% z^Vjg^OKlI>#*ZyA+$azx0@NpV*q=N(7Zf+0v?EbRra>F4%`o?ay-@-B${_1f9D6Dv zff`;?;Z|{z`+aX9HhupRiTsI&ibS$71?QlgAR-mLFzLLH&{3WH9hd=RDb3{fsxdqZ zJHZ;@zIViJS_(X-6P{j4n;Ef`*KHPv1$$)jdFIe8HJ!Fr z%b1?669A!;cjtrn1clL4DmZBK7E=$D*t%lnSpEu6`nqRpGEc8|FJqkX+NZIUoEZik z$O5y6w_cs)WG*QlwFV~Pu$)#F@fyt3}9x#-6OW&WR=+0%b}H-`(O3Y$FP@^uyO^?0^t50 za^s0faN}={CROT{LdL53PC>^@z`k{HM0&~`%oJV5=n!qND8Irqpx_$?+AY#^8OKc< zBa4Y>9)d){mP@A9N*T9SX8fs^wEy6chHE}mMv}c!22Z^ev~>bV<~5@{Do)Q z|JTrfLC_tFD9GcspVgdi0&tj-5zp+(KKi|^h7Cw7uidu>DuShFJA7Ru*ITev8?mj( z@Fw~>fgU!JX6(eNW;J-(Pv9C&QAYc@5|fjY9FIy$^o+goq{<)CQv~(3-of!iY2(bT z<};47xT~9OXqgh8Z_;!~uWo+L^i7~|0#JRO-!f^uu%QfUUBRi_p)Sltp=J@_eF9#J zRCj9=%z(2Sa>g{>e~#b4v*w4&SK4TmTqEbVWqdLgqtzHkwo~#N^@Lu2YeNPoQzXWm z!@kU8w&VPLivHWE@;@Y3!1)1Bj0n2_<#86_04D~13GhWIozHGBM0R7A=b(h38Fp#= z1diEW4ZBv0ry$^UT!eiZsSs!%(0=`nW z2e?K%mLg)2Ur>?+pqW3B%)jJa0j!N+lIrXqsegS()?ISr^xhNX%-#+uCJy-#I2(A2 z0$&^wr0ow|rCUP8`26Z!9xB1V%}w6~1O?lxM_ld(>1b-?4)(qYA%A-HON$4m!?Y%w zrdtJWlmoztCUk*cW0&qAid4G+;9K_$HP4+RCR*HkAV2RL(V?VxV8@5ura*5Q(bJ{& z``6kK|DkwsH2jBK8eI{r&GC>$@9L-fs@VAL*#Q)+p|b{P0id1}D50FefKq%a;BVYH zr|$eqMy*Z#{CvX2rs2=M>8~j(>3gwwdTsmJRlF9sKVvru8eM+h*6{afswnUWARPS9 z*<$~P3x)q3s_f6hd7uHqk;n@kF>>>a5|;cA<`^=T`kFTf2&0F8l-P zO$~B$x#X~be|Xf~p6h5~0^|28v|KPgH!G@4Ot4Pu#DqbKbWW(m-(1Beg8ni1E=RC# z$tJQoK|qeX5&c#McJB#@IS;~dL-&x|`{BTcYmM^3cCqp7H2u&GepR0e=Wku#2Tj%= z;w|#6rX4l%chA;k=nlT~itP{Aea(PoE1^NNNndE}Gy<|ut=N8GctRuL)$)99z+O=w zu>HBGzdzu7V~)bZY0U`k^L2jasKC8*vF=J;5fUC)a(Xg+s6jH+PXO3|OupbUo3D`i zXV}#VhGa`%yF+c~=7r-1;s9TekGBDa9}OPu1j3HjCz^NWS6ibh;q7W|df9r-#xXCM z^A@?Z*V2^SUySwxDf1XMQ$_*!W|%nj&s}?}j)XHpcJ5=t2-K+T`3 z?_qX|aDBWZ;~p}f&g-i_QOh6~Uy+}AoZHC!XyyLwQGmTfd$2b9dOX9tu5={Wi`DtQ zIYH$^n}hW0z}=k_8`jQtqaHr%Hpgd{_gMPrgT^9qu(SBM-TN?hKv`fA^}#i%KI!@8 zs0=IXiCq!lOMs;LCEm;RAs0l=q}ZJ5_Hd#hC&Pd$5HH81)b~2PwWJnSV|5J}uDEf# znx_Ga>Dxn9RKpbk6V`_@E>hCrjAa*(q1UUsdJc=+_8Q~I=d#aVqnMh_K3gdt zpi0%Sbk|#5Zl}Ly?}mV}7lkny50}5d&qWi@!Z~Z$!dbJ9;j~sZH=nEL(QL7i zvl+`q=Q>D*E4#(S)Yp7x@giD2P49Rx!HfpPDZ+q!xc6Ch)Gh_V`nifFbp`Xz;;^mQ zzMBRRs}MahHj`*R=n>1d&~hrL0$_lK8H@>fV$N)-`cNNO9_?EvvB7hC-)fsh8JVLr zDLd7i)x*~lH5$h6Fv^K7$Ijn~0NO%DT_@~Izeb55mY^55(<$eqwU_m*jaIa4FXU-w ziS#(Mim4OXEucr%rMK@Kzl88N-Yb-Db;nxl#dda=uxSS=O1?m4E#?rAK`lsGXU#4U zwg><~LtWQE{nAwhkeh>2%(Flo^b4DV77f@a>v(dqJBH;oU{0tIX-s-`-?e?PGe&He zy`aZwTU$208!zcG08jzy|o_v0jI%FK%4=TSw39o)=!5=e_G)-#B2LY zT_*5rac>3tv*6ih`AVZZw(EGR1R)c}nttW8+TK0xC&4OE>kAKr`eZo-!+k2Ym|AYH z!G-+5J$|LU1d(&j73F*uGr>ujl9iZ$e=Of34o?;lJIs)#kiP#IN5#9I%zLvAY&O9> zS&NSR*dAG;y|(g$W;8K3}A-IX@LBcvo3l~@Pi zsEV!`3NP^J`JI1_{}nt*yZSvy5^^#e-U>RqP!eLb2!5vNZK=Rby?*kMakwW4Qpl8|UBsz< zdVlUsrE&qUmkY+OA7!+A4yn6(IBu*Rl*tH(7y^R0NyL$D>@Jl_$6RMbpyRT*1dR>N8eSF7WCmLMVKyuf?Gae4kaezNt z2eE$T3uv2Dsvj*mYJw9P9=Nx%>7KPEeK{09(eyZTFI6(cin@CF`>cuDG%B6dC$J%O zob!ybz7t+&2Xc~=1tpy1n0O|!B-{x0#1H_`j#_WR321op-$g%kU~gqJfg4hobD5xx zOXgvQDs~03>)dtosC-I?8OK^eH@qgMEbv?71vJ;w5zl-=>jst}G=>x+#ckOSoKZ2W|DY_{@xV`FgP^(pD$fs?~ z(HD>`r1Ph~ie)<=dv+1S8J^U3&#V*u^{9mV^C!GUGNt)iOL$I8HJnXda^p04iw71| z`!)=nTcLUY8D=3xK_%SWKJp} zERehaQ|YKv)yrz*y9N=rwdWjni3D3VTKqH~?+dQ+DFkX)Mg%W96~vjI(>k%;229nn z{>I-U?`S6`1fF76FfxTroZ^f}oj#z)8tR%Tg}X-yLHfD1pu#uKjuv`Limg2i81l34 z+Ox}KYiDV7(Db&iE}$K)2hfFIJ6~~r_U(SsTw0f8^jRY7;V=-c5}o#|8=7H#UOLXJ zNHz}r^=K@!YZh}H{Ojmf15CvK*3iY1c+({4g&(42SGMl_HQ-FXnPvlp5Nl7r$Z`1` zxTo0`y3DCe_XM9a-I$Iiq`l56^+7nZ|Ioa2{5pfS@cV$MvNP?(xuqWdU@S6RDl--%9*b4^kk*~=nr-^L(i82vDv()Qu@mJ$wC7S??s*7PzGS$vw+@MSTNXG=yB4zlPJ?w^jV%dV@Pn?zG{3#G zx!Y?p4okJA<>~#k8zno?3pb%UB~>q-6G_;mGxf-ViYp-{N&#DK^}Yk$`{YyRJ*toT z^NOV203*n1Zy_UdPj#q}rW+lxu<62{{q5Q{`4}m&m&*SIfV#b}w@SMt+-Rf{oyPTH z|F9b>6Q=iL9fJlroozqqioDb1_f+lOP+F3!1F#wo%Nw=dC#)8;U!k-oI)?@m@!Y2$#z4E%z z`e-wX)bcvG#@U98%s8kQuY)MSWpb+j?y!A&5x~X&Rh@CJ zx)*~}jm7(!O%~PIc*rfYuewo|GD(*}t5A6Ce@c2c6g-ptIs(57^uidz7S;r!VMv>-$*UU?qEWh8(CIA+5@#ZecZ8AT(kN`RYArC1KvWm{78sl(`k*W$gMP&1jxieM4(%Lpzpn#y7Av zKdMX@CaA+k7zQu4B@Q0ia1}^Qh-;H_EgFd$)dKLj!z0(HN#{@6X%KZ#Qyg6-Z}~;% z_mATBHm7OQT1~E|(L0NQESB7fXh^I^x2e}N`agCC`F zmsrof?B;pq_oKB$U<)ryx}%cJ#BMse(c|=P#$wnj5`XG`;FI%TB-@lriXB^m;*~Sm zk8h=AVQ^;qIXkmJL}B2m+w;n5O7uW%Ho3&F90cLMRV9DdhuT@AGv(4gA zfV9T~9+Ulx&1poLw|zYhP+BStCXGA-6Bh>;!+torRM#twE##kjIXvaRz2mL-7O%SL z7Toc+Dxxw(gs$K)EqB+56C35&Ad+uWqFtj2VpH0mEqeb=NKh|qe@!sL@vS-9PRYp3 z%b?TRmJqP(lz5x*MtigvGo!--j%9O_r9{3X=jt~-s=V2c#2RTl7!MuTlH9VWXet(u zak{Vr``smD$?MC1 zJhA*5kzf2lOZ27tb3b4*AWX{&2mE%{a?Xkun=}4n0MuL?HR7b7W0ql6-(}u+7Bhy| zY?OtNE|m$FOUNQ1lLb50zH!!TDX>#S{*ugC_L3+G;l$ucRz!Z^oLh;oH=Wz)`D7*& z8$^e)(diV!&uxSdyITsN%fatRBc2^IsacnPvM#G;MpM{{u&a_&M8**}b3AJ)Y@8*t0U^2ywP2+S~oq~2{QV4hz4t|HRIH^62~ZkK>r zHfWi&8jnZwu8}Ku;9QYyE6Vk81xS``$dFjShcY>9aj!#u7athz;_0=#!jp7yDxGH| zEliwWe-;z6`=zFG_;-(jIn*pov3c9+*3WN3h2Hlisu(A0^6()tQZ17V?ALTmQbXb`CqEwnyA}JU2q=!GRBql4YH=A(2vc1o7}6a43Nf;8Fl`yW}xax zG;jyq%pQ=|=;@M*g$3pyvT6Kfpo>}&XGs3&5G#aU`}#?UOi-@&J$Z`Rg0Q*4nNdNm z?rY1XH!@oZLJ%AlPqY(rjPGn8*PcPH*L~lYi1evWXrhU=RjC-uMgoGWOTB~jQCh7U8C;}@!t$vD`>K*nXz*fkzr;h~LO~Sk zvh_jx&JWX0ZMG?kEw$O)L2geiIqKK0Jm5d|CmCQ%5|Kb#h26Peh!CWTeS%H7!}OQ43Qewr>JT^2?8{Mi~}QCVyeFr;@w-(oAS5 z4+<*E%bz?@ZaJ1VGBLr()&XHT+#Xw}Sw1<^bbEd&08+AH>_@kE4pk!)%>?RrG=J{s zVq*xtQ6cS~Uo1NB$5-f?gpue!?|orsJ2v|jAeCMgK2w$ijGoh1wVk>QYmd?5}_ed=wcCDGwAR81;UB3X>cSh8&)%FrD{vohjP#a zRZBrPvs@Vc0BeiosyN0{=5xVIHQVelaZfuk;|Ac*`&Fg>!oEBHmCqkHcX0jhANqHw z;ib~rl*w-&VWrI_q;gYP;vMPsIzs`Wy)SbR4H`32gW&2??I^$7Q&SI0yC048i0O1a zzU`nX^R|<(*#9SUY6rVQ4&n1pG8)}9;)62{K{2BZ?NRw0Y%28(_f|lxrqV`Yf2k>5 zkmp0Wb3jYOqYxi%DFmbTBDY5Gu5t|EZoZOo>f`Y`vLK98AU^1{PK@ge?nvtkWQ4an z4duOx(@v3xpJBm=keMg!6cx65%+<>lQt|6;%`#eiQLgx7PVAN9ej@z`mHF@D(6ltG zlMjsB{bRh}71cET0oviE5PBqFh>)CrUu%3$Lc*)?20YFWisCf4z zahIRQ$?eoy)`<nWYBNv+JMoEGZVY=1A}0nH^R zWoa;McXI*kn_~5VXkeTuZ>TXvT`xXt;LOkf0W*v4^v#kZ0x*Neo>FfsaJ$%Py|7?#+EO+lt!Q~VO944&EcIGu^ZydM@g4?f4M9c6`iqWb2nUjsHcXIqiDC9sb?TnJTb8+gkJ)_6 z4=^GU%^QbFm1WAuRgPeLgk-5^TNXqwq zTburM1@6Xn{R$21v#eN@<2DJi1(Zt^Sf1xjrjp%SQ@`DX`jdXWJ_)xXL-vi(9JLcE z%Zopmll9VWke?qoL^Q)u*}mD&$nGuFWT^kV^mt0~o#y%F460dxLMuyJBR#Gs;2vFr z2xhlm+&s#hiFm{0@g;SR!^8*Q(C{V< zIU-SATizFrrS6Wccw{CD%Hr6)0d)aAlzF}Zbuh!)G>-|4Xg_k>$`3)}Q$WfWi21^| zjz0V=qgit0@IoN4@~d8|@-F#9uTOfXZJ7Wb2J~(Bk__{9=WC?Iv#0!bb|9TkzO;VA zd@{JVJ9vjhFx~G&4ODb-?VJ*J$=T_PMtGh6@Y$S;*n|XE&L9K^=2ZZ5aJdYCR&I{G zCv>tHvQ=3q&}EMVk&R`#SY@!eNFhE)od$REEd0cnUkl@#cyft= zv*-=iityDvR{r7I!AJ>f5{vzIML=%)b@XB@j!tzjJM z^zG<15?FB`(O}z zI69M&Gb7cAZh`kz{0=Ln%X%=O`Yox7=M2CT;`ekPrIeONeM)nQ*t?y+a4wS&mEr5I z^wXn)h3&_WCEY&wr(0mrO$zZ$U}2=m>|?(FJ;9=6A5~3eRJp{1M@%~i`DoX7PHCo5 zUC+8^j}k^Ze@c@|lusEF#H5|anhP$bjLZ}S2HrQ4pwEx0VSlB*-?b2Wp&CTT`1@Vm zL`um^iT00vi9|PdGRXPJ%p5eAknlf1m3JeD?=vGwnjPxufmOfjZTPQGm=XzS%-Rcw zfA;zc#m_7T3qtw*DLukJ*f)$fTdAL)0X|*Up|=d~Hz#^vchg`#aFbf_m(xqyv#}0$ z<|QUWY-=@}@4|$8wPyE0ZCk5`aJ#odX4`Q@sY3eY2DcWCO*!OhRp?LM?BCt~dlj7Z z-~4(0zun{pHBfR#i8atY6?=kA2;~jixK-J5)`s$BitQ=ldrC5q{yhEW#`+nVt|Az) z(Jo!aXc$wn219@R75*uzg{9K2BpLdq&hhiB_hkIYn)8>x-gd>Ko^GQ>ev!w&CS{~k zlL_tY&%po)SyzeKf=5_(MQX6^4-LWvUa@8JZNgA_(q`UHo!c8dVBs#)9)Z{gduo&J z<%P=~Sd89OF#!6Cd{;r%6cm$c+}~gG7@BOw1SNH=zBJNyd}{wTR7XTQA}U`juz9mU z&Tgxi7sbJ74LlXW+qtio6}2Ar&Eea}CV|#=3iEF@v{VU8?Aqco6((Rq$HYy#jopfO zr8a4r7ct_+5lsH}Q|fi%P7A~XJslp7RMuZf6v+8mapHzS&1{WXechT+@ZGf4nYAiX z+1$^AKniD*=XW%43Jr~)JXPz-_-K=jK+t=vtOPRs%`(GoyN9y#E|d?*2&-iB4TS)V z*bRd`(#I)s0>_Q=MU{(5ureRojoF_!t7QnToU}X4*^8~kQ;1I)rj{-xk3)%Q{03{8 zVdlVn<#4JyvnP58U>yQbAgy8M?){vj187L|eDYc8aAD&*aZfN67?SD*K9mff%TpfO zjBw*+{@T~A_i3ql+(7pmqTXv4mt>{BImmxKDL}Eje9i6O)>OjjZ22`47L&#GZRYQnM`b^;q>&)WL#=|&%z;%<)Sf^DL`nwnJdfR8CrK84 zSH4qY^{fjxIXdsS@kb3P_#tf|H?KMif&}V3W`&QZD&4+>@0f;IC+$zWX6b43=F<@lZM4t7x^y((!JRJ;I^TSuJ0?JnuLd(%4qS$G3OCPEAvKw_bzM>$-drrl={_ z<(M{stII@Qy7LC$85^SxT~WX&xcIUdb$y7qEaM{US*BC?4FDh(ybD^xHxD{YTW=qd zzCBxI={V^3GR;}CTeA=de60@{6ELp%v**$c^-!}|pPX9Gj|Xe(EL0A<(_{HKEu@O* zsXS+D_R4Z^IN7{*6^f$7I@CJ~X~{I9T*QjA^#{5XR{pWxIGNU)^W0Rku+)xh85>R& zI^is>Vh$3D8+s9Dz-hAjER1#FC)uNbvyZ*j1fH#JG6>c@fgIx`DjbUML|IqXdN{`F4HZjpC2O? zoxn};92-;$x0(=H0w5g2L1kShmU*q|SKP5xs~{A2EM|hkHe>%`U)dVrDpp{lfe5S% zf4~%2sl;$|`FaWpMveJbiub4s4}f4R4^-G;b-Z1OT5vw_=Cs~Vp}Pl1s$WDm z`xkB`=G8fx_2avX&lmLDEf>*xbDOuURtm736VS$f$(HHmM6eVR&;cgaepUJ5@%}OI zyN8ozs7*G$0WvW=$)#el)-_zytpSegrlB~nl^I`GoEl1!q1X1%60#mSU%UL{7c}eV_fziD4x4=Izt~~HPf)yI zFC)*i6q|W805ze{@ayy*9hy>@HE?1Fr_>ESgr7|K-&#Nbn1`h70MeEv?1PRA=F-uP zcG22rpE8Fo014_;LcZ92+W=QQV)4D);GD@+-Od$4%@)J1fTEn^*Up;ug7fpN;XYIV zZhaH+it%Oo4suYUxK_+&SKdr-2SEBL`*6czH>d8AKT?LGqG^-SjtL48V?|LX$Ouw= zQQTy0>E~rugZz5<(s1_r8%h>qo_FpNP-~D)pC0wViJHKOLYm(jg3p9Lq8N?ESE)6( z~P#^TMggp&N-*w6^c`5@Xxr?}V>E6ZY?d9Lr z5j5Dhh@z_Ufa0dH?jpT$>_>gTs`yPV}ENezZ0##N z+5MqictbXrM4Rqx7bg0I-Oq3K(!7>nK$&}2qrAqdpJ3*XBU_iD&mpIjf?gV z{O6c}T`!e-EG!&j)_=xhVs0i3thnD;T&(`DR$)-u?$uE}tps3rj;e{;oSYn;)6ZCQ zMMF;B;o3q*Tssoc#OJ@t-lBZf4X{TR-em_;`nLy*##pzc6v#A2@L9V!OnLu&$RQ`* z!8L-aP01O0)BGUAHjU=_6Hp-Md*osk>+G;#Q~I=7$$58W)HmUB=wZ*k;HhxJH=xgpP%5n~y5_m(0(~br1`5wK^Zc@9U z^m&YlEX|tW{rTZZIi9OHBB7 zl}((h80~=@c8e<#TLQcKo5zU(?h^PptSw1jGeIDmNADNniyx>~8W5^$5@oN1YLA?C z5A_$XlkVmJa_p%}cI)rQY%0xcgKJb9TOr7zblbbXkC)hlAYMP7fR?zA@U(49Ku%;g z&-vd2CrB&U_4)V+>mIR7SVzfkSVvmc9+5%UATp0Gvu~GAveXjeZ1X!)PI~E2GDU$X z4nJjQLn4fUBo@if4#Nkh99W3qFIlW2DLy9SLW^2}ulXBKsx`S*CPg1)XH?>0y$x0U z^(M%)8&Eo-bDkjTU?qgN*sEgFg}+m=^$1Rh&QUG+7Dq>3PuNnWAMOCJvzkX)q(7_{ z2EGfM8J=0w>*)G*8PeMr5|@Ck{-Bf`(1gLq|d?`4_z-fydg<%z_4kez_H0% z2Vxd##){$!tyf-p@$C*>i;8*vWe_fT5<|ihzB@<1G!(>7n9^)?_SCNYBNZnFem6`ns!c&<( zbG`=5PUQep3aqDY`fxQhG#;pbLh(OtFP&O3qK;mUVjR}-E48C|5j8JK@E{>oC}z4!uF_FQtJT9watB9WR&^w_ChSpE#;D2 zmn!?W4OiuWHQvi4^a7v|{-|4G6pf=GbV^r(XA3|+x1)C(ftUjg)5!;V^N%35 zvnh1$BxK3SG`L$Y9mYlL_PzJTQn^yVf@`f!Koqvx$?JXnz!%=OmmJ`E0LNwq)PsLP zCg*8gqCVcxkb2J2j85#h%U`M@mCz%Fab(nqi8>@+uc?9fa?GluRk4OFjpPCd=f?^V zPb6!YLT2h7^Sl?fY~q-Z65e86%(Me3Y|)99YTbL{fy3Bp>A9I=d_>N1y(06HINR#x z5iDMv9~Nj|KT>_KFKpVfj=5o28mU>g$uZ;Lb#o4=!ofyW5c1VhRHDjos7TS)SAwDg z)&uL-_vGqzaX;_5wT(q7SaUy_-f`DyhJAT6YL{3@8QEtl20mm$1pjkv8-gG6+Hyx> zkK^4&BF{#HylnGr-D3!goeT#fR>x{Wb&4un`y8cuO1nc{r4W2~vao1_4*J&o9glGu+(q%1CgIiXnU(nYVOOof!7K3JcSis2bwt`RnvfcE>hL6xgc?d z@F^DH=>Wv+B`6WXwRngjDRgwjnKvgJVe4|wnS|FFdDT!zFohyBYgL>`uK-F>-QtMs zQI~-Bnji5JVwANXe^YWIEH~<2>Vk4R$%J(;Fj$lh=Q8vwoH%Mo+~=QzjR)z|CdUqWLzL^8OZFj6R-WsZoA4oV{5;=xqZeJ2P_~=SLOjLM8xfV(8=E)=l z$EPrK!|bCqCh;Va@|kwDOf+|4U@LH7kc#ekC{RrL$!5aoyixc~6#&>M=wK!dln41j z=YEfc1OHUfwJ15tm>oTf3gf12q{z85W61&CT_X*6Zn2OcA|S%&Fg{gW{5gg@)729Z z{KRHB-?~;s+(3BPv=)Q3p5NYNN!+R752GVWUiznzre#ChI~B4zV&HBh1P8}^zjVR} zb0QiJZEu0TUhyvGGg6qkEQM1PQ7tZgk5}ztqM)s6g|DKcEXxU7RQ-~fG8rAU8;!dV zW(=62XuvZzMk`ZRSQ#+`5d0Xe_uu9-CY(Kx$Ti?Kt6FcbZfEv-)^J2dxlRUX>*?!3 z;-1yoK!B0o>ZCaUK>3zhxs7L4#GRbh1hRB}jRyh2mq^;}#U^i+H`AzqEGHfe4uOYZch6A*g z`RMsR@^xGdjdo2(-GNI0STy2KX^Z~7ze-!45-s~&*2N@i+hS+|^Uim&&c$Ex zAt;4jffw`N@qO!&9|v~y$SB++Dy%ao%c(4VH48MQY7K0;50RktU3x(tKbXKCWxXgA z9if6@WG*Wk>TUfxUnl9Mh_94QCAaW-DYCVuF#>1I6i z3<7-cQqCQ#v%LbkBcnP*FpdXlHw?_pal9=GVg2Z?P9Dx+ zv=%$NJtHy~x;2l+Bil_NRrfoMm?zP{8-ueMU|QR*+j-$Rpgt|wl5U}_`sJ12T|}_l zRo%<{{Qq(nz#-wAG(%CK%P zN3?EY*u5BJ29%WC4rzPT1Cn%t&r4uESwcg@OyFtyzK&`$bi9Zm;f?#74$|v!Ne2-` z7o2JZ8bUzeuv9~7aN3QJl=mAs4)7G zdcVR;<+n#=jI*8+*;*GCL{D)HfWJna)@;L;+iz#EVhO7*`ItRc8l@j*;e-TnGEgMD z&#Lk5pQ(totmej=4(ocJ7;*Gq_`XF`+pMGu14?n`&(!CNH#oYB#yIX}0*#EcOu zw0!8RLxb9*+GNyHn!4$-5=nV_-QFBpxVx%aY;kc}9is^rhUshSHF62u)H~))Misd= z{9Wv#fV?Vp>6U)bCVTrc4DBdNvT$~G=Inv@U_#tgi6kxvDtI~27<`(vt~^KX&rPCC zGpTN*n!wt?{phI7zjaU`awH?jLg;(&r1gl@VQ^?IhnL6Y08@JD`(cj+&t;#ENRP)6 zofkKIPMH(u>$_6Y2xDJ1&Is~5bZ%X}x@0|;*4~j6e}0oozKCT&UL4YBp$^FhaSg)U zn;!4mlf>2YO{O#h=Wld3xwgd$IaU)_y4I-@dZ7(@MV0^OiPQO;$bU3x=gC>q zUWc7Oy=Ejm*msoc^#L`2RI&USKnmk>*Wp4C-Gv~)er3f#8AM_K9C^^h&`qQi9U}a* z>{O}zwL&IIJISyV^R)Eh9#>*;=9^J@e5CTB3n^}Be`W(6V8~&@JoxJLR8%3m(bsz=hvB$c}*2uP8y_Zr{VI29kv=C$2jcyey0@@KO9vrtuOGU zGYSK*>6if{O5ZvZZAvscJFw4i49)E!FreqL>s_%;Vnv+a)eHdvLxCCM z7En}#7GOYj`N7_XwOo{Mt22z?wLJD;rMg<8v|`Nh1I`X*t3$Wz7=v_CJhFl>fyp8G zC3gC6n)f}}hl3hHr6@XMyOnoX8Z4Ya&=Ktg12Nr&VDgK+VY9(Emh}8&85xwLJfz)= zCQaLadM!CQ&PU>@IL|d3qb`s}bq7A)qCev^?$q;MIbsacSwAY=owDL)M(+PAF^oS8 zL!JMh6#?h}K0M=k$gu>35H>X=Wjn|fe0ly4SqfX<(FZPwb`M;m~&0F~nFY8goI6MR>m!!~7K2s#(&;Qs{{=@l0owWVUs$3+x!)>>A z)6o;Z2f6!>+aSz2-c$>SuLjs{q98uNhicZ}QMTFt8>7bMqx^rL>HB|qPxXKFaFPE; za+&udsdi`fmC@jQJ&wY*;9$$@b%&_fvg$2fiil*sH z`h>8GAQ9@jnQ+YKhkNRCH5=-}lfZtB4%n{=Yq8A8C&%D_1qjX+WX-FKH~JCQ?x8B9AN@MH>qWQTr`Q5`YJ zlU0X}-JQAu*OYi*Qev{wXf^&6b5+HCb;n(bE0TqM;7b(JruDVsoTgBsTIoth?*q;@RhpGa_z4!=XNIQoXOgspq0uFtQaWcHD@J zHtA`)<&EcMO1XBEP_5ktKytVM1o*eNmWpel#Ebhw&HXn%lxM1|fa2uPP+6FO1py%S0RAwYlt5ds7V;oIz5>Gk%oVNAe8JYiZnHo5k4Gc;AGYqHxx z09~r-E`~I~ENZdh#r4Zx?KR|}{&y26W)@aOCfW;bO8kyf!-3lJXEfk6RNsW68Z?u6Ye!m1lJ)6b)ZY;q0wvv`3l<1EN} zM*D9lWeQ8{e7N-!Pz5pM5PHM^1%?uC1j70+Qn#hX=WgjPe!K5z@iwB`T5N8+a)7}* z^kp~Hv(*o;lgCU(YzDpqxW78&M@Q9k_+lc{R%UUPCMZAzB9M`Ki} zk?fAfmpdxSU?5kAU1T)nsA;u+^V)cP5i?DHM-farpra-oIZim#{a`S4+jmi6>Dz78 zcKr#JtxCg_BP+_#sQv!jBbHYVIbz~*v*y0dDSL?G%GGmyPP_)f`Z zv3x2}rMH9B_yT;sDP8w!l8Ao>G&@l@eQ1NF;ss0s|T z1tFxXV?We~Xak3v?5&qSuMxTICF&y6pL=%HhxGK+(;3qj6UcB1ZjnkHNv=h`5AffI zk41+nrgr%LeIh^tpJ0>EPx6{-1AhqB#JuC`GT1f~Zy)KkJWmN%6e)0{nh34iHnN?z zD~y)DdOrnX5kg;l88RY!VOu) zOa^i1rrLRLJJLuyUlNi>!abWEqc4iM&C1!*(|RRS_ZXESS@=FGF-PM~P}mInE3D7&T|U%D~Z2qu>w zpe5%TeyXbu&tG$vB5rz*ZXG+cw?K#Tp?)R#q3Vmf0~HP+?-_@yT*GXy4M)#%l-%uU^7Yl0oxPGyp7L1ljHGQt;f^(}L;@)n|EOq<6h~+v0#bQ{oGx zr{ua{u9z(C)z%6*R>Q9i_y3$MsvfiAEZ_^gnBW6h8-2OpFvGvPf6s-CEDdhOEuITW zRuZ8;MNxc6_Hplt7#+Jk1gZ2;67>(C$O%(@wS+Uas#Q>TvAcTsIBbDy!IO&c2Z}fc zcER`{YcK(L{{8_8<`81~LG-cUy-xD9drIPQ--XsCjBj?pO9A=~3{@P?#GQBkkw^&_ zk4Z1jP}O08RViTX?vM*r^W6I_l}jNGlICt7)3Z=sU167#;F0P0F|hqR@-IVa9=V7c`$rDA4{g#sC< z4bpaP?X}b?=4OsA8oG<82seq>nA}Ru>M*MrY#wCkGt#TacO~Z#AG5-4s!F;Ss}LB= zSs}s&*KgxKJw`IM+Sr!5SJ$TlgTy{gbN%an!?y6&kQ1;bo$~a=P{ChEKCD(6E#Jp! zyhr9-E{g&nJc*ojuevcyM-(<=$R?CNfvQ*_L@YjPIbjv%ca3OvM6Vd2>&HhL^=pAv zZq&beHRd4T@SuF-Itd&SQri+>wiZ+*BtL*I!R5fKahxSXhbp@|>l0UMp4v!-v_r}h z3)_Uf3)mXKuo3Q9px$9SMpQAtk>e0swWrTyW@Q4ly- zjxEl@aBbvr2IHKpyrsI^?NM{h&_8G+A&ka;e##}J&+bweTRTR`Hkg6q&VmI?I1gLy=eWb|b% zuiaa#ey+a8N{@#`?bFqEAZA}y6Egnh+KV!8sm1)tJwVR&NND`FSOry4?X&XNZsn_q z$e%?U6vh@}$3e;BJnnSOOSd=l_beZrJHKUTX^;AI!=y`bgY=q{+Z02r(dQCqN`4cx zXDyUZ?pqC@2|s>Q!O$c9XrcV&XysHs70L+K?Mt3A^ z)|1ZHX(M5UqVTGu*K+9`yfv9q-i1}c#re|I{4^V6$=Jhc;MdigV@pN1;gwSmyQc$3 zS92U@GcLx^8`}HdKel*cRUJ|P)8L+kFZE%Iv%Kq@iCpb=98-h?H$F$oI zuE;|4vcxN+ur}v?f?5isW7lyx3za#XsOh`Ic=}*Lc|~A9n`WK`iP1h|=w+c1ZYpN8 z=c%O#3o)v!&slfv^qBqrG)m`A@ko)mpeQrvZ~z0#LDMo9^(rPyF^u-Xo~A2E&d&{D zY@D{NXQ{%V8fz;xS-K0>cZ9*8V9f$1#e>Gmeye-jiFM<-{4;W5vA&3L@f*kf(Wq+c zarg4GmRG91u(W2OURzk*KdlkdF?vFAluh)ig|E}MOfl2@jRw^Ql7^M^;KtjgS-6M4 zU>3q=4YDSwYihtx*2SjQlj6sK0(qgd=IJ#DeGSjw zg=0TZ#Md&+KolGLV3tinJ;I5M6)E3H&tvQCXE|ifQkCT{JG#AfbG<7MbJBHB&@4iu z0-iV5k{6r9>HLr{_@ee(n6R(a{m$^9p;`@Q9z(mT+K4Mvsmm%^L#whAT}}4^`DIU} zJr7!p#M*vEw^2=#s)J|Zqa3>1FDPZa*?m$M({sVi&6MHjAO9&G@@X^&+Y7_@ottgf zp}Wg1DZj-xGf4O{*FWkT$^xIvKVfga=>JdgjpVpp@GpF0@^c}aR>M>Dt7qN|P~v!9 z{5aE6bV~XPDxiQsjd4-gzQ}U8p70CskRgc|&;MLJ?=Zb>q)0q1kY}8Fbh{=ZK;~S= zK$`S5YAhUPG>WZX&md^Hr!6+Tq}t=AB*6^%rs_Dk_>~?1$48TeMX138Ma!176di5m z`e9b*9x9FI<+6!w+Jwx$$jGfg4%T6U6&{)%U7ZG7vtl^-OXr(6dt3KF-ufO$dDUNj zI~^e9+EOQDO6EB{v*nFT$CF_P(DQw*alMRBQO5y!gvp@k+3}63pyk|Bc1ws8-KRO% zm_5owqWz;ywWbe%$0vfjBuC+dN;aWzd&*8~`e%uD->8UQ0oQu;l}0wA?5xAB|o61-dMI*y-O=>V&J-3x`505+8Ku#u)-RtcU&kYr;dd zS8~=cnQ<*g@^o-2#DL*o6EU7ydC1lK@9@jA*H7OJ|1uDzkaHsAlW8g(4KM2}S`b|{ z)Jp)Laif!<7th(_?-7vh4arRH&PqSaGEzEdgD+5Ev3!ouB7w-#z!Q`o>rcv)2i{|8 z2}fy0r&oxbbh(=%pAg?b4L82}DUv4QtK8K?B?YO$hK^Q6J$3;SQ-L~MBg6-jk(i>5 z>RFGq6heJz9^Jfr5fEAyqYvd~xV3ykHA@eNp4@MEt7!L&`Cob21KDZt>?`<1<>#?$ z2J{otuwRy~H(Q0s)B#4h*4@{1^+TpHwPDpIysir6Ol{ZHh3b?{Z zL2}Q-wacQD1Zt5~hj@DimApF{HlF~5n0eeu< zx@K9(P0!*+XM7qaBN@7go-l#GrSlGXVYOzgrM^T-^2ksuVMMZpYts~F+CkCBih3I}L!5TI%TjO6leb=OA+!&~&-Z9pS@Sd@ zC;XHPQL<52sHx-?CX#tfWNJirK<##KvVasD6Ju4dY0R7JgQN?8l;wF%#sR4KPE6P7 z{|(=9{9o`Lk6_mMm!G&>hy9sNgv$O8AP+27+i>UQ#fST8YJZ4ZuO3nI@|Mun!+SsG zzVB656yr8xW1Q{md?~8y&snydGm5X6$jn$s5z32Qd)PG)CeMM@gz8L4j`a7RUA~hW zd>2!9!3+|tA!j=>@j%=sxF35l$EJxDnO|B-6h8IULG+!@^h#{|*9%==kevL9{|5dT zW8P)5od!wAuD(3dTP7aW-B+C%M1O4lYUIIwT`?hlvC29+|359HCyNodiM9Z#lbFDZ zV^Q5nP$lM$1S(urT#2K#y916qf?ms{2B-H^;|V1!x@^g-4^B__`ngasi`QCw3M}jI zFld0D@L2I3u(3JcwY-y`)i3zvmdsE3tDi4w{LOAM_~_5CZU6F(fAiSuoYBS4Rvfo3 z)((o@sK5TjaOd_{{emx&ALS3@!mi|){!5S_&;X#wH^^5lCTJf*USbmbBM9^B59W>r z%7MMd$^}p@F78S=Bv157` z(JL?$$y%wiGKA5eS#5r|XYHa$1_bQ^xn5|U?m3%*LL;?ei1dDW?c3q8Lzj|5gdz|( znrH1S0&~maJcyvJB{~}m6NqQkg@<}6WyBBC?)ll8rl+U#1)bR-wFBO7&Af`LxgP;Z z9~8lH(&68DimNokRU_zBYwH0fvusjrQi%#cp40NDeNJdi#g|#6d#{QWcMf_04!g&9 zMThk~V0uhVqqgQ2&Sjcy-t?D+JL=uH$c9^!OoGlI#y<_F&#_#6eRc7IJOf=?fzvgo z(U)_=@5BX-oGtDbIZ1Ep(Mj(xY#P>F-Kfo0B*8izsyI`?mJ{-X@n_wijHt<unn3!q90(@miJk_p$q?GwGo&C%%(NDt1Iii(vS zlURCBg0$p>w)5_RuITK|V-*_3KKv{ts#lj80Yhg26>7CTAwW)PliYTb;(S|HRBq$k zXJwF*mtxrt(^Q()6@vtyq)uPStLz`AHEie$yj*b{&iJT{l=m{X%;I$9d<7V#d0&@H z&_wPpI3?g|aoo%$vg;2Det6BbiBxZWeU!MTx-rg%?tB%RK=Cw+6#==*2}@YTZhrK0C!;i3&%Acc9sned-{xr$TkQFM$)y^jg`)yJ>X z*4l+DP7oq2V{w495{31ylp{@g3zBSj{XbUR&fl5gE%uai+3K#LaleL;xkS>tEI(4c zd(d56yU!++za2myF6K7&BA5rfa20(qPo?Fix5dI1wI&Gsl+Z{+s7!X*c{;G;X!d?v zdfi`A&BGOKqEovPAwPnwSB0x(ljzlRU83muXV2So3%QMeGEnlmE#EWDbiN-NZOA(3 znYUVTI4}P$&UIttIoaQpx%jIx3*6pMjVVurWYWOb4FacEp9Vks=Jsck$+^J1;%2nS z@2W`fH3G;JHJbW5DM+m@nxvmBxd=N?#HM650X4j3>gz9+)s$B_Uv3Lrr~!r;pXzGD6<3+uMEgADEs{Q!@n%SI$!bpbHxld0-&*qYy*F$= zU{g)heLmVd(SOZNF*t>ZdrqV~TOnP!JBpg1!amNVC8?mk>7N>s+{lGxmP8GX1b94k z2qI(;tgwV0x65bP95OZKUrT-c3`Y=sXSwsvGH++B5iRIF+*vcI_$bomI2-iJN9TRv zhmiQ^!0T7;Ff$2EW(mJ8*JZ3^9OVy$ww>5SYE|v#gk=lny^FT^Mt~VIMJ{xny-W@V zU42^xv-Bae8t;kC#dnz?Rf(LAHM|22?03DczP?}fcS$?EQ_i$n!ZOQG)-&En<2XaV zi^!c*vi3R1xRKdOUh~AoVHgFNd|H>)bm6)f&%8lNJPG^^qUZ7TrZv>gb!;gW4Et25 zZ|~y7k4i7;)q)XurSt;RjOOf4{|Y>5x8~C9jA8HBy9Cmvsp;tt8z=U2C+cNDpPaa# zwoUR9XQD0E*RGSXJf5Akr@`Aj4cu|y(4T;9FxSjBLszVl|EAbYzmS2h+$N8p)b$4T z2LT^GsV_?FO=0%@0b1Kyb20hD{CfK|W{69jf;O)C856|S29m+{iYusMFlR9e-v8J# zz3c+P*Gx{KvBji_@@JHP*WN>C0P)kiM-#Ncxn3#QhsAO%)%UwdZCea=wzdQs>vD4Y zWb@3s!&H})CO);WSRsj@iFpcq_&u?E>q%&t+vpQ@uZGB}Y~|qBF9}gB{oz^LWmgs} znhY*hy=sYQ9qmyuixHok^FP`m!1XlBR}MZZ9Fs0pkS%IiwI?9 zCr#gQhoo0te~pq{AfzL1$aq1bxN5J&2{BtNCpBjd2Vhiu+t|f8A1mOY{nDp8axJgI|zaa?0fed?WWu{g6%U3q+fs~ z^Ay2`eLTeqM~S(VoVlE_+L$D_l*I$L6Pqe`#oQ}T_dbxow;8sO?%#zkG}7_B&#k^* z=diC?8na#CF`G67%HLeHfqtoK*esYZn6<2Hp3cht_)}c%j&~86&wKHeQV~Yx&pX}N zj3C!nqj$U=Prm6Nj&^HVJd7=~F;MW-ot`%kX16*BWpuk7{R&Z6HF=&GLrE7)D(%=U z7>?XR`d4ys$*3T5kqv^T|LU$u0JlCxNjbX611kLzC4}ul4BQnzU;5Z#=Ad*RRNgcemSZIb`fbX8xAtw)|mCZQl1oJbuUcM+(gH&b;OB$}8UJI?099N;PG7 zQ(E1*H{~~y9@QoByj_FdzZ)^sQXV~8@OE4w`HkP*k(b2JU+RGzDT`4u6kA=;0``wa z;(L)VhHq#bH_B%xC0vedo-|uXpO%AArSbSC8qMv7PGeJXb!WOd?9rkcWz;@6d5?+x zbIG%9tJ=MFO|GXK#^++#yf6La8!KJ$je32cSz|ZV7(y#la$A5%%ed-pFE2q7N~uuO zH(v_ulBlTq5X7zhN0~JunLble_~nzs45lb=p)ZEf2-eAZXiAc3vm7ejBrr{X=Gz-x zr;{nTs?*3-PT$y7>zwNX)kfKfp$}ynv_BpsXl3gOG~>-jDylx4-YTv9`2^yT0^KiC z8UjEMk55~lyxq+(*;$VzuTbXknwNx<&FIfX$E(Rr$Zze0HRPF93CpdIo_Cc#Z*G6+ zSnT`LnuFrQJV!4RP$skO#NVTf(O24Bxt3V2;|gHwa7Y#xqMIU%4kO+3ztQy9zNfG0 zm}lB;h%{v%r?vo}(rj-kb8cXGyQeKfr?fo;R7t)9+CXmTShQ z?LFvZ`5_kgVd1LE_6IZLB$3#@UD&<@&gLK-i@yn*qq?#ap(^hKIE2rgeFA7-#9m!u z8i~5O-CuHLf%lwatA~H(eK#YGCIElNM3LInK*-6(7@1!epZjWFHAGiu9;&snq`kd} zZ+Ju0_op_Qn{%O?*o(g}c`4;UQeW(ps)PDGN=I$0kC2g_dULXnX?h*pw z4ZZLFo@Zv>nKd*2yld8)vyhXs&)zxvo2{SgN`#tINUdGihp`TB{ooW2_h3K9MN?*n-a zx+4@6kxqFjaV;;C{R}Y&T6xdA#Wxe2WU^BatP>Sf{NSG%ubcpGsS`wo55NS-Ct}>b4t*q>nlwx~?e8>-0YL4Se zJ=7x2@K6&GNP*bZ+Ds|(Itt3^75lkZvxioRJvW!ERf8563JUb`fX9v=pMVMvkxA68 zas0Ods)LE(Fjc6s`t!gC$ii%g*J8vuvjqS9f1{k`3aA6hf*ZR(u zU!)Tjhn*29XxX3Jyt%j;I?&PnLHCmp;!he)5%_jKAof#UTq|Yq~Lr&J<59STZ9XWE)`q5g+RrM@z;Z>EMkSQl`zo1a= z?Y=U2Rt=K;BgOh`C;Da?tHZ}-#j(|xz@}*2r4OewD_VBSNmu&OFv&E>99UP3I2cep9pKhEIH1Y{}hl3#V`3oZgXoN^fbp3vS~kqEuO5 z_FCwu!OrEm6+%E|)q3WrUxNKiKfMrJ96zpdQAsSb9q>!B2cN}l5N}!tt8H-QMp|qV zPg%yiAs13rh787+-}RKGxgI`k{3+JCE0p|#L{Tx^L2_zX7j=FUxP8VWsTEou?K5(i zxXkP%pC=VufQ3cMG4BA$5*OM!)IUB9&l^x%vNmLPcFvHLSnRo3RN2(GJgJ~Vyf3cZ zsw$LG7!Qm1(R}R2s@}jV>?0VzI(>V@Lmp+gKGvyQF$BJ0GyKs2_M6aqZT&5+$t`|% z)O|j3H47S6mdtcKuxhoNo4@%cI*WZLaYc`YilEbkcaB~?jW5Yl*qfDbQO^!Xn^M(zu>{=AX(WAhny2vbLOJ@#U-cah7R6hMy%q>;LwQ} zMyHY$GLIraXCh(3)8D5Uhq90Rbb#OUY6RcmSr6p}M6q65vQ?YrDhC`Ua$Z61+>=%@ zy8}S*nbE7`tEObVxutjh6wVNO(ne1`KI4Lj88x1>q#ALz*HAh<%3j=Dp95!!Z9 zhhj^f)4OlZxw>y1V>`$w_<-htb>D|SUK&>Xl{egcWRQ0#i^ za4o>*+Atq`RlrT@0y5@xSLz2uP4nSM0Di>-iZ%J6Ir8{a6MYEm`{mbyWM!!WVY{xqx-;Ms5pO(UF&g&? zD0p7Yp?%B?(*~Br^Jcp&rAbrEZ`rNH&TBQFyPH*J;2wBW%#jT_^{f4cWmhuu`U3;y z!vjkmhoWK5abIEa>S3&y2bW!e2o*rI#obMfQ%Zyem6QIP>_|BV_YP}q&|`Xvm#|K1 zjJtU&8z0xnGt^oxvocnem>192yL4_AUNrv*gbIa2Hnbujah|pLPfE8Q2|6CWH_zpk zdzb#6^j+FjwH#Z2t+8d5*>?-d=OF~7mazUlL0GFO!aMv$xmcob;m!k++3#WS=A0$+fP zJaL?RM>VYiybfVSud4JSZk3vHY&UzqWyi1&l0z5@1*@Qpn&-r}H*6KEk2QT|Ga|1< z!i^PG)hqx^>s}|x1I=<1x}z%F5{PP8xC%$;l0}_^$%uJKe@eCU)zJ>US$0 z*k;GX))LKIWB|M2lmlIUr;(jX)g#)=M<4BEtL7KoC=@H_HtJ}!*h@d_ETChOCV(%x4MHQ@FFlv(d%ID%g=#7%i+5gkr-fcJ z4YxG8j*{3H5b>o8n(lD}-)V~Jv8UPsnC87s_$-Eu*0nxvDT|(yOWF>wZ;}AD6N(Er z-gH;KWCS0^!qx*7Y10FbgOw#=Sat`;$+PJ`98^Iurt^uDpP*?N#y@~xv~OAHJA$$b z&bYd(#?Uk=zp3-<4M~m6q>M`0i+Sua;57c=fo)qle>pHv7!Q4aWxhvFl(wgxKHT9w z>8&yA69st#ts>jATd0#C$#1|EL0h`z}=XeqmT`M^B^JdGHk(K=|ve+@wO%>?l!N z@QyMl@iwT_=kJhT^yO5!Ue-I4##p!qaiP zAr%1`duIAMLvmgm8)B4J9nBn4VG63lpfF9lic8l^Xc;g%^j-7-50uu#{I(jp-H2I4 zFVCy8N2_$;0D7Qu@!}i<1ty-@#TxeIFkh{T^3U6T{qb__21aOOU_^}Cmv&-h>h^Hd zQfR=GOXpTlD@3SnLCZI0A-JU_FuNMzKpc~7f;Qe~jT_*M0*sHc&3%AfD0Y<*u|er{_SCIi7(*p~Uw^tvgYvQ5^^4C>O4V{E))rpr zp?v81Fy7b-weyWozH%#TJXe`XdaG+!=Zo(TjY_G|dh&0Gtn3Yb(G(IiUO#`2C(y}r zOwCwBry26Nw97NM4XekMm*>SZKVK35dCjGPjg$1q67O)(U_7O;{TkYS@Yu?G&Fdy@ z1snqHcBUlkpv|TI2!5g$sIgtE;~#{gogWr`DblNL=W|M^ub|rfl1A){;MQh)(x7b3 zbSUu!O2#76VO|Oyg-Uxlsv)N*8(Kw0HQIeZgQ)jBf+jjE)nPqIwbo~q*d{q8JCwH! ztANCJL4$-}MY|x6CP>Wct?hf-V}kb1_rLlYwrVFdg|;5SqwNw81CJ~adz*`o4`=E@ z8+|g6XFQi)!C`qR{^%Y#*UEYU_!E6`jp{y&LiKSy&*qZ=lFEzKX)cCtMe&Towvya_ zT%Op|K^S#6zjdD)9zG}9mYe7fBkW5UB4`g}-+s$m-tX2v(n*QzYd3}FcBBwLR=s$h zW_wbW8Pu_M&IB#IfHJV3B}zFt!|ivM=^D!xKtS@&0?PZ3f(pcnXL>xDHU!Oun_r?1 zNgYgU@ZhN`NixtmO;6ksALqvlhjqQ7KFb`wEAd>qWyk$if94>EGJk<5h5qcNJOHNQ z*;7EWOMJe*pWC)5i*kL<@~u;LHX_T?e$w#8^6(t@^^Z+Z?wxaBBEj~;JS>Vq3F4Hb zSlcR=2f8_epN$;eh6ga?08eqYRS{6u4*8)zUm4;9(x-;?yPPX{YBqb5sQL|6^H!yw zEww@R@-5PguF{|AFrPuQ_oLjLaz0m}pI^aB9TJRWEq@D`u)BfBSPvfrkf73xUPk$N zU60+qf3Wi|5DYFzejzInM;Ylk>jmU-nufH zymLFEZE0=s91z*Q3EG2Hdx`6u3mwmS>mJql$r_%pDy{hLPdAUNZ;n<}MKEucHBJMc zc6;7gogZ+|i<3Pin*0^4QBQrV!nqvPfl5NVb}4vK^+++ut(X`M|1-O2rTrpdR>>61 z%gm(@gqikJ2b6F8+o|ct7u%?&76p7NqA2>^qW}c~dKFdX^oyH0Ht)%TdQccq3UYUc z!*htequi}kBHX=L(C?IP(Fo?P!iqYU91djgXwlrNWS`7nXTCc~?g}o9pH;?IzJi)Am13>^ z>EyLU#BfKet+NPMBhM7DR8K=dhghMA`uYR8STL#1(CCH;oRTtlRM=^P2fA=F1}fOT z-yPA2lKgIe#QX7%qW~+lH?c|QIJ&1pkm@qjA-0RQ=aFJKaT%0y_C#P2<6RiXOq=kt z{h1neCzl5v=FzAjE%5oZOTz*ow1UssV8XK>C)i&0%iE zh^g&^Gh^aL8#|F=GMMA_ga>-r$n3_u!>>3DS*-32DxH*afx{)psgB`(s^-@uYyoE; zp&L8NzzOYSR-Qxm)yuF|qnufba-6dZFiYl>}!3m)*~S~z!k<0or^4Nb0_{@I6bBz{bGM)z3eOR^O9hP%t& zI@{wSq{3Vi5bMnQpwkBxbF3Fg4ugX79guH@J1D*f!<}!rs{vztzfSat&uDKiI8sFv%+P|pid=sR3g7gy-ZP^6qZ-fgkV309 zw`|Z&Py}4G51iy|!~Q1;#jFK-ZLRj_eUVqzf(`x93I9!coB1~A@0+|Nekp#>#qN(d z%((1_|D2-yLX-Qi%n#}AA=~%Y%uP10-kVcSX6tK^-IpBqh_1LPnZ*Mj@F8-*uEZP# zr5P(}cdEw0^_vY_I}yC?Y^m~QnM1_us(YRQ?U)#uE+Gp z?k7~laIsx_#o{nc;5U?i&9JsloCd_(+SIEMlmT|I_RWU+u%l)D?M&fO5yzHos(CKI zs4T@6XK^!M%acL~6K8>EXv|SVw9Q2N2iEN8@H7o3^@{1d93kIN{h5R}b+yV$2`{WV z<6b1rYhRen{iRIQcBGyuA-+;b$~3I_zoSfq|4^n5K2;!hSjBs0b5kOZSHnhh2W*1D z4GkgLO_FGpC3-9G>Ru?m*gMJT7?GoRpGD>?oj0s(gWUE@R%q{)d4{B@FuJy{_zrj1 zG;3q;`&MYJ%S}eV1iMt2T`A!Wld47rbZVQ7@u4g13AH+g1S%bLX)7jqtsmF&s=36H zQAF)WXfopUr`IW$SaR9vq+?LK(o8OXsI0i^)$rZYZslHa%==jo#KM}~@_VP&$|EjY zWist|m%?MYkTjbci+f1K>Koi8QPSHdNyzt;Sb~M(A~XRTC)VDGV_-C;`FEpNc_R*K zDXKBQA%>5lR&mLLbU@AeZQSmohV3wIH<Y3?1~&cHI>e- zv*ic2Ug!FE6aBrxCdI%}Jh-Nv*89nAx zDBG7$7%}Quw71(g&!X->(y}<$4m!;xXP{i{ZYjCcZpUCGaS~^n(+u{W9BOF+TO1}q zXc&}|37ZAfcz-AKza@qApAa(F9Of&jNe1W?*Efri!V#;psE*nUyJkHBI(AVtdmkX$ zhcaDfE^k8{nd_5YXxmipCb<5V>Q}>NmpqOJKe2pUI^1f|@b)3^DQzCME)n!F?CvH5 zOxlNlSuAqk7li0uYX5<0Yw*yeR&n#zAhUh6Q?qKJITu3DH0X@>_SwuB zpFyVry`v^rFDPYy7Dj_#A0(XN!DjdwOmov-PXr{?q})dlljIIoGM=L!-KGxtv*X ztz;|VQq&n0IevuqUBozFQLQi8Dn=Jyv;TC%+GkN735ECF*%@WFr97cRuaYHaQjlxx zs?3aukehd>xEV&zN+xHyIUSCU{af8OV~XPPch>#U<& zKPDoTb>HGR_L8?&r5e8|WLwM)Q&rt=5Y|yY9F6I&W-Pnzcx+u%)vbaiecoX2N>m&kR} zh6-9ACY;k@*6Y_l1a(8Y&`TG6_7Ru47F5j5l0s1U$d z=r%xcvuggZ)#Wntia#0HxgN|D0O(P3L(>e^DkOn{uiN*J`B#-t-jv$b?ywuYv`88N~(S$5D zhisnc)9C?1>X$w&FeHyzA00Jc{XjA>;MrP9mFIkU)@unZ)>_i2=rJC=ApI28)uqBN zI!$Z)P`lWBS2MBxisgt_F@%Zd3#OhqL@|s2A@t=lC>-MND{|jCtYA_h6SG_AmEx)0CpTX$_#V?m(A&Rk84DF&O+-EY-ZvvG-jVaQ z_4=xft>WF@qRLBnhJMYG)3;sl^Dg{A=$3bOAIVT$F9r}|ekt?lpp^cj|$ZbCouz9?U z{>VQjHxZyY>l0S}>jSg0pPmbwKI-;q#-qti-HLk=gP%}Smn<-)g!i*QzI#DEX&3pI2^Gbwac{vkv;X*oQN{Ds|}d5M|0z>6efDHdDTKSadWhl>Mp zb};OBrB52zf8VHa^L_$VXDc&8{9+QVEqVj3PeGt3t|WGh+K-os+~EWF%G-En*}%=P@^bGvt#NI;@9 zH~%_=pmFoSjx_yjNxcUW_Z8VS#A+UuhcIe1C`gE=}Z`a_z0aE*<< z?>N!MO}`1_F2q?598Vv?>93!F$UD|J5f@=M3ylGCMkeytWC7a&S3-!D z+y2q#DQT!q;xyLX^WK=vblO3y=Zkf8ca=_>Ya(}6i>^=4yB{j(Pak$$ZyNtF-D#_n zs3M3^#r-z+vFRxKNEiti4&j5utnkt2pAHHu(g7SvxmeqmD-nldLUCLYqGbVlro73I zbl;rkng!ML^m**Jt#E%4q{3l4xH^yf`Mb(AENuRCbT>;Ft=(~Hc8~IZlA(rx~bUYh&M^Ly^l7|^T*ElX+V}>zE9m2B+sL`t( z@;vt3+Lu$~jw%rd2hG_In`em%qdU*8#Xx?9c_PHm*wPUbrEPw)XLPV^F zHStF6Yuh4Hw5>u!n8x((-NdpGytzB40NsT3-5jhT>S=nNvmc$m4WV#!&t;Vq zT*bYFO#gCI!DX)tz~}MP981uhhmH!kZo_Q!4MI@Yv}i{430lAhr@zi_CE&)Y5N%c~ zGM1SZGJ{_~Z%sV7KBV$}NbH1AxfHV$!hOvl4|UUw8y)(@Vm>&VC;dYr<~SCxJLvzR z4(P}Hh8602lbb(z;-*LQo?u>H+8z%V^G4CPa(!~{<-_sq^LqvRW+Hcbm>rs^f?Fod zMup@dwXdQ9*h#&>d?o*Mi@IrBslMq@x8>hqHCXH4NAbG3K{2(pSj= zLOWrGQQ@fWOpIrynG*;hs#PUA&Ovxp` z8@D3h^#bF&b@+5ef9^$s1PMp0AcK8yH*wY0S{@)__mzpUa8Xy6Q@g~!cc8E?Uo40h zu(q}e7ft5*g9B#H?C}4l@%L8*KK>6~5N+-O{ueuV@`oM#xzqIlp4Q(iEhtY|{yqO- z^x@HeGIRXDLKFXg@&8k96GZaFF21yaL%&fHo4Y1yH4flWqRq}i_V+_D6M*8HANIYn zveUl@?l}QjOD9Pei?9!!8lb-gqRjMop*Kv49w$te&A4Bm;R2i%a)f}N8Y#yT^E3rP z?Hb8{i~D{O2UMfAGuSf+metgLH5iz+>lr9DhOnPpOq$y=2XgSkg*_E}p-xH7YP&~c zke37Y%zzG%Hq&(TG{uq4o>$1fwv3P?7wtI_wzffS7UzO#9RJ>TzS(=1g2Jv%SS`j+ z15I{6_#U{-*3?Q=4AQnJ%KA0pu?N4z2>R!zkfl?dG5K{wnRJ3sum(f%>PI=6`HIMQ zS@4}v@6Q@wpFl;b(0h{t!lmSqwx8!KwbX-0BiYn@3Q$TP5DtX??(nMgQd)4AsCVGz z8lO(#g!*sMFZooCZ+GUHjek+`QH}Ta#0f@=82ql415ycR`=%6~S?Mh9*W z!=6xxLS6TPS()PnOmnjVbckDCf1m5fb}=~amo-_5DJqd{EcNT1GtCD2B_%(VgRno_ zJui)WvUYzYm=76Yej$=|dKKe6YwuE_6%HsjeXZ32OGP&5r&1fYaf=GjtI9 zp#M3JanFsQ<_~(^Ckl;l}!xZJO8(tFI^AGt4ZGU z>7E_KL5gtGR#n@Hi#$muUu-7->m*7*Bo#8$YyGHT*DUe#`oJAgtkyS+!g-pow+Dqj zF%8agZ4ff|^PMEojAT93f1g`U`Q(xI@o<5{)mg@XZdC``$L_=UkWT~bKG$mRqvz@x zwv|`?-7Y={9Kou##Gs3G(yc%sm|!t~t0#eP`$vHGT2Whl$8qS0ifHOr%4h$Ux+M4l zZ;Hhuly-+|rleK#X(lgwl1Ec&-A^q71!wa+Ej07Ztlo|Fr_PS{ zqWZi%IgOgM=GonzoR`Jf${dQ~Z`@M9x#j!Y5S}5cUbVHIh(r@E;wer)6$y;T(+4qq zs1v5<_i?t|0t0sW&x+t-?mox8rej+Qbakeb2NP|a$?@b2OJz7) zsQpFlS2#Gl&?dp%j&It=1|zCwGwe|hXm@=r2~ z9v^ZxZS^1+)Ur1`lb|ai)7?C~VNTHeH~H5?sCb6VAPtec?e_vX4XO!vU@UO(-^8~> zOV~R`m0QER+&-P4s5OFrufKlu-)2o@0sl9t{GZ(at7g_$BH|UE{qGt0e%UdTVL6DH z?LIKXnf3Yp8?}+L`usx$`ahRq%N-u*;XD7A0Kw5r+r1F`Z^co*?|i5D|IWhTgEn%b zW;WCJAAOQf%wsBf ztJnEXLX_$tW5NZ&{?@sN&mZp71SX|fW>AbHE*Jm~#el)3L2jRO8N^YjNyi%({&|ky zzo<%$Yp1zF*C`K=A4nTm4@S;;H}dJv6Qzc#w`8m38kEUOURH`G&R3KMJ<;f4;>vWm zwB^Abso~GuQ?n?_cHnU_1cIU|mYEfE)i90EYHUwfiT)8y_6GlmCY#6k^cV8}IfFE( zOtsR6H3 z*tUxM1bgD(KOS2h>*9u!FuRlvFh9P4$#KW~6+I|R*hPmO;brr9jUL@MT&W<^CS}6B zjn9m<=dT8J_L`822~eG|xey!|HcTUq^+i`egIs*}_fu*JIa7`5&LRDduParhL2fr| zY)VD&#J48>#vr+v#NPYrkQUfVwp^b7(Mc$>{!euh5u{E+{;y7g+WAK(nQs0W-7@jc z$!qKAsJVAN_r@>69uU=M2hYwSootDwF31vN~BxsnA0-tNx>O+zfrqE{sq|7dbQKP7aRCKb`9DLtetE4}`!f0@s{%3}@Sl6Rixb-Ikb{W~7jSAGHCX6F0nC8}ke_`l zqa6tB7B%xMKREu>+NScfG~K&zxde#x`G7=LW3qvcsy_amnAsO!e@^_Ppoo{>uja~G z-mZN1o^o=L)&)O=(}UM8MPWgpTUA+Jg^#m`z`JV_v4sgf65E_rcIN`-gxjNag}(P? zkaisrx>D2N1Z*EmXP}U-^{@TNxeYL0Fp&pOz)O)W@2)Q{AWHjJg#Ol&Xj>k2!?Adc z)cYx+t1|%vu@uskjc{C$doS%lQ<>4{*@8ND9f&YS1GQ{pj>^3A485|S9F^i2$HIo^ zGPAR#eNnv(su??Ax?pI_T=!*SpPPqq-(FipXyp` zuX1)p%C32twzK;#vBa-?6Sc&%&mP*2#Vhf({!~eXx3Xj)NWn6Lx+UEJIib{dOE%&#)K_xY(UdF0C-c$6F zmi`azt7U(MlqMD@m%bN+n|7~do@`qhspvzWV133E@+)_|cm{D*aOOtLRZnH$7n#PU z&}+PE08W*JFQVQlCS`|?+^+Q`eL;p~=TN91pop&6V({cbtiPLJ3VI)o!W|mn z>la8rzLuh$B<$FutJgJM`xfJn+_k92x_OW*ha~uSbsDO7N_9^Ig}-9k_X04NFE9z~ zBh7dK)#;2Q0DKb_ySNHpJZ%KQL4m)-ZedL~`**zjF-l2GUYOAzH@~iU!4U*IG>0LD zh*?JzEPsx&Yi$L=t$5vbBSq_9eeyxqG!s}ezflDV-}JmKIDinsvhxbru6})Qb!=?) zoBm_S%(Ycp1xk#B`&Oi#0GCt#p-i7{m}&s>JxrHek0`S8tD5w99_W7$F2ue@%2wtz zkM>vC9f(^KGi8~?hXoM|>nu8^iuM~g8ljeNRU+&SS<)$^4s$to%HG(LdJ(7DJzIjS zAXZ|SlSj4LWaPE4W;-ZoNlvqk*O6w{HiVh%BF6ZW={N}e?Oa?TgL(hj%yhNLvC>BS zqXs0COYhKRb2zi8Ui&=oGQwNgljPDC@`|Yh5FUN3UT5=!h8GvNV zsmH3!Wpcn7Lzd4%HqZJ8d%dCRE*TEte@M`sr%+QVn_?s<1^fIRTQzBeV&306bS(xpC_wKGzz%A8LbdPG74iSd z31jziLQ4caaz;GK{=PrFUg`J}u|ccDDT$2JWWock7v&|=GJeBPG!kQ}*Vqrb&0$K) zQR)i!aE$TrGiERT=<5-MMxM|B>&CMwlhilqIMofWH$SzP6cv9oSw3eg}UzT_C~u9mO*#6wSO>>wT>xS>zq`X zD>MGyX87+GRovX1XN6+f_ZHQvgQSkK-s6*(;ZlvrF9s--QJsAfd=sB7RYke|y(FGk z9$R8^q|2kxvC+qn5~-CBAN9;;%gm(_Jq$;Bc11s>O2u#@U4!y$E+L-r#AuFA9H5e` zwrjl(wu&6FtshyD?5?eOcSA@G#S_&c&h;M+h4gBj`QU{)Olvq&T_VSG`PsU0MuP8Z zUXkw8FHg+3M%;2H2&{et3GamqR^Jd zV>yqrGk7X{JneYlMAwGhQ+(3zMHvG5Z1z`Rp4-JbR&t)!SQ1pE>1Z1j>LI- zwXh-DA>g&AbI$ZuP}y#d>z%ihH?PyYgCxW)PvDQr^qBYBdzWsXKcoVP5%p-4=lER@ za;TxveF|ML3eY?THq`i}8b}6ym3wUTrQ6K7C+t@)!@#=<2CcGKp-l4{Xt6gJ%M0#a z{O*S{XWtx;=Z>tEPQbc0xTT*a7HOXpj)r|HS8>#f@Yi50rajnWZVT6%*nZZ&XdNwZ zPGfq}oo7>dvJ84xAmHTTgmM7k82r0H5;*o)?cJVG5!(JrZJp_RNjutK(Q)HRmV5qeqT! zYL?u;AT&*vO1KVRj;bwS!+GApja`#$f+80qGrpvGJzMiEIL)L|xL>hIb9Tr2+B_H5&R8v!tO+Y*&irGT71G&QY4ekAw z*obK3!?MDy7z^xD2v`WRe$%kX+4HB96gWr<9G~}N{nb^bO(WEb)mA71Js9VnP)Ugu zkwskb>!tFQX8$<5LP{#~l`jZ83jka0_H5M z)W$Gj#sfw2P~U1;99I?SB)XYy9f-9Nw5B7wT8mmFUp~J4F@+EMYZ))rFFR{mc+c$4 z{-dOXe(|21y*}SPs)j5L)b~J)kfTpj4_-ZHKV+8UA=)Z0($CXvTJoiPr@Y<~@rs@V z<3KOu@!i0?1o~oua3TDOfcL@(0xkv9PjP*-C1E;7RiAX&co&%el~G8GB3hAHtx(I+ zmJ9~{HpfuuuIabickLA3nhC5qXZZ4y@s=bm-i>-S$;4LJy+#gQ7{*pMf@TSE*xfEg zdO@Y1o^FCP`bX1?gG?U~uKl-F`@%&WNACYp`QI_j7%JKbS>FkRiF) zcbL4+x8vEe7_XxA|AQga4?X^~V7qm-eAS~qvNT`EpX5g=Mj&nn-oluEs!vap)@=zE zX0&ct<$eeaDb3Cw{WRWvpN@{)7fkx8(?v;Ey<8#75h`PnM2gko=+^L5=+yr&5rraHUUCe-H z=~%uJ-v4oomXu8ioo*8xpQg+>4u|jCt<4pLC+mYSv3=GEIWOH}j6wwsl6AHpBfras zT&@eh_6Lmx%uISt|Mh_0(e#QinKUfx*O*?GVV-s)l zGK5IKoKI0zRttF@@h6IQ(Kqj8UN4Dpv$8=Ki+UvTbf|y{SE+~vTZ<&W5H;)P(c3h| zr^SIo=<(LEUBULaGtyA1Uzbluzfsq%2_eH6_D7sa>`TKhIF@JDyxW;|@E{$p>Bymk zx|utq3mh$KZL()}%NxS5cX!t8pb}BAsy^2XGMmn-A{$A8%kw{y%o{QHX7+$);euPB zXm(Zm@IRmfDr!JfLr$JWHJ$;dDvL&el7k8mApd_Lk`zNx(2O;soXWqBO|uZ_z@r9m zLjV52Ws>9utCIi31Yl?w?y;T1Bc-!Yt^203K$C ADF6Tf literal 0 HcmV?d00001 diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/benchmarkTemplate.json b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/benchmarkTemplate.json new file mode 100644 index 0000000000..13bb3070da --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/benchmarkTemplate.json @@ -0,0 +1,154 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "endpoint": { + "type": "string", + "metadata": { + "description": "Your account endpoint" + } + }, + "key": { + "type": "securestring", + "metadata": { + "description": "Your account key" + } + }, + "throughput": { + "type": "string", + "metadata": { + "description": "The throughput for the container." + } + }, + "documents": { + "type": "string", + "metadata": { + "description": "The amount of items to insert." + } + }, + "parallelism": { + "type": "string", + "metadata": { + "description": "The degree of parallelism." + }, + "defaultValue": "-1" + }, + "cleanUpOnFinish": { + "type": "string", + "metadata": { + "description": "Whether to delete the container after the benchmark is run." + }, + "defaultValue": "false" + }, + "containerGroupName": { + "type": "string", + "metadata": { + "description": "Name for the container group" + }, + "defaultValue": "CosmosDBBenchmark" + }, + "containerName": { + "type": "string", + "metadata": { + "description": "Name for the container" + }, + "defaultValue": "cosmosdbsdkperf" + }, + "volumeName": { + "type": "string", + "metadata": { + "description": "Name for the gitRepo volume" + }, + "defaultValue": "cosmosdbsdk" + }, + "port": { + "type": "string", + "metadata": { + "description": "Port to open on the container and the public IP address." + }, + "defaultValue": "80" + }, + "cpuCores": { + "type": "string", + "metadata": { + "description": "The number of CPU cores to allocate to the container." + }, + "defaultValue": "4" + }, + "memoryInGb": { + "type": "string", + "metadata": { + "description": "The amount of memory to allocate to the container in gigabytes." + }, + "defaultValue": "8" + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": {}, + "resources": [ + { + "name": "[parameters('containerGroupName')]", + "type": "Microsoft.ContainerInstance/containerGroups", + "apiVersion": "2020-11-01", + "location": "[parameters('location')]", + "properties": { + "containers": [ + { + "name": "[parameters('containerName')]", + "properties": { + "image": "mcr.microsoft.com/dotnet/sdk:6.0", + "ports": [ + { + "port": "[parameters('port')]" + } + ], + "resources": { + "requests": { + "cpu": "[parameters('cpuCores')]", + "memoryInGB": "[parameters('memoryInGb')]" + } + }, + "volumeMounts": [ + { + "name": "[parameters('volumeName')]", + "mountPath": "/mnt/gitrepos/", + "readOnly": false + } + ], + "command": [ + "/bin/bash", + "-c", + "[concat('cd /mnt/gitrepos/azure-cosmos-dotnet-v3/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate;export ENDPOINT=\"', parameters('endpoint'),'\";export KEY=\"', parameters('key'),'\";export THROUGHPUT=\"', parameters('throughput'),'\";export DOCUMENTS=\"', parameters('documents'),'\";export PARALLELISM=\"', parameters('parallelism'),'\";export CLEANUPFINISH=\"', parameters('cleanUpOnFinish'),'\";chmod +x run.sh;./run.sh')]" + ] + } + } + ], + "osType": "Linux", + "restartPolicy": "Never", + "ipAddress": { + "type": "Public", + "ports": [ + { + "protocol": "TCP", + "port": "[parameters('port')]" + } + ] + }, + "volumes": [ + { + "name": "[parameters('volumeName')]", + "gitRepo": { + "repository": "https://github.com/Azure/azure-cosmos-dotnet-v3" + } + } + ] + } + } + ] +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/parameters.json b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/parameters.json new file mode 100644 index 0000000000..f8b1983b33 --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/parameters.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "endpoint": { + "value": "" + }, + "key": { + "value": "" + }, + "throughput": { + "value": "" + }, + "documents": { + "value": "" + }, + "parallelism": { + "value": "-1" + }, + "cleanUpOnFinish": { + "value": "false" + }, + "containergroupname": { + "value": "CosmosDBBenchmark" + }, + "containername": { + "value": "cosmosdbsdkperf" + }, + "volumename": { + "value": "cosmosdbsdk" + }, + "cpuCores": { + "value": "4" + }, + "memoryInGb": { + "value": "8" + } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/run.sh b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/run.sh new file mode 100644 index 0000000000..3b8855a95f --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/run.sh @@ -0,0 +1,2 @@ +cd .. +dotnet run -c Release -e ${ENDPOINT} -k ${KEY} -t ${THROUGHPUT} -n ${DOCUMENTS} --pl ${PARALLELISM} --CleanupOnFinish ${CLEANUPFINISH} -w InsertV2BenchmarkOperation \ No newline at end of file From 83bad122481303a66e7a1ae9a84ec9fbdb561aee Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Fri, 26 May 2023 13:51:46 -0400 Subject: [PATCH 122/164] Update README.md (#3875) URL typo. --- .../Tools/Benchmark/ARMTemplate/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md index f829b79bc6..7821e1eefd 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/ARMTemplate/README.md @@ -10,7 +10,7 @@ For the below steps, you will **need an Azure Subscription**. Just click in the **Deploy to Azure button** and it will guide you into automatically configuring, deploying, and running the benchmark. -[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-cosmos-dotnet-v3%2Fmaster%2FARMBenchmarking%2FMicrosoft.Azure.Cosmos.Samples%2FTools%2FBenchmark%2FARMTemplate%2FbenchmarkTemplate.json) +[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FAzure%2Fazure-cosmos-dotnet-v3%2Fmaster%2FMicrosoft.Azure.Cosmos.Samples%2FTools%2FBenchmark%2FARMTemplate%2FbenchmarkTemplate.json) Please populate the `endpoint` and `key` for your Azure Cosmos DB account. You can [obtain these from the Azure Portal or through CLI](https://learn.microsoft.com/azure/cosmos-db/secure-access-to-data?tabs=using-primary-key#primary-keys). From c5ef47e1e70fab32ff1aa81b370607d8b9b7fbb8 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Sat, 27 May 2023 23:40:23 +0530 Subject: [PATCH 123/164] moved to new file (#3876) --- docs/SdkDesign.md | 29 ----------------------------- docs/observability.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 docs/observability.md diff --git a/docs/SdkDesign.md b/docs/SdkDesign.md index 62d4a751f7..f3f2ec1581 100644 --- a/docs/SdkDesign.md +++ b/docs/SdkDesign.md @@ -186,32 +186,3 @@ flowchart LR ConsistencyWriter --> TCPClient ``` -## Distributed Tracing (Preview) - -For detail about usage of this feature, please see the [Azure Cosmos DB SDK observability](https://learn.microsoft.com/en-us/azure/cosmos-db/nosql/sdk-observability?tabs=dotnet) - -```mermaid -flowchart TD - classDef orange fill:#f96 - classDef blue fill:#6fa8dc - subgraph ClientContextCore - OpenTelemetryRecorderFactory --> CheckFeatureFlag{isDistributedTracing Enabled?} - CheckFeatureFlag --> |Yes| CreateActivity(Start an Activity or Child activity with specific kind Using DiagnosticScope
and preloaded attributes like containerName, databaseName, operationType) - CreateActivity --> HandlerPipeline - GetResponse --> TriggerDispose(Trigger Dispose of Disagnostic Scope) - TriggerDispose --> CheckLatencyThreshold{Is high latency/errored response?} - CheckLatencyThreshold -- Yes --> GenerateTraceEvent(Generate Warning or Error Trace Event With Request Diagnostics) --> StopActivity - CheckLatencyThreshold -- No --> StopActivity - StopActivity --> SendResponse(Send Response to Caller):::blue - end - OperationRequest[Operation Request]:::blue --> ClientContextCore - subgraph Application - OperationCall(User Application):::orange - end - OperationCall(User Application):::orange --> OperationRequest - CheckFeatureFlag --> |No| HandlerPipeline - HandlerPipeline --> OtherLogic(Goes through TCP/HTTP calls
based on Connection Mode):::blue - OtherLogic --> GetResponse(Get Response for the request) - SendResponse --> OperationCall - -``` \ No newline at end of file diff --git a/docs/observability.md b/docs/observability.md new file mode 100644 index 0000000000..b74b55cd21 --- /dev/null +++ b/docs/observability.md @@ -0,0 +1,36 @@ +# .NET SDK Observability Feature Design + +## Distributed Tracing (Preview) + +**Source to capture operation level activities**: _Azure.Cosmos.Operation_\ +**Source to capture event with request diagnostics** : _Azure-Cosmos-Operation-Request-Diagnostics_ + +For detail about usage of this feature, please see the [Azure Cosmos DB SDK observability](https://learn.microsoft.com/azure/cosmos-db/nosql/sdk-observability?tabs=dotnet) + +```mermaid +flowchart TD + classDef orange fill:#f96 + classDef blue fill:#6fa8dc + subgraph ClientContextCore + OpenTelemetryRecorderFactory --> CheckFeatureFlag{isDistributedTracing Enabled?} + CheckFeatureFlag --> |Yes| CreateActivity(Start an Activity or Child activity
with preloaded attributes) + CreateActivity --> HandlerPipeline{Handler Pipeline} + GetResponse --> TriggerDispose(Trigger Dispose of Diagnostic Scope) + subgraph Dispose + TriggerDispose --> CheckLatencyThreshold{Is high latency/errored response?} + CheckLatencyThreshold -- Yes --> GenerateEvent(Generate Warning or Error Event With Request Diagnostics) --> StopActivity + CheckLatencyThreshold -- No --> StopActivity + end + StopActivity --> SendResponse(Send Response to Caller):::blue + end + OperationRequest[Operation Request]:::blue --> ClientContextCore + subgraph Application + OperationCall(User Application):::orange + end + OperationCall(User Application):::orange --> OperationRequest + CheckFeatureFlag --> |No| HandlerPipeline + HandlerPipeline --> OtherLogic(Goes through TCP/HTTP calls
based on Connection Mode):::blue + OtherLogic --> GetResponse(Get Response for the request) + SendResponse --> OperationCall + +``` \ No newline at end of file From ee7f86ddd2ea141103c0d57c82e8ff429cd1f6ed Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Tue, 30 May 2023 20:16:32 +0530 Subject: [PATCH 124/164] Direct Package Upgrade 3.31.0: Refactors code to make compatible with latest direct (#3877) * upgrade to 3.31.0 * add more regions * enable dt for operations * updated contract file --- Directory.Build.props | 2 +- Microsoft.Azure.Cosmos/src/DocumentClient.cs | 7 ++++++- Microsoft.Azure.Cosmos/src/Regions.cs | 10 ++++++++++ .../src/Routing/GatewayAddressCache.cs | 2 +- .../Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs | 4 ++-- .../Contracts/DotNetSDKAPI.json | 10 ++++++++++ 6 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index ef1ffd2e01..52e815227a 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.34.0 3.34.0 preview - 3.30.8 + 3.31.0 2.0.1 2.0.1 preview diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index 451166618d..068bb5b857 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -6644,6 +6644,11 @@ private void InitializeDirectConnectivity(IStoreClientFactory storeClientFactory } else { + Documents.Telemetry.DistributedTracingOptions distributedTracingOptions = new () + { + IsDistributedTracingEnabled = this.isDistributedTracingEnabled + }; + StoreClientFactory newClientFactory = new StoreClientFactory( this.ConnectionPolicy.ConnectionProtocol, (int)this.ConnectionPolicy.RequestTimeout.TotalSeconds, @@ -6667,7 +6672,7 @@ private void InitializeDirectConnectivity(IStoreClientFactory storeClientFactory addressResolver: this.AddressResolver, rntbdMaxConcurrentOpeningConnectionCount: this.rntbdMaxConcurrentOpeningConnectionCount, remoteCertificateValidationCallback: this.remoteCertificateValidationCallback, - isDistributedTracingEnabled: this.isDistributedTracingEnabled); + distributedTracingOptions: distributedTracingOptions); if (this.transportClientHandlerFactory != null) { diff --git a/Microsoft.Azure.Cosmos/src/Regions.cs b/Microsoft.Azure.Cosmos/src/Regions.cs index 853bc48267..666ec0435b 100644 --- a/Microsoft.Azure.Cosmos/src/Regions.cs +++ b/Microsoft.Azure.Cosmos/src/Regions.cs @@ -349,5 +349,15 @@ public static class Regions /// Name of the Azure Poland Central region in the Azure Cosmos DB service. ///
public const string PolandCentral = "Poland Central"; + + /// + /// Name of the Azure Malaysia South region in the Azure Cosmos DB service. + /// + public const string MalaysiaSouth = "Malaysia South"; + + /// + /// Name of the Azure Italy North region in the Azure Cosmos DB service. + /// + public const string ItalyNorth = "Italy North"; } } diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index d99be609ea..182243ec40 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -85,7 +85,7 @@ public GatewayAddressCache( GatewayAddressCache.ProtocolString(this.protocol)); this.openConnectionsHandler = openConnectionsHandler; - this.isReplicaAddressValidationEnabled = Helpers.GetEnvironmentVariableAsBool( + this.isReplicaAddressValidationEnabled = Helpers.GetEnvironmentVariable( name: Constants.EnvironmentVariables.ReplicaConnectivityValidationEnabled, defaultValue: false); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index 366cc68811..4773c7de96 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -548,11 +548,11 @@ internal static CustomListener ConfigureOpenTelemetryAndCustomListeners() // Open Telemetry Listener Util.OTelTracerProvider = Sdk.CreateTracerProviderBuilder() .AddCustomOtelExporter() // use any exporter here - .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*") + .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation") .Build(); // Custom Listener - Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*", "Azure-Cosmos-Operation-Request-Diagnostics"); + Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", "Azure-Cosmos-Operation-Request-Diagnostics"); return Util.TestListener; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 074be1ee37..e5b95a7ed9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -6680,6 +6680,11 @@ "Attributes": [], "MethodInfo": "System.String GermanyWestCentral;IsInitOnly:False;IsStatic:True;" }, + "System.String ItalyNorth": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "System.String ItalyNorth;IsInitOnly:False;IsStatic:True;" + }, "System.String JapanEast": { "Type": "Field", "Attributes": [], @@ -6710,6 +6715,11 @@ "Attributes": [], "MethodInfo": "System.String KoreaSouth;IsInitOnly:False;IsStatic:True;" }, + "System.String MalaysiaSouth": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "System.String MalaysiaSouth;IsInitOnly:False;IsStatic:True;" + }, "System.String NorthCentralUS": { "Type": "Field", "Attributes": [], From 89cc257324d8caf8fe9826c7dfebf88add7ad42c Mon Sep 17 00:00:00 2001 From: jiajunpeng-msft <32749342+jiajunpeng-msft@users.noreply.github.com> Date: Wed, 31 May 2023 09:12:59 -0700 Subject: [PATCH 125/164] [Preview] Integrated cache: Adds BypassIntegratedCache to DedicatedGatewayRequestOptions (#3836) * Integrated cache: Add BypassIntegratedCache to DedicatedGatewayRequestOptions Currently, integrated cache is used by default for Dedicated Gateway. Customers cannot skip cache for particular requests or data unless they shift to multi-tenant Gateway,which will lose the benefits of Dedicated Gateway. For customers to have more control over integrated cache, we're introducing a new "RequestOption" called "BypassIntegratedCache". This option will allow the customer to decide whether to use integrated cache for each request or not. If this value is set to true, the item/query will be served from backend and won't be cached in Dedicated Gateway. * Move this feature to public preview * Address comments 1. Add more tests 2. Add more detail and example code for BypassIntegratedCache * Revert changes in EncryptionCustomAPI --------- Co-authored-by: Jiajun Peng Co-authored-by: Matias Quaranta --- .../src/RequestOptions/ItemRequestOptions.cs | 1 + .../src/RequestOptions/QueryRequestOptions.cs | 1 + .../DedicatedGatewayRequestOptions.cs | 42 +++++++++ .../Contracts/DotNetPreviewSDKAPI.json | 25 +++++ .../DedicatedGatewayRequestOptionsTests.cs | 94 +++++++++++++++++++ 5 files changed, 163 insertions(+) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Resource/Settings/DedicatedGatewayRequestOptionsTests.cs diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/ItemRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/ItemRequestOptions.cs index 59b5b245f7..d807f42f57 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/ItemRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/ItemRequestOptions.cs @@ -151,6 +151,7 @@ internal override void PopulateRequestOptions(RequestMessage request) } DedicatedGatewayRequestOptions.PopulateMaxIntegratedCacheStalenessOption(this.DedicatedGatewayRequestOptions, request); + DedicatedGatewayRequestOptions.PopulateBypassIntegratedCacheOption(this.DedicatedGatewayRequestOptions, request); RequestOptions.SetSessionToken(request, this.SessionToken); base.PopulateRequestOptions(request); diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index 8711836191..8ce4761c31 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -264,6 +264,7 @@ internal override void PopulateRequestOptions(RequestMessage request) } DedicatedGatewayRequestOptions.PopulateMaxIntegratedCacheStalenessOption(this.DedicatedGatewayRequestOptions, request); + DedicatedGatewayRequestOptions.PopulateBypassIntegratedCacheOption(this.DedicatedGatewayRequestOptions, request); request.Headers.Add(HttpConstants.HttpHeaders.PopulateQueryMetrics, bool.TrueString); diff --git a/Microsoft.Azure.Cosmos/src/Resource/Settings/DedicatedGatewayRequestOptions.cs b/Microsoft.Azure.Cosmos/src/Resource/Settings/DedicatedGatewayRequestOptions.cs index e3b7dccf3f..9ca854388c 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Settings/DedicatedGatewayRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Settings/DedicatedGatewayRequestOptions.cs @@ -23,6 +23,40 @@ public class DedicatedGatewayRequestOptions /// public TimeSpan? MaxIntegratedCacheStaleness { get; set; } + /// + /// Gets or sets if bypass the integrated cache or not associated with the request in the Azure CosmosDB service. + /// When set this value to true, the request will not be served from the integrated cache, and the response will not be cached either. + /// + /// Default value is false. + /// + /// + /// + /// + /// +#if PREVIEW + public +#else + internal +#endif + bool? BypassIntegratedCache { get; set; } + internal static void PopulateMaxIntegratedCacheStalenessOption(DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions, RequestMessage request) { if (dedicatedGatewayRequestOptions?.MaxIntegratedCacheStaleness != null) @@ -37,5 +71,13 @@ internal static void PopulateMaxIntegratedCacheStalenessOption(DedicatedGatewayR request.Headers.Set(HttpConstants.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness, cacheStalenessInMilliseconds.ToString(CultureInfo.InvariantCulture)); } } + + internal static void PopulateBypassIntegratedCacheOption(DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions, RequestMessage request) + { + if (dedicatedGatewayRequestOptions != null && dedicatedGatewayRequestOptions.BypassIntegratedCache.HasValue && dedicatedGatewayRequestOptions.BypassIntegratedCache.Value) + { + request.Headers.Set(HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache, true.ToString(CultureInfo.InvariantCulture)); + } + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index 08d0d65a7e..de49584da2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -377,6 +377,31 @@ }, "NestedTypes": {} }, + "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "System.Nullable`1[System.Boolean] BypassIntegratedCache": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "System.Nullable`1[System.Boolean] BypassIntegratedCache;CanRead:True;CanWrite:True;System.Nullable`1[System.Boolean] get_BypassIntegratedCache();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_BypassIntegratedCache(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.Nullable`1[System.Boolean] get_BypassIntegratedCache()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "System.Nullable`1[System.Boolean] get_BypassIntegratedCache();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_BypassIntegratedCache(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_BypassIntegratedCache(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, "Microsoft.Azure.Cosmos.Fluent.ChangeFeedPolicyDefinition;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Resource/Settings/DedicatedGatewayRequestOptionsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Resource/Settings/DedicatedGatewayRequestOptionsTests.cs new file mode 100644 index 0000000000..b0f5cd2ea0 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Resource/Settings/DedicatedGatewayRequestOptionsTests.cs @@ -0,0 +1,94 @@ +namespace Microsoft.Azure.Cosmos.Tests.Resource.Settings +{ + using Microsoft.Azure.Documents; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + public class DedicatedGatewayRequestOptionsTests + { + [TestMethod] + public void BypassIntegratedCacheHeaderIsSetWhenTrue() + { + DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions = new DedicatedGatewayRequestOptions + { + BypassIntegratedCache = true + }; + + ItemRequestOptions itemRequestOptions = new ItemRequestOptions + { + DedicatedGatewayRequestOptions = dedicatedGatewayRequestOptions + }; + + QueryRequestOptions queryRequestOptions = new QueryRequestOptions + { + DedicatedGatewayRequestOptions = dedicatedGatewayRequestOptions + }; + + RequestMessage itemRequestMessage = new RequestMessage(); + RequestMessage queryRequestMessage = new RequestMessage(); + + itemRequestOptions.PopulateRequestOptions(itemRequestMessage); + queryRequestOptions.PopulateRequestOptions(queryRequestMessage); + + + Assert.IsNotNull(itemRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + Assert.IsNotNull(queryRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + + Assert.AreEqual("True", itemRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + Assert.AreEqual("True", queryRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + } + + [TestMethod] + public void BypassIntegratedCacheHeaderIsNotSetWhenFalse() + { + DedicatedGatewayRequestOptions dedicatedGatewayRequestOptions = new DedicatedGatewayRequestOptions + { + BypassIntegratedCache = false + }; + + ItemRequestOptions itemRequestOptions = new ItemRequestOptions + { + DedicatedGatewayRequestOptions = dedicatedGatewayRequestOptions + }; + + QueryRequestOptions queryRequestOptions = new QueryRequestOptions + { + DedicatedGatewayRequestOptions = dedicatedGatewayRequestOptions + }; + + RequestMessage itemRequestMessage = new RequestMessage(); + RequestMessage queryRequestMessage = new RequestMessage(); + + itemRequestOptions.PopulateRequestOptions(itemRequestMessage); + queryRequestOptions.PopulateRequestOptions(queryRequestMessage); + + + Assert.IsNull(itemRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + Assert.IsNull(queryRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + } + + [TestMethod] + public void BypassIntegratedCacheHeaderIsNotSetWhenNotSet() + { + ItemRequestOptions itemRequestOptions = new ItemRequestOptions + { + DedicatedGatewayRequestOptions = new DedicatedGatewayRequestOptions() + }; + + QueryRequestOptions queryRequestOptions = new QueryRequestOptions + { + DedicatedGatewayRequestOptions = new DedicatedGatewayRequestOptions() + }; + + RequestMessage itemRequestMessage = new RequestMessage(); + RequestMessage queryRequestMessage = new RequestMessage(); + + itemRequestOptions.PopulateRequestOptions(itemRequestMessage); + queryRequestOptions.PopulateRequestOptions(queryRequestMessage); + + + Assert.IsNull(itemRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + Assert.IsNull(queryRequestMessage.Headers[HttpConstants.HttpHeaders.DedicatedGatewayPerRequestBypassIntegratedCache]); + } + } +} From 327422b02180029899d283ee385d3f7e2abeb24b Mon Sep 17 00:00:00 2001 From: vipulvishal-ms <110802706+vipulvishal-ms@users.noreply.github.com> Date: Thu, 1 Jun 2023 22:05:15 +0530 Subject: [PATCH 126/164] Client Encryption: Adds Microsoft.Azure.Cosmos compatibility to version 3.34.0 (#3874) * chaging Microsoft.Azure.Cosmos support version * resolved merge conflicts --- Directory.Build.props | 4 ++-- Microsoft.Azure.Cosmos.Encryption/changelog.md | 10 ++++++++++ .../src/Microsoft.Azure.Cosmos.Encryption.csproj | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 52e815227a..7eecd3c8e2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,8 +4,8 @@ 3.34.0 preview 3.31.0 - 2.0.1 - 2.0.1 + 2.0.2 + 2.0.2 preview 1.0.0-preview05 1.1.0-preview3 diff --git a/Microsoft.Azure.Cosmos.Encryption/changelog.md b/Microsoft.Azure.Cosmos.Encryption/changelog.md index a5e7101074..a8edf3441d 100644 --- a/Microsoft.Azure.Cosmos.Encryption/changelog.md +++ b/Microsoft.Azure.Cosmos.Encryption/changelog.md @@ -3,6 +3,16 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [2.0.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.2) - 2023-06-01 + +#### Added +- [#3874](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3874) Adds support for Microsoft.Azure.Cosmos up to 3.34.0. + +### [2.0.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.2-preview) - 2023-06-01 + +#### Added +- [#3874](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3874) Adds support for Microsoft.Azure.Cosmos 3.34.0-preview. + ### [2.0.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption/2.0.1) - 2023-03-11 #### Added diff --git a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj index f58b171cd5..94e93aa6fe 100644 --- a/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/src/Microsoft.Azure.Cosmos.Encryption.csproj @@ -28,11 +28,11 @@ - + - + From 3e3bbe5d53bd771ead625f5aee6e55cca9dd8764 Mon Sep 17 00:00:00 2001 From: Rinat Minibaev <132935507+rinatmini@users.noreply.github.com> Date: Thu, 1 Jun 2023 15:03:04 -0700 Subject: [PATCH 127/164] CosmosClient: Fixes missing Trace when converting HTTP Timeout to 503 (#3866) * Added tracing when converting HTTP Timeout to 503 * Fixed tracing when converting HTTP Timeout to 503 * Resolved PR comments * Using ITrace as part of ClientSideRequestStatisticsTraceDatum * Refactoring * Test update * Unit tests fix --- .../src/GatewayAccountReader.cs | 2 +- .../src/Handler/TransportHandler.cs | 2 +- .../src/HttpClient/CosmosHttpClientCore.cs | 4 + .../src/Routing/ClientCollectionCache.cs | 2 +- .../src/Routing/PartitionKeyRangeCache.cs | 2 +- .../ClientSideRequestStatisticsTraceDatum.cs | 13 ++- .../RegionContactedInDiagnosticsBenchmark.cs | 2 +- .../TraceWriterBaselineTests.TraceData.xml | 6 +- .../CosmosHttpClientCoreTests.cs | 92 ++++++++++++------- .../GatewayAccountReaderTests.cs | 23 +++-- .../GatewayStoreModelTest.cs | 35 ++++--- ...entSideRequestStatisticsTraceDatumTests.cs | 6 +- .../Tracing/ContactedRegionsTests.cs | 2 +- .../Tracing/TraceTests.cs | 2 +- .../Tracing/TraceWriterBaselineTests.cs | 6 +- 15 files changed, 121 insertions(+), 78 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/GatewayAccountReader.cs b/Microsoft.Azure.Cosmos/src/GatewayAccountReader.cs index 2754dfaa40..5413103fee 100644 --- a/Microsoft.Azure.Cosmos/src/GatewayAccountReader.cs +++ b/Microsoft.Azure.Cosmos/src/GatewayAccountReader.cs @@ -49,7 +49,7 @@ await this.cosmosAuthorization.AddAuthorizationHeaderAsync( using (ITrace trace = Trace.GetRootTrace("Account Read", TraceComponent.Transport, TraceLevel.Info)) { - IClientSideRequestStatistics stats = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace.Summary); + IClientSideRequestStatistics stats = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace); try { diff --git a/Microsoft.Azure.Cosmos/src/Handler/TransportHandler.cs b/Microsoft.Azure.Cosmos/src/Handler/TransportHandler.cs index e524214976..7baf8a7254 100644 --- a/Microsoft.Azure.Cosmos/src/Handler/TransportHandler.cs +++ b/Microsoft.Azure.Cosmos/src/Handler/TransportHandler.cs @@ -93,7 +93,7 @@ internal async Task ProcessMessageAsync( DocumentServiceRequest serviceRequest = request.ToDocumentServiceRequest(); - ClientSideRequestStatisticsTraceDatum clientSideRequestStatisticsTraceDatum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, request.Trace.Summary); + ClientSideRequestStatisticsTraceDatum clientSideRequestStatisticsTraceDatum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, request.Trace); serviceRequest.RequestContext.ClientRequestStatistics = clientSideRequestStatisticsTraceDatum; //TODO: extrace auth into a separate handler diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs index 0fde01afb5..c29c3a5b94 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Cosmos using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Core.Trace; using Microsoft.Azure.Cosmos.Resource.CosmosExceptions; + using Microsoft.Azure.Cosmos.Tracing; using Microsoft.Azure.Cosmos.Tracing.TraceData; using Microsoft.Azure.Documents; using Microsoft.Azure.Documents.Collections; @@ -361,9 +362,11 @@ private async Task SendHttpHelperAsync( } catch (Exception e) { + ITrace trace = NoOpTrace.Singleton; if (clientSideRequestStatistics is ClientSideRequestStatisticsTraceDatum datum) { datum.RecordHttpException(requestMessage, e, resourceType, requestStartTime); + trace = datum.Trace; } bool isOutOfRetries = CosmosHttpClientCore.IsOutOfRetries(timeoutPolicy, startDateTimeUtc, timeoutEnumerator); @@ -394,6 +397,7 @@ private async Task SendHttpHelperAsync( ActivityId = System.Diagnostics.Trace.CorrelationManager.ActivityId.ToString(), SubStatusCode = SubStatusCodes.TransportGenerated503 }, + trace: trace, innerException: e); } diff --git a/Microsoft.Azure.Cosmos/src/Routing/ClientCollectionCache.cs b/Microsoft.Azure.Cosmos/src/Routing/ClientCollectionCache.cs index 30ece5015b..530bbfceb5 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/ClientCollectionCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/ClientCollectionCache.cs @@ -186,7 +186,7 @@ private async Task ReadCollectionAsync( { headers.XDate = Rfc1123DateTimeCache.UtcNow(); - request.RequestContext.ClientRequestStatistics = clientSideRequestStatistics ?? new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace.Summary); + request.RequestContext.ClientRequestStatistics = clientSideRequestStatistics ?? new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace); if (clientSideRequestStatistics == null) { childTrace.AddDatum( diff --git a/Microsoft.Azure.Cosmos/src/Routing/PartitionKeyRangeCache.cs b/Microsoft.Azure.Cosmos/src/Routing/PartitionKeyRangeCache.cs index 4373d61f56..d9e2854b2b 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/PartitionKeyRangeCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/PartitionKeyRangeCache.cs @@ -316,7 +316,7 @@ private async Task ExecutePartitionKeyRangeReadChangeFe } request.Headers[HttpConstants.HttpHeaders.Authorization] = authorizationToken; - request.RequestContext.ClientRequestStatistics = clientSideRequestStatistics ?? new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace.Summary); + request.RequestContext.ClientRequestStatistics = clientSideRequestStatistics ?? new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace); if (clientSideRequestStatistics == null) { childTrace.AddDatum("Client Side Request Stats", request.RequestContext.ClientRequestStatistics); diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs index 10845f133f..def12c8262 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceData/ClientSideRequestStatisticsTraceDatum.cs @@ -33,9 +33,8 @@ internal sealed class ClientSideRequestStatisticsTraceDatum : TraceDatum, IClien private IReadOnlyList shallowCopyOfStoreResponseStatistics = null; private IReadOnlyList shallowCopyOfHttpResponseStatistics = null; private SystemUsageHistory systemUsageHistory = null; - public TraceSummary TraceSummary = null; - public ClientSideRequestStatisticsTraceDatum(DateTime startTime, TraceSummary summary) + public ClientSideRequestStatisticsTraceDatum(DateTime startTime, ITrace trace) { this.RequestStartTimeUtc = startTime; this.RequestEndTimeUtc = null; @@ -45,7 +44,7 @@ public ClientSideRequestStatisticsTraceDatum(DateTime startTime, TraceSummary su this.FailedReplicas = new HashSet(); this.RegionsContacted = new HashSet<(string, Uri)>(); this.httpResponseStatistics = new List(); - this.TraceSummary = summary; + this.Trace = trace; } public DateTime RequestStartTimeUtc { get; } @@ -75,6 +74,10 @@ public IReadOnlyDictionary EndpointToAddres public HashSet<(string, Uri)> RegionsContacted { get; } + public ITrace Trace { get; private set; } + + public TraceSummary TraceSummary => this.Trace?.Summary; + public IReadOnlyList StoreResponseStatisticsList { get @@ -502,11 +505,11 @@ public HttpResponseStatistics( if (responseMessage != null) { Headers headers = new Headers(GatewayStoreClient.ExtractResponseHeaders(responseMessage)); - this.ActivityId = headers.ActivityId ?? Trace.CorrelationManager.ActivityId.ToString(); + this.ActivityId = headers.ActivityId ?? System.Diagnostics.Trace.CorrelationManager.ActivityId.ToString(); } else { - this.ActivityId = Trace.CorrelationManager.ActivityId.ToString(); + this.ActivityId = System.Diagnostics.Trace.CorrelationManager.ActivityId.ToString(); } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Benchmarks/RegionContactedInDiagnosticsBenchmark.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Benchmarks/RegionContactedInDiagnosticsBenchmark.cs index bcf95ba776..0d3d2ffd81 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Benchmarks/RegionContactedInDiagnosticsBenchmark.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Benchmarks/RegionContactedInDiagnosticsBenchmark.cs @@ -42,7 +42,7 @@ private ITrace CreateTestTraceTree() private TraceDatum GetDatumObject(string regionName1, string regionName2 = null) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, Trace.GetRootTrace(nameof(RegionContactedInDiagnosticsBenchmark))); Uri uri1 = new Uri("http://someUri1.com"); datum.RegionsContacted.Add((regionName1, uri1)); if (regionName2 != null) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml index d3b996a0e9..8b6adc1c15 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml @@ -187,7 +187,7 @@ TraceForBaselineTesting rootTrace; using (rootTrace = TraceForBaselineTesting.GetRootTrace()) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, rootTrace); TransportAddressUri uri1 = new TransportAddressUri(new Uri("http://someUri1.com")); TransportAddressUri uri2 = new TransportAddressUri(new Uri("http://someUri2.com")); @@ -405,7 +405,7 @@ TraceForBaselineTesting rootTrace; using (rootTrace = TraceForBaselineTesting.GetRootTrace()) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, rootTrace); datum.ContactedReplicas.Add(default); TraceWriterBaselineTests.GetPrivateField>(datum, "endpointToAddressResolutionStats").Add("asdf", default); @@ -546,7 +546,7 @@ TraceForBaselineTesting rootTrace; using (rootTrace = TraceForBaselineTesting.GetRootTrace()) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, rootTrace); TraceWriterBaselineTests.SetEndRequestTime(datum,DateTime.MaxValue); HttpResponseStatistics httpResponseStatistics = new HttpResponseStatistics( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs index 0d475ca370..03fdb84ead 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosHttpClientCoreTests.cs @@ -42,14 +42,17 @@ static Task sendFunc(HttpRequestMessage request, Cancellati HttpRequestMessage httpRequestMessage = new HttpRequestMessage(HttpMethod.Post, new Uri("http://localhost")); - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => - new ValueTask(httpRequestMessage), - ResourceType.Collection, - timeoutPolicy: HttpTimeoutPolicyDefault.Instance, - new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow,new TraceSummary()), - default); - - Assert.AreEqual(httpRequestMessage, responseMessage.RequestMessage); + using (ITrace trace = Trace.GetRootTrace(nameof(ResponseMessageHasRequestMessageAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + new ValueTask(httpRequestMessage), + ResourceType.Collection, + timeoutPolicy: HttpTimeoutPolicyDefault.Instance, + new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), + default); + + Assert.AreEqual(httpRequestMessage, responseMessage.RequestMessage); + } } [TestMethod] @@ -111,15 +114,18 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio HttpMessageHandler messageHandler = new MockMessageHandler(sendFunc); using CosmosHttpClient cosmoshttpClient = MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler)); - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + using (ITrace trace = Trace.GetRootTrace(nameof(RetryTransientIssuesTestAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => new ValueTask( result: new HttpRequestMessage(HttpMethod.Get, new Uri("http://localhost"))), resourceType: ResourceType.Collection, timeoutPolicy: currentTimeoutPolicy.Key, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), cancellationToken: default); - Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); + Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); + } } } @@ -178,15 +184,18 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio HttpMessageHandler messageHandler = new MockMessageHandler(sendFunc); using CosmosHttpClient cosmoshttpClient = MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler)); - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + using (ITrace trace = Trace.GetRootTrace(nameof(RetryTransient408sTestAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => new ValueTask( result: new HttpRequestMessage(HttpMethod.Get, new Uri("http://localhost"))), resourceType: ResourceType.Collection, timeoutPolicy: HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), cancellationToken: default); - Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); + Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); + } } [TestMethod] @@ -216,15 +225,18 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio HttpMessageHandler messageHandler = new MockMessageHandler(sendFunc); using CosmosHttpClient cosmoshttpClient = MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler)); - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + using (ITrace trace = Trace.GetRootTrace(nameof(DoesNotRetryTransient408sOnDefaultPolicyTestAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => new ValueTask( result: new HttpRequestMessage(HttpMethod.Get, new Uri("http://localhost"))), resourceType: ResourceType.Collection, timeoutPolicy: HttpTimeoutPolicyControlPlaneRead.Instance, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), cancellationToken: default); - - Assert.AreEqual(HttpStatusCode.RequestTimeout, responseMessage.StatusCode, "Should be a request timeout"); + + Assert.AreEqual(HttpStatusCode.RequestTimeout, responseMessage.StatusCode, "Should be a request timeout"); + } } [TestMethod] @@ -245,13 +257,16 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio try { - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + using (ITrace trace = Trace.GetRootTrace(nameof(Retry3TimesOnDefaultPolicyTestAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => new ValueTask( result: new HttpRequestMessage(HttpMethod.Get, new Uri("http://localhost"))), resourceType: ResourceType.Collection, timeoutPolicy: HttpTimeoutPolicyDefault.Instance, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), cancellationToken: default); + } } catch (Exception ex) { @@ -282,14 +297,16 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio try { - - HttpResponseMessage responseMessage1 = await cosmoshttpClient.SendHttpAsync(() => + using (ITrace trace = Trace.GetRootTrace(nameof(NoRetryOnNoRetryPolicyTestAsync))) + { + HttpResponseMessage responseMessage1 = await cosmoshttpClient.SendHttpAsync(() => new ValueTask( result: new HttpRequestMessage(method, new Uri("http://localhost"))), resourceType: resourceType, timeoutPolicy: timeoutPolicy, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), cancellationToken: default); + } } catch (Exception e) { @@ -301,6 +318,9 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio CosmosException cosmosException = (CosmosException)e; Assert.AreEqual(cosmosException.StatusCode, System.Net.HttpStatusCode.ServiceUnavailable); Assert.AreEqual((int)cosmosException.SubStatusCode,(int)SubStatusCodes.TransportGenerated503); + + Assert.IsNotNull(cosmosException.Trace); + Assert.AreNotEqual(cosmosException.Trace, NoOpTrace.Singleton); } } @@ -344,13 +364,16 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio try { - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + using (ITrace trace = Trace.GetRootTrace(nameof(NoRetryOnNoRetryPolicyTestAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => new ValueTask( result: new HttpRequestMessage(HttpMethod.Get, new Uri("http://localhost"))), resourceType: ResourceType.Collection, timeoutPolicy: HttpTimeoutPolicyNoRetry.Instance, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), cancellationToken: default); + } } catch (Exception ex) { @@ -401,15 +424,18 @@ async Task sendFunc(HttpRequestMessage request, Cancellatio HttpMessageHandler messageHandler = new MockMessageHandler(sendFunc); using CosmosHttpClient cosmoshttpClient = MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(messageHandler)); - HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => - new ValueTask( - result: new HttpRequestMessage(HttpMethod.Post, new Uri("http://localhost"))), - resourceType: ResourceType.Document, - timeoutPolicy: HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), - cancellationToken: default); + using (ITrace trace = Trace.GetRootTrace(nameof(RetryTransientIssuesForQueryPlanTestAsync))) + { + HttpResponseMessage responseMessage = await cosmoshttpClient.SendHttpAsync(() => + new ValueTask( + result: new HttpRequestMessage(HttpMethod.Post, new Uri("http://localhost"))), + resourceType: ResourceType.Document, + timeoutPolicy: HttpTimeoutPolicyControlPlaneRetriableHotPath.Instance, + clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace), + cancellationToken: default); - Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); + Assert.AreEqual(HttpStatusCode.OK, responseMessage.StatusCode); + } } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs index 2fc8359f68..cf54b12a52 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAccountReaderTests.cs @@ -57,15 +57,20 @@ public async Task DocumentClient_BuildHttpClientFactory_WithHandler() receivedResponseEventArgs: null); Assert.IsNotNull(httpClient); - HttpResponseMessage response = await httpClient.GetAsync( - uri: new Uri("https://localhost"), - additionalHeaders: new RequestNameValueCollection(), - resourceType: ResourceType.Document, - timeoutPolicy: HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, - clientSideRequestStatistics: new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()), - cancellationToken: default); - - Assert.AreEqual(HttpStatusCode.Conflict, response.StatusCode); + + using (ITrace trace = Trace.GetRootTrace(nameof(DocumentClient_BuildHttpClientFactory_WithHandler))) + { + IClientSideRequestStatistics stats = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace); + HttpResponseMessage response = await httpClient.GetAsync( + uri: new Uri("https://localhost"), + additionalHeaders: new RequestNameValueCollection(), + resourceType: ResourceType.Document, + timeoutPolicy: HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, + clientSideRequestStatistics: stats, + cancellationToken: default); + + Assert.AreEqual(HttpStatusCode.Conflict, response.StatusCode); + } } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs index 36b350a751..e16f176e61 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayStoreModelTest.cs @@ -865,21 +865,26 @@ public async Task GatewayStatsDurationTest() HttpMessageHandler mockMessageHandler = new MockMessageHandler(sendFunc); CosmosHttpClient cosmosHttpClient = MockCosmosUtil.CreateCosmosHttpClient(() => new HttpClient(mockMessageHandler), DocumentClientEventSource.Instance); - Tracing.TraceData.ClientSideRequestStatisticsTraceDatum clientSideRequestStatistics = new Tracing.TraceData.ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()); - - await cosmosHttpClient.SendHttpAsync(() => new ValueTask(new HttpRequestMessage(HttpMethod.Get, "http://someuri.com")), - ResourceType.Document, - HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, - clientSideRequestStatistics, - CancellationToken.None); - - Assert.AreEqual(clientSideRequestStatistics.HttpResponseStatisticsList.Count, 2); - // The duration is calculated using date times which can cause the duration to be slightly off. This allows for up to 15 Ms of variance. - // https://stackoverflow.com/questions/2143140/c-sharp-datetime-now-precision#:~:text=The%20precision%20is%20related%20to,35%2D40%20ms%20accuracy - Assert.IsTrue(clientSideRequestStatistics.HttpResponseStatisticsList[0].Duration.TotalMilliseconds >= 985, $"First request did was not delayed by at least 1 second. {JsonConvert.SerializeObject(clientSideRequestStatistics.HttpResponseStatisticsList[0])}"); - Assert.IsTrue(clientSideRequestStatistics.HttpResponseStatisticsList[1].Duration.TotalMilliseconds >= 985, $"Second request did was not delayed by at least 1 second. {JsonConvert.SerializeObject(clientSideRequestStatistics.HttpResponseStatisticsList[1])}"); - Assert.IsTrue(clientSideRequestStatistics.HttpResponseStatisticsList[0].RequestStartTime < - clientSideRequestStatistics.HttpResponseStatisticsList[1].RequestStartTime); + + using(ITrace trace = Tracing.Trace.GetRootTrace(nameof(GatewayStatsDurationTest))) + { + + Tracing.TraceData.ClientSideRequestStatisticsTraceDatum clientSideRequestStatistics = new Tracing.TraceData.ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace); + + await cosmosHttpClient.SendHttpAsync(() => new ValueTask(new HttpRequestMessage(HttpMethod.Get, "http://someuri.com")), + ResourceType.Document, + HttpTimeoutPolicyDefault.InstanceShouldThrow503OnTimeout, + clientSideRequestStatistics, + CancellationToken.None); + + Assert.AreEqual(clientSideRequestStatistics.HttpResponseStatisticsList.Count, 2); + // The duration is calculated using date times which can cause the duration to be slightly off. This allows for up to 15 Ms of variance. + // https://stackoverflow.com/questions/2143140/c-sharp-datetime-now-precision#:~:text=The%20precision%20is%20related%20to,35%2D40%20ms%20accuracy + Assert.IsTrue(clientSideRequestStatistics.HttpResponseStatisticsList[0].Duration.TotalMilliseconds >= 985, $"First request did was not delayed by at least 1 second. {JsonConvert.SerializeObject(clientSideRequestStatistics.HttpResponseStatisticsList[0])}"); + Assert.IsTrue(clientSideRequestStatistics.HttpResponseStatisticsList[1].Duration.TotalMilliseconds >= 985, $"Second request did was not delayed by at least 1 second. {JsonConvert.SerializeObject(clientSideRequestStatistics.HttpResponseStatisticsList[1])}"); + Assert.IsTrue(clientSideRequestStatistics.HttpResponseStatisticsList[0].RequestStartTime < + clientSideRequestStatistics.HttpResponseStatisticsList[1].RequestStartTime); + } } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs index 2ec6e9db62..a28300d82f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ClientSideRequestStatisticsTraceDatumTests.cs @@ -48,7 +48,7 @@ public async Task ConcurrentUpdateHttpResponseStatisticsListTests() [TestMethod] public void DuplicateContactedReplicasTests() { - ClientSideRequestStatisticsTraceDatum clientSideRequestStatisticsTraceDatum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum clientSideRequestStatisticsTraceDatum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, Trace.GetRootTrace(nameof(DuplicateContactedReplicasTests))); clientSideRequestStatisticsTraceDatum.ContactedReplicas.Add(new TransportAddressUri(new Uri("http://storephysicaladdress1.com"))); clientSideRequestStatisticsTraceDatum.ContactedReplicas.Add(new TransportAddressUri(new Uri("http://storephysicaladdress2.com"))); clientSideRequestStatisticsTraceDatum.ContactedReplicas.Add(new TransportAddressUri(new Uri("http://storephysicaladdress2.com"))); @@ -89,7 +89,7 @@ public async Task ConcurrentUpdateStoreResponseStatisticsListTests() [TestMethod] public void VerifyIClientSideRequestStatisticsNullTests() { - IClientSideRequestStatistics clientSideRequestStatistics = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new Cosmos.Tracing.TraceSummary()); + IClientSideRequestStatistics clientSideRequestStatistics = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, Trace.GetRootTrace(nameof(VerifyIClientSideRequestStatisticsNullTests))); Assert.IsNotNull(clientSideRequestStatistics.ContactedReplicas); Assert.IsNotNull(clientSideRequestStatistics.FailedReplicas); Assert.IsNotNull(clientSideRequestStatistics.RegionsContacted); @@ -101,7 +101,7 @@ private async Task ConcurrentUpdateTestHelper( { using CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new Cosmos.Tracing.TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, Trace.GetRootTrace(nameof(ConcurrentUpdateTestHelper))); Task backgroundTask = Task.Run(() => backgroundUpdater(datum, cancellationTokenSource.Token)); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ContactedRegionsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ContactedRegionsTests.cs index 6f6a84cbe2..53a04e5228 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ContactedRegionsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/ContactedRegionsTests.cs @@ -54,7 +54,7 @@ private ITrace CreateTestTraceTree() private TraceDatum GetDatumObject(string regionName1, string regionName2 = null) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, Trace.GetRootTrace(nameof(ContactedRegionsTests))); Uri uri1 = new Uri("http://someUri1.com"); datum.RegionsContacted.Add((regionName1, uri1)); if (regionName2 != null) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs index ff27842308..ad21070609 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs @@ -97,7 +97,7 @@ public void ValidateStoreResultSerialization() HashSet storeResultProperties = typeof(StoreResult).GetProperties(BindingFlags.Public | BindingFlags.Instance).Select(x => x.Name).ToHashSet(); string datumKey = "ClientStats"; Trace trace = Trace.GetRootTrace("Test"); - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.UtcNow, trace); trace.AddDatum(datumKey, datum); ReferenceCountedDisposable storeResult = StoreResult.CreateForTesting(storeResponse: new StoreResponse()); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs index 67bafdbf56..fe3dc7054f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceWriterBaselineTests.cs @@ -336,7 +336,7 @@ public void TraceData() TraceForBaselineTesting rootTrace; using (rootTrace = TraceForBaselineTesting.GetRootTrace()) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, rootTrace); TransportAddressUri uri1 = new TransportAddressUri(new Uri("http://someUri1.com")); TransportAddressUri uri2 = new TransportAddressUri(new Uri("http://someUri2.com")); @@ -382,7 +382,7 @@ public void TraceData() TraceForBaselineTesting rootTrace; using (rootTrace = TraceForBaselineTesting.GetRootTrace()) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, rootTrace); datum.ContactedReplicas.Add(default); TraceWriterBaselineTests.GetPrivateField>(datum, "endpointToAddressResolutionStats").Add("asdf", default); @@ -416,7 +416,7 @@ public void TraceData() TraceForBaselineTesting rootTrace; using (rootTrace = TraceForBaselineTesting.GetRootTrace()) { - ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, new TraceSummary()); + ClientSideRequestStatisticsTraceDatum datum = new ClientSideRequestStatisticsTraceDatum(DateTime.MinValue, rootTrace); TraceWriterBaselineTests.SetEndRequestTime(datum,DateTime.MaxValue); HttpResponseStatistics httpResponseStatistics = new HttpResponseStatistics( From 387ab62dbb55bcc99491bf16b88a32ad1cd663a5 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Fri, 2 Jun 2023 22:09:59 +0530 Subject: [PATCH 128/164] AI Integration: Fixes Open Telemetry Example (#3868) * first draft * add filter * revert csproj * fix sample * changed log message * remove unused library --- .../Usage/OpenTelemetry/AppSettings.json | 6 ++-- .../Usage/OpenTelemetry/OpenTelemetry.csproj | 4 --- .../Usage/OpenTelemetry/Program.cs | 31 +++++++++++++------ 3 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json index 1ea1245434..e0d21e3e09 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/AppSettings.json @@ -1,7 +1,9 @@ { "Logging": { - "LogLevel": { - "Azure-Cosmos-Operation-Request-Diagnostics": "Information" + "OpenTelemetry": { + "LogLevel": { + "Azure.Cosmos.Operation.Request.Diagnostics": "Warning" + } } }, "CosmosDBEndPointUrl": "https://localhost:8081", diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj index 46fe296b80..83224d4570 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/OpenTelemetry.csproj @@ -12,10 +12,6 @@ - - - - diff --git a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs index 4d6431823e..b4729e41c7 100644 --- a/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs +++ b/Microsoft.Azure.Cosmos.Samples/Usage/OpenTelemetry/Program.cs @@ -25,8 +25,8 @@ static async Task Main() try { IConfigurationRoot configuration = new ConfigurationBuilder() - .AddJsonFile("AppSettings.json") - .Build(); + .AddJsonFile("AppSettings.json") + .Build(); string endpoint = configuration["CosmosDBEndPointUrl"]; if (string.IsNullOrEmpty(endpoint)) @@ -52,12 +52,16 @@ static async Task Main() serviceVersion: "1.0.0"); // Set up logging to forward logs to chosen exporter - using ILoggerFactory loggerFactory = LoggerFactory.Create(builder => builder.AddOpenTelemetry(options => - { - options.IncludeFormattedMessage = true; - options.SetResourceBuilder(resource); - options.AddAzureMonitorLogExporter(o => o.ConnectionString = aiConnectionString); // Set up exporter of your choice - })); + using ILoggerFactory loggerFactory + = LoggerFactory.Create(builder => builder + .AddConfiguration(configuration.GetSection("Logging")) + .AddOpenTelemetry(options => + { + options.IncludeFormattedMessage = true; + options.SetResourceBuilder(resource); + options.AddAzureMonitorLogExporter(o => o.ConnectionString = aiConnectionString); // Set up exporter of your choice + })); + /*.AddFilter(level => level == LogLevel.Error) // Filter is irrespective of event type or event name*/ AzureEventSourceLogForwarder logforwader = new AzureEventSourceLogForwarder(loggerFactory); logforwader.Start(); @@ -76,6 +80,7 @@ static async Task Main() { IsDistributedTracingEnabled = true // Defaults to true, set to false to disable }; + // using (CosmosClient client = new CosmosClient(endpoint, authKey, options)) { @@ -88,7 +93,6 @@ static async Task Main() await Program.RunCrudDemo(container); } - } finally { @@ -116,6 +120,15 @@ public static async Task RunCrudDemo(Container container) Console.WriteLine($"Read document with id: {i}"); } + try + { + await container.ReadItemAsync($"random key", new PartitionKey($"random partition")); + } + catch(Exception) + { + Console.WriteLine("Generate exception by reading an invalid key"); + } + for (int i = 1; i <= 5; i++) { await container.ReplaceItemAsync(new Item { Id = $"{i}", Status = "updated" }, $"{i}", new PartitionKey($"{i}")); From f19acb073173fd9cbf640044f506c45cbe478e80 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Mon, 5 Jun 2023 15:02:17 -0700 Subject: [PATCH 129/164] [Internal] Query: Adds OptimisticDirectExecute and RequiresDistribution headers (#3882) * Adding ODE and RequiresDistribution Headers * Fixed comments * Updated parameter in SwitchToFallbackPipelineAsync * Renamed TryUnwrapContinuationToken to UnwrapContinuationToken --------- Co-authored-by: neildsh <35383880+neildsh@users.noreply.github.com> --- .../Headers/CosmosMessageHeadersInternal.cs | 12 + Microsoft.Azure.Cosmos/src/Headers/Headers.cs | 12 + .../src/Headers/StoreRequestHeaders.cs | 6 + .../NetworkAttachedDocumentContainer.cs | 5 +- .../Query/Core/AdditionalRequestHeaders.cs | 36 ++ .../CosmosQueryExecutionContextFactory.cs | 1 - ...misticDirectExecutionQueryPipelineStage.cs | 92 ++++-- .../Pagination/QueryPaginationOptions.cs | 4 + .../Core/QueryClient/CosmosQueryClient.cs | 3 +- .../Query/v3Query/CosmosQueryClientCore.cs | 8 +- .../Query/v3Query/CosmosQueryContextCore.cs | 5 +- .../src/RequestOptions/QueryRequestOptions.cs | 2 +- .../Query/MockCosmosQueryClient.cs | 8 +- .../OptimisticDirectExecutionQueryTests.cs | 312 ++++++++++++++++-- ...ositiveOptimisticDirectExecutionOutput.xml | 15 +- ...misticDirectExecutionQueryBaselineTests.cs | 246 ++++++++++++-- 16 files changed, 655 insertions(+), 112 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/src/Query/Core/AdditionalRequestHeaders.cs diff --git a/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs b/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs index e8c584d782..f12595d832 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs @@ -177,6 +177,18 @@ public virtual string EndEpk set => this.SetProperty(HttpConstants.HttpHeaders.EndEpk, value); } + public virtual string OptimisticDirectExecute + { + get => this.GetValueOrDefault(HttpConstants.HttpHeaders.OptimisticDirectExecute); + set => this.SetProperty(HttpConstants.HttpHeaders.OptimisticDirectExecute, value); + } + + public virtual string RequiresDistribution + { + get => this.GetValueOrDefault(HttpConstants.HttpHeaders.RequiresDistribution); + set => this.SetProperty(HttpConstants.HttpHeaders.RequiresDistribution, value); + } + public abstract INameValueCollection INameValueCollection { get; } public virtual string this[string headerName] diff --git a/Microsoft.Azure.Cosmos/src/Headers/Headers.cs b/Microsoft.Azure.Cosmos/src/Headers/Headers.cs index 611de5f147..40f90c423a 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/Headers.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/Headers.cs @@ -171,6 +171,18 @@ internal virtual string PartitionKey set => this.CosmosMessageHeaders.PartitionKey = value; } + internal virtual string OptimisticDirectExecute + { + get => this.CosmosMessageHeaders.OptimisticDirectExecute; + set => this.CosmosMessageHeaders.OptimisticDirectExecute = value; + } + + internal virtual string RequiresDistribution + { + get => this.CosmosMessageHeaders.RequiresDistribution; + set => this.CosmosMessageHeaders.RequiresDistribution = value; + } + internal virtual string PartitionKeyRangeId { get => this.CosmosMessageHeaders.PartitionKeyRangeId; diff --git a/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs b/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs index 9147c31026..68086095f7 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs @@ -46,6 +46,12 @@ public override string XDate set => this.requestNameValueCollection.XDate = value; } + public override string OptimisticDirectExecute + { + get => this.requestNameValueCollection.OptimisticDirectExecute; + set => this.requestNameValueCollection.OptimisticDirectExecute = value; + } + public override string ConsistencyLevel { get => this.requestNameValueCollection.ConsistencyLevel; diff --git a/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs b/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs index 1132a40a35..7d8683c3fe 100644 --- a/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs +++ b/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs @@ -258,16 +258,17 @@ public async Task> MonadicQueryAsync( } QueryRequestOptions queryRequestOptions = this.queryRequestOptions == null ? new QueryRequestOptions() : this.queryRequestOptions; + AdditionalRequestHeaders additionalRequestHeaders = new AdditionalRequestHeaders(this.correlatedActivityId, isContinuationExpected: false, optimisticDirectExecute: queryPaginationOptions.OptimisticDirectExecute); + TryCatch monadicQueryPage = await this.cosmosQueryClient.ExecuteItemQueryAsync( this.resourceLink, this.resourceType, Documents.OperationType.Query, - this.correlatedActivityId, feedRangeState.FeedRange, queryRequestOptions, + additionalRequestHeaders, sqlQuerySpec, feedRangeState.State == null ? null : ((CosmosString)feedRangeState.State.Value).Value, - isContinuationExpected: false, queryPaginationOptions.PageSizeLimit ?? int.MaxValue, trace, cancellationToken); diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/AdditionalRequestHeaders.cs b/Microsoft.Azure.Cosmos/src/Query/Core/AdditionalRequestHeaders.cs new file mode 100644 index 0000000000..add4e15c99 --- /dev/null +++ b/Microsoft.Azure.Cosmos/src/Query/Core/AdditionalRequestHeaders.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos.Query.Core +{ + using System; + + /// + /// Captures additional headers to be sent in the web request. + /// + internal sealed class AdditionalRequestHeaders + { + /// + /// Enable backend to link multiple activityIds that belong to the same operation. + /// + public Guid CorrelatedActivityId { get; } + + /// + /// Let the backend know if continuations are expected for a certain query. + /// + public bool IsContinuationExpected { get; } + + /// + /// Let the backend know if a query is utilizing the OptimisticDirectExecute pipeline. + /// + public bool OptimisticDirectExecute { get; } + + public AdditionalRequestHeaders(Guid correlatedActivityId, bool isContinuationExpected, bool optimisticDirectExecute) + { + this.CorrelatedActivityId = correlatedActivityId; + this.IsContinuationExpected = isContinuationExpected; + this.OptimisticDirectExecute = optimisticDirectExecute; + } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index e276466f9d..8f35ff821a 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -477,7 +477,6 @@ private static TryCatch TryCreateOptimisticDirectExecutionC documentContainer: documentContainer, inputParameters: inputParameters, targetRange: new FeedRangeEpk(targetRange.ToRange()), - queryPaginationOptions: new QueryPaginationOptions(pageSizeHint: inputParameters.MaxItemCount), fallbackQueryPipelineStageFactory: (continuationToken) => { // In fallback scenario, the Specialized pipeline is always invoked diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs index 0664603024..e62ecf41f0 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/OptimisticDirectExecution/OptimisticDirectExecutionQueryPipelineStage.cs @@ -19,6 +19,7 @@ namespace Microsoft.Azure.Cosmos.Query.Core.Pipeline.OptimisticDirectExecutionQu using Microsoft.Azure.Cosmos.Query.Core.Pipeline.CrossPartition.Parallel; using Microsoft.Azure.Cosmos.Query.Core.Pipeline.Pagination; using Microsoft.Azure.Cosmos.Tracing; + using Microsoft.Azure.Documents; internal sealed class OptimisticDirectExecutionQueryPipelineStage : IQueryPipelineStage { @@ -28,11 +29,12 @@ private enum ExecutionState SpecializedDocumentQueryExecution, } - private const string optimisticDirectExecutionToken = "OptimisticDirectExecutionToken"; + private const string OptimisticDirectExecutionToken = "OptimisticDirectExecutionToken"; private readonly FallbackQueryPipelineStageFactory queryPipelineStageFactory; private TryCatch inner; private CosmosElement continuationToken; private ExecutionState executionState; + private bool? previousRequiresDistribution; private OptimisticDirectExecutionQueryPipelineStage(TryCatch inner, FallbackQueryPipelineStageFactory queryPipelineStageFactory, CosmosElement continuationToken) { @@ -40,6 +42,12 @@ private OptimisticDirectExecutionQueryPipelineStage(TryCatch> FallbackQueryPipelineStageFactory(CosmosElement continuationToken); @@ -55,22 +63,43 @@ public async ValueTask MoveNextAsync(ITrace trace) { TryCatch hasNext = await this.inner.TryAsync(pipelineStage => pipelineStage.MoveNextAsync(trace)); bool success = hasNext.Succeeded && hasNext.Result; - bool isPartitionSplitException = hasNext.Succeeded && this.Current.Failed && this.Current.InnerMostException.IsPartitionSplitException(); - - if (success && !isPartitionSplitException) - { - this.continuationToken = this.Current.Succeeded ? this.Current.Result.State?.Value : null; - } - else if (isPartitionSplitException && this.executionState == ExecutionState.OptimisticDirectExecution) + if (this.executionState == ExecutionState.OptimisticDirectExecution) { - this.inner = await this.queryPipelineStageFactory(this.TryUnwrapContinuationToken()); - this.executionState = ExecutionState.SpecializedDocumentQueryExecution; - if (this.inner.Failed) + bool isPartitionSplitException = hasNext.Succeeded && this.Current.Failed && this.Current.InnerMostException.IsPartitionSplitException(); + if (success && !isPartitionSplitException) { - return false; + this.continuationToken = this.Current.Succeeded ? this.Current.Result.State?.Value : null; + if (this.continuationToken != null) + { + bool requiresDistribution; + if (this.Current.Result.AdditionalHeaders.TryGetValue(HttpConstants.HttpHeaders.RequiresDistribution, out string requiresDistributionHeaderValue)) + { + requiresDistribution = bool.Parse(requiresDistributionHeaderValue); + } + else + { + requiresDistribution = true; + } + + if (this.previousRequiresDistribution.HasValue && this.previousRequiresDistribution != requiresDistribution) + { + // We should never enter this if statement as requiresDistribution flag can never switch mid execution. + // Hence, this exception should never be thrown. + throw new InvalidOperationException($"Unexpected switch in {HttpConstants.HttpHeaders.RequiresDistribution} value. Previous value : {this.previousRequiresDistribution} Current value : {requiresDistribution}."); + } + + if (requiresDistribution) + { + success = await this.SwitchToFallbackPipelineAsync(continuationToken: null, trace); + } + + this.previousRequiresDistribution = requiresDistribution; + } + } + else if (isPartitionSplitException) + { + success = await this.SwitchToFallbackPipelineAsync(continuationToken: UnwrapContinuationToken(this.continuationToken), trace); } - - success = await this.inner.Result.MoveNextAsync(trace); } return success; @@ -81,32 +110,46 @@ public void SetCancellationToken(CancellationToken cancellationToken) this.inner.Try(pipelineStage => pipelineStage.SetCancellationToken(cancellationToken)); } - private CosmosElement TryUnwrapContinuationToken() + private static CosmosElement UnwrapContinuationToken(CosmosElement continuationToken) { - if (this.continuationToken != null) + if (continuationToken == null) return null; + + CosmosObject cosmosObject = continuationToken as CosmosObject; + CosmosElement backendContinuationToken = cosmosObject[OptimisticDirectExecutionToken]; + Debug.Assert(backendContinuationToken != null); + + return CosmosArray.Create(backendContinuationToken); + } + + private async Task SwitchToFallbackPipelineAsync(CosmosElement continuationToken, ITrace trace) + { + Debug.Assert(this.executionState == ExecutionState.OptimisticDirectExecution, "OptimisticDirectExecuteQueryPipelineStage Assert!", "Only OptimisticDirectExecute pipeline can create this fallback pipeline"); + this.executionState = ExecutionState.SpecializedDocumentQueryExecution; + this.inner = continuationToken != null + ? await this.queryPipelineStageFactory(continuationToken) + : await this.queryPipelineStageFactory(null); + + if (this.inner.Failed) { - CosmosObject cosmosObject = this.continuationToken as CosmosObject; - CosmosElement backendContinuationToken = cosmosObject[optimisticDirectExecutionToken]; - Debug.Assert(backendContinuationToken != null); - return CosmosArray.Create(backendContinuationToken); + return false; } - return null; + return await this.inner.Result.MoveNextAsync(trace); } public static TryCatch MonadicCreate( DocumentContainer documentContainer, CosmosQueryExecutionContextFactory.InputParameters inputParameters, FeedRangeEpk targetRange, - QueryPaginationOptions queryPaginationOptions, FallbackQueryPipelineStageFactory fallbackQueryPipelineStageFactory, CancellationToken cancellationToken) { + QueryPaginationOptions paginationOptions = new QueryPaginationOptions(pageSizeHint: inputParameters.MaxItemCount, optimisticDirectExecute: true); TryCatch pipelineStage = OptimisticDirectExecutionQueryPipelineImpl.MonadicCreate( documentContainer: documentContainer, sqlQuerySpec: inputParameters.SqlQuerySpec, targetRange: targetRange, - queryPaginationOptions: queryPaginationOptions, + queryPaginationOptions: paginationOptions, partitionKey: inputParameters.PartitionKey, continuationToken: inputParameters.InitialUserContinuationToken, cancellationToken: cancellationToken); @@ -120,7 +163,7 @@ public static TryCatch MonadicCreate( return TryCatch.FromResult(odePipelineStageMonadicCreate); } - private class OptimisticDirectExecutionQueryPipelineImpl : IQueryPipelineStage + private sealed class OptimisticDirectExecutionQueryPipelineImpl : IQueryPipelineStage { private readonly QueryPartitionRangePageAsyncEnumerator queryPartitionRangePageAsyncEnumerator; @@ -226,7 +269,6 @@ public static TryCatch MonadicCreate( } FeedRangeState feedRangeState = monadicExtractState.Result; - QueryPartitionRangePageAsyncEnumerator partitionPageEnumerator = new QueryPartitionRangePageAsyncEnumerator( documentContainer, sqlQuerySpec, diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs index 0b692160be..c285135feb 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs @@ -15,6 +15,8 @@ internal sealed class QueryPaginationOptions : PaginationOptions { public static readonly QueryPaginationOptions Default = new QueryPaginationOptions(); + public bool OptimisticDirectExecute { get; } + public static readonly ImmutableHashSet BannedHeaders = new HashSet() { HttpConstants.HttpHeaders.Continuation, @@ -29,10 +31,12 @@ internal sealed class QueryPaginationOptions : PaginationOptions public QueryPaginationOptions( int? pageSizeHint = null, + bool optimisticDirectExecute = false, JsonSerializationFormat? jsonSerializationFormat = null, Dictionary additionalHeaders = null) : base(pageSizeHint, jsonSerializationFormat, additionalHeaders) { + this.OptimisticDirectExecute = optimisticDirectExecute; } protected override ImmutableHashSet BannedAdditionalHeaders => BannedHeaders; diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs index c2bcf91619..ac093cadce 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs @@ -54,12 +54,11 @@ public abstract Task> ExecuteItemQueryAsync( string resourceUri, Documents.ResourceType resourceType, Documents.OperationType operationType, - Guid clientQueryCorrelationId, FeedRange feedRange, QueryRequestOptions requestOptions, + AdditionalRequestHeaders additionalRequestHeaders, SqlQuerySpec sqlQuerySpec, string continuationToken, - bool isContinuationExpected, int pageSize, ITrace trace, CancellationToken cancellationToken); diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs index 138f32c593..daf47e151c 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs @@ -119,12 +119,11 @@ public override async Task> ExecuteItemQueryAsync( string resourceUri, ResourceType resourceType, OperationType operationType, - Guid clientQueryCorrelationId, FeedRange feedRange, QueryRequestOptions requestOptions, + AdditionalRequestHeaders additionalRequestHeaders, SqlQuerySpec sqlQuerySpec, string continuationToken, - bool isContinuationExpected, int pageSize, ITrace trace, CancellationToken cancellationToken) @@ -143,13 +142,14 @@ public override async Task> ExecuteItemQueryAsync( { cosmosRequestMessage.Headers.Add( HttpConstants.HttpHeaders.IsContinuationExpected, - isContinuationExpected.ToString()); + additionalRequestHeaders.IsContinuationExpected.ToString()); QueryRequestOptions.FillContinuationToken( cosmosRequestMessage, continuationToken); cosmosRequestMessage.Headers.Add(HttpConstants.HttpHeaders.ContentType, MediaTypes.QueryJson); cosmosRequestMessage.Headers.Add(HttpConstants.HttpHeaders.IsQuery, bool.TrueString); - cosmosRequestMessage.Headers.Add(WFConstants.BackendHeaders.CorrelatedActivityId, clientQueryCorrelationId.ToString()); + cosmosRequestMessage.Headers.Add(WFConstants.BackendHeaders.CorrelatedActivityId, additionalRequestHeaders.CorrelatedActivityId.ToString()); + cosmosRequestMessage.Headers.Add(HttpConstants.HttpHeaders.OptimisticDirectExecute, additionalRequestHeaders.OptimisticDirectExecute.ToString()); }, trace: trace, cancellationToken: cancellationToken); diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryContextCore.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryContextCore.cs index b1325f2652..215ca22b2c 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryContextCore.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryContextCore.cs @@ -51,16 +51,17 @@ internal override Task> ExecuteQueryAsync( ITrace trace, CancellationToken cancellationToken) { + AdditionalRequestHeaders additionalRequestHeaders = new AdditionalRequestHeaders(this.CorrelatedActivityId, isContinuationExpected, optimisticDirectExecute: false); + return this.QueryClient.ExecuteItemQueryAsync( resourceUri: this.ResourceLink, resourceType: this.ResourceTypeEnum, operationType: this.OperationTypeEnum, - clientQueryCorrelationId: this.CorrelatedActivityId, requestOptions: queryRequestOptions, + additionalRequestHeaders: additionalRequestHeaders, sqlQuerySpec: querySpecForInit, continuationToken: continuationToken, feedRange: feedRange, - isContinuationExpected: isContinuationExpected, pageSize: pageSize, trace: trace, cancellationToken: cancellationToken); diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index 8ce4761c31..cd505f1158 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -44,7 +44,7 @@ public class QueryRequestOptions : RequestOptions public bool? EnableLowPrecisionOrderBy { get; set; } /// - /// Gets or sets the option for customers to opt in for direct (optimistic) execution of the query.. + /// Gets or sets the option for customers to opt in for direct (optimistic) execution of the query. /// /// /// Direct (optimistic) execution offers improved performance for several kinds of queries such as a single partition streaming query. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs index ee6eec3004..11d51403b1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs @@ -68,12 +68,11 @@ public override Task> ExecuteItemQueryAsync( string resourceUri, ResourceType resourceType, OperationType operationType, - Guid clientQueryCorrelationId, FeedRange feedRange, QueryRequestOptions requestOptions, + AdditionalRequestHeaders additionalRequestHeaders, SqlQuerySpec sqlQuerySpec, string continuationToken, - bool isContinuationExpected, int pageSize, ITrace trace, CancellationToken cancellationToken) @@ -82,12 +81,11 @@ public override Task> ExecuteItemQueryAsync( resourceUri: resourceUri, resourceType: resourceType, operationType: operationType, - clientQueryCorrelationId: clientQueryCorrelationId, + feedRange: feedRange, requestOptions: requestOptions, + additionalRequestHeaders: additionalRequestHeaders, sqlQuerySpec: sqlQuerySpec, continuationToken: continuationToken, - feedRange: feedRange, - isContinuationExpected: isContinuationExpected, pageSize: pageSize, trace: trace, cancellationToken: cancellationToken); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs index cc9ef91733..78d4ddb8ed 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/OptimisticDirectExecutionQueryTests.cs @@ -20,7 +20,8 @@ public sealed class OptimisticDirectExecutionQueryTests : QueryTestsBase private static class PageSizeOptions { - public static readonly int[] NonGroupByPageSizeOptions = { -1, 1, 2, 10, 100 }; + public static readonly int[] NonGroupByAndNoContinuationTokenPageSizeOptions = { -1, 10 }; + public static readonly int[] NonGroupByWithContinuationTokenPageSizeOptions = { 1, 2 }; public static readonly int[] GroupByPageSizeOptions = { -1 }; public static readonly int[] PageSize100 = { 100 }; } @@ -42,49 +43,98 @@ public async Task TestPassingOptimisticDirectExecutionQueries() expectedResult: first5Integers, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), CreateInput( query: $"SELECT TOP 5 VALUE r.numberField FROM r ORDER BY r.{PartitionKeyField}", expectedResult: first5Integers, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: false, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Passthrough), - // Simple query + // Simple query (requiresDist = false) CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: first7Integers, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: first7Integers, partitionKey: null, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - - // DISTINCT with ORDER BY + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + // DISTINCT with ORDER BY (requiresDist = true) CreateInput( query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", expectedResult: first7IntegersReversed, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), CreateInput( query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", expectedResult: first7IntegersReversed, partitionKey: null, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), - // TOP with GROUP BY + // DISTINCT (requiresDist = true) + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r", + expectedResult: first7Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r", + expectedResult: first7Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + // TOP with GROUP BY (requiresDist = true) CreateInput( query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r GROUP BY r.{NumberField}", expectedResult: first5Integers, @@ -99,72 +149,267 @@ public async Task TestPassingOptimisticDirectExecutionQueries() enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.GroupByPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), - - // OFFSET LIMIT with WHERE and BETWEEN + + // TOP (requiresDist = false) + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + // TOP with ORDER BY (requiresDist = false) + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + // OFFSET LIMIT with WHERE and BETWEEN (requiresDist = false) + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: partitionKeyValue, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + enableOptimisticDirectExecution: true, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: partitionKeyValue, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + enableOptimisticDirectExecution: true, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: null, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, enableOptimisticDirectExecution: true, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: null, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, enableOptimisticDirectExecution: true, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution) - }; - + }; + List multiPartitionContainerTestCases = new List() { - // Simple query + // Simple query (requiresDist = false) CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: first7Integers, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: first7Integers, partitionKey: null, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Passthrough), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r", + expectedResult: first7Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Passthrough), - // DISTINCT with ORDER BY + // DISTINCT with ORDER BY (requiresDist = true) CreateInput( query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", expectedResult: first7IntegersReversed, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), CreateInput( query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", expectedResult: first7IntegersReversed, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( + query: $"SELECT DISTINCT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", + expectedResult: first7IntegersReversed, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + // TOP (requiresDist = false) + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + // TOP with ORDER BY (requiresDist = false) + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, partitionKey: null, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( + query: $"SELECT TOP 5 VALUE r.{NumberField} FROM r ORDER BY r.{NumberField}", + expectedResult: first5Integers, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Specialized), - // OFFSET LIMIT with WHERE and BETWEEN + // OFFSET LIMIT with WHERE and BETWEEN (requiresDist = false) CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: partitionKeyValue, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: partitionKeyValue, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, partitionKey: null, enableOptimisticDirectExecution: true, - pageSizeOptions: PageSizeOptions.NonGroupByPageSizeOptions, + pageSizeOptions: PageSizeOptions.NonGroupByAndNoContinuationTokenPageSizeOptions, + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( + query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", + expectedResult: new List { 1 }, + partitionKey: null, + enableOptimisticDirectExecution: true, + pageSizeOptions: PageSizeOptions.NonGroupByWithContinuationTokenPageSizeOptions, expectedPipelineType: TestInjections.PipelineType.Specialized) }; @@ -222,27 +467,34 @@ public async Task TestQueriesWithPartitionKeyNone() enableOptimisticDirectExecution: false, pageSizeOptions: PageSizeOptions.PageSize100, expectedPipelineType: TestInjections.PipelineType.Passthrough), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 CreateInput( query: $"SELECT VALUE r.numberField FROM r", expectedResult: first400Integers, partitionKey: PartitionKey.None, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.PageSize100, - expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + expectedPipelineType: TestInjections.PipelineType.Specialized), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 CreateInput( query: $"SELECT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} ASC", expectedResult: first400Integers, partitionKey: PartitionKey.None, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.PageSize100, - expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + expectedPipelineType: TestInjections.PipelineType.Specialized), + + //TODO: Change expectedPipelineType to OptimisticDirectExecution once emulator is updated to 0415 CreateInput( query: $"SELECT VALUE r.{NumberField} FROM r ORDER BY r.{NumberField} DESC", expectedResult: first400IntegersReversed, partitionKey: PartitionKey.None, enableOptimisticDirectExecution: true, pageSizeOptions: PageSizeOptions.PageSize100, - expectedPipelineType: TestInjections.PipelineType.OptimisticDirectExecution), + expectedPipelineType: TestInjections.PipelineType.Specialized), + CreateInput( query: $"SELECT VALUE r.numberField FROM r WHERE r.{NumberField} BETWEEN 0 AND {NumberOfDocuments} OFFSET 1 LIMIT 1", expectedResult: new List { 1 }, @@ -279,7 +531,7 @@ public async Task TestFailingOptimisticDirectExecutionOutput() { "SELECT TOP 10 * FOM r", null }, { "this is not a valid query", null }, }; - + await this.CreateIngestQueryDeleteAsync( ConnectionModes.Direct | ConnectionModes.Gateway, CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml index 5e496fc564..a5e6d97841 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/OptimisticDirectExecutionQueryBaselineTests.PositiveOptimisticDirectExecutionOutput.xml @@ -66,20 +66,7 @@ - Null Partition Key Value - SELECT * FROM c - - /pk - - Hash - - - true - - - - - None Partition Key Value + Cosmos.PartitionKey.Null Partition Key Value SELECT * FROM c /pk diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index 20de3f1f03..fad65e80db 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -2,6 +2,7 @@ { using System; using System.Collections.Generic; + using System.Collections.Immutable; using System.Collections.ObjectModel; using System.IO; using System.Linq; @@ -80,19 +81,12 @@ public void PositiveOptimisticDirectExecutionOutput() // Below cases are Ode because they have a collection with a single physical partition. // Added emulator tests (TestPassingOptimisticDirectExecutionQueries()) to verify the negation of the below cases. CreateInput( - description: @"Null Partition Key Value", + description: @"Cosmos.PartitionKey.Null Partition Key Value", query: "SELECT * FROM c", expectedOptimisticDirectExecution: true, partitionKeyPath: @"/pk", partitionKeyValue: Cosmos.PartitionKey.Null), - CreateInput( - description: @"None Partition Key Value", - query: "SELECT * FROM c", - expectedOptimisticDirectExecution: true, - partitionKeyPath: @"/pk", - partitionKeyValue: Cosmos.PartitionKey.None), - CreateInput( description: @"C# Null Partition Key Value", query: "SELECT * FROM c", @@ -133,7 +127,7 @@ public void NegativeOptimisticDirectExecutionOutput() partitionKeyPath: @"/pk", partitionKeyValue: "a", continuationToken: CosmosArray.Create(new List() { ParallelContinuationToken.ToCosmosElement(parallelContinuationToken) })), - + CreateInput( description: @"Single Partition Key with OrderBy continuation token", query: "SELECT * FROM c ORDER BY c._ts", @@ -144,7 +138,7 @@ public void NegativeOptimisticDirectExecutionOutput() }; this.ExecuteTestSuite(testVariations); } - + // This test confirms that TestInjection.EnableOptimisticDirectExection is set to false from default. // Check test "TestPipelineForDistributedQueryAsync" to understand why this is done [TestMethod] @@ -169,7 +163,6 @@ public async Task TestPipelineForBackendDocumentsOnSinglePartitionAsync() partitionKeyValue: "a"); QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); - DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: false); IQueryPipelineStage queryPipelineStage = await GetOdePipelineAsync(input, inMemoryCollection, queryRequestOptions); int documentCountInSinglePartition = 0; @@ -192,6 +185,145 @@ public async Task TestPipelineForBackendDocumentsOnSinglePartitionAsync() Assert.AreEqual(100, documentCountInSinglePartition); } + [TestMethod] + public async Task TestQueriesWhichNeverRequireDistribution() + { + // requiresDist = false + int numItems = 100; + List singlePartitionContainerTestCases = new List() + { + new RequiresDistributionTestCase("SELECT * FROM r", 10, 100), + new RequiresDistributionTestCase("SELECT VALUE r.id FROM r", 0, 10), + new RequiresDistributionTestCase("SELECT * FROM r WHERE r.id > 5", 0, 0), + new RequiresDistributionTestCase("SELECT r.id FROM r JOIN id IN r.id",0, 0), + new RequiresDistributionTestCase("SELECT TOP 5 r.id FROM r ORDER BY r.id", 0, 5), + new RequiresDistributionTestCase("SELECT TOP 5 r.id FROM r WHERE r.id > 5 ORDER BY r.id", 0, 0), + new RequiresDistributionTestCase("SELECT * FROM r OFFSET 5 LIMIT 3", 1, 3), + new RequiresDistributionTestCase("SELECT * FROM r WHERE r.id > 5 OFFSET 5 LIMIT 3", 0, 0) + }; + + foreach (RequiresDistributionTestCase testCase in singlePartitionContainerTestCases) + { + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Queries which will never require distribution", + query: testCase.Query, + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); + + int result = await this.GetPipelineAndDrainAsync( + input, + numItems: numItems, + isMultiPartition: false, + expectedContinuationTokenCount: testCase.ExpectedContinuationTokenCount, + requiresDist: false); + + Assert.AreEqual(testCase.ExpectedDocumentCount, result); + } + } + + [TestMethod] + public async Task TestQueriesWhichWillAlwaysRequireDistribution() + { + // requiresDist = true + int numItems = 100; + List singlePartitionContainerTestCases = new List() + { + new RequiresDistributionTestCase("SELECT Sum(id) as sum_id FROM r JOIN id IN r.id", 0, 1), + new RequiresDistributionTestCase("SELECT DISTINCT TOP 5 r.id FROM r ORDER BY r.id", 0, 5), + new RequiresDistributionTestCase("SELECT DISTINCT r.id FROM r GROUP BY r.id", 0, 10), + new RequiresDistributionTestCase("SELECT DISTINCT r.id, Sum(r.id) as sum_a FROM r GROUP BY r.id",0, 10), + new RequiresDistributionTestCase("SELECT Count(1) FROM (SELECT DISTINCT r.id FROM root r)", 0, 1), + new RequiresDistributionTestCase("SELECT DISTINCT id FROM r JOIN id in r.id", 0, 0), + new RequiresDistributionTestCase("SELECT r.id, Count(1) AS count_a FROM r GROUP BY r.id ORDER BY r.id", 0, 10), + new RequiresDistributionTestCase("SELECT Count(1) as count FROM root r JOIN b IN r.id", 0, 1), + new RequiresDistributionTestCase("SELECT Avg(1) AS avg FROM root r", 0, 1), + new RequiresDistributionTestCase("SELECT r.id, Count(1) as count FROM r WHERE r.id > 0 GROUP BY r.id", 0, 0), + new RequiresDistributionTestCase("SELECT r.id FROM r WHERE r.id > 0 GROUP BY r.id ORDER BY r.id", 0, 0) + }; + + foreach (RequiresDistributionTestCase testCase in singlePartitionContainerTestCases) + { + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Queries which will always require distribution", + query: testCase.Query, + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); + + int result = await this.GetPipelineAndDrainAsync( + input, + numItems: numItems, + isMultiPartition: false, + expectedContinuationTokenCount: testCase.ExpectedContinuationTokenCount, + requiresDist: true); + + Assert.AreEqual(testCase.ExpectedDocumentCount, result); + } + } + + [TestMethod] + public async Task TestQueriesWhichCanSwitchDistribution() + { + // requiresDist = true/false + int numItems = 100; + bool[] requiresDistSet = { true, false }; + + List singlePartitionContainerTestCases = new List() + { + new RequiresDistributionTestCase("SELECT Count(r.id) AS count_a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT DISTINCT r.id FROM r", 0, 10), + new RequiresDistributionTestCase("SELECT r.id, Count(1) AS count_a FROM r GROUP BY r.id", 0, 10), + new RequiresDistributionTestCase("SELECT Count(1) AS count FROM root r WHERE r.id < 2", 0, 1), + new RequiresDistributionTestCase("SELECT r.id, Count(r.id), Avg(r.id) FROM r WHERE r.id < 2 GROUP BY r.id", 0, 0), + new RequiresDistributionTestCase("SELECT TOP 5 Count(1) as count FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT TOP 5 Count(1) as count FROM r ORDER BY r.id", 0, 1), + new RequiresDistributionTestCase("SELECT r.id FROM r GROUP BY r.id OFFSET 5 LIMIT 3", 0, 3), + new RequiresDistributionTestCase("SELECT Count(1) as count FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT Sum(r.id) as sum_a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT Min(r.a) as min_a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT Max(r.a) as min_a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT Avg(r.a) as min_a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT Sum(r.a) as sum_a FROM r WHERE r.a > 0", 0, 1), + new RequiresDistributionTestCase("SELECT Sum(r.a) as sum_a FROM r WHERE r.a > 0 OFFSET 0 LIMIT 5", 0, 1), + new RequiresDistributionTestCase("SELECT Sum(r.a) as sum_a FROM r WHERE r.a > 0 OFFSET 5 LIMIT 5", 0, 0), + new RequiresDistributionTestCase("SELECT Sum(r.a) as sum_a FROM r ORDER BY r.a", 0, 1), + new RequiresDistributionTestCase("SELECT Sum(r.a) as sum_a FROM r ORDER BY r.a OFFSET 5 LIMIT 5", 0, 0), + new RequiresDistributionTestCase("SELECT Sum(r.a) as sum_a FROM r WHERE r.a > 0 ORDER BY r.a OFFSET 5 LIMIT 5", 0, 0), + new RequiresDistributionTestCase("SELECT DISTINCT VALUE r.id FROM r", 0, 10), + new RequiresDistributionTestCase("SELECT DISTINCT TOP 5 r.a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT s.id FROM (SELECT DISTINCT r.id FROM root r) as s", 0, 10), + new RequiresDistributionTestCase("SELECT DISTINCT r.a FROM r OFFSET 3 LIMIT 5", 0, 0), + new RequiresDistributionTestCase("SELECT Count(r.id) AS count_a FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT r.id, Count(1) AS count_a FROM r GROUP BY r.id", 0, 10), + new RequiresDistributionTestCase("SELECT Count(1) AS count FROM root r WHERE r.id < 2", 0, 1), + new RequiresDistributionTestCase("SELECT TOP 5 Count(1) as count FROM r", 0, 1), + new RequiresDistributionTestCase("SELECT Count(1) AS count FROM root r WHERE r.id < 2", 0, 1), + }; + + foreach (RequiresDistributionTestCase testCase in singlePartitionContainerTestCases) + { + foreach (bool requiresDist in requiresDistSet) + { + OptimisticDirectExecutionTestInput input = CreateInput( + description: @"Queries which can require distribution in certain cases", + query: testCase.Query, + expectedOptimisticDirectExecution: true, + partitionKeyPath: @"/pk", + partitionKeyValue: "a"); + + int result = await this.GetPipelineAndDrainAsync( + input, + numItems: numItems, + isMultiPartition: false, + expectedContinuationTokenCount: testCase.ExpectedContinuationTokenCount, + requiresDist: requiresDist); + + Assert.AreEqual(testCase.ExpectedDocumentCount, result); + } + } + } + // test checks that the pipeline can take a query to the backend and returns its associated document(s) + continuation token. [TestMethod] public async Task TestPipelineForContinuationTokenOnSinglePartitionAsync() @@ -269,7 +401,7 @@ private static async Task ExecuteGoneExceptionOnODEPipeline(bool isMultiPa { Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); } - else + else { Assert.AreNotEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); } @@ -345,18 +477,20 @@ private static async Task TestHandlingOfFailedFallbackPipeline(bool isMult return (mergeTest, queryPipelineStage); } - private async Task GetPipelineAndDrainAsync(OptimisticDirectExecutionTestInput input, int numItems, bool isMultiPartition, int expectedContinuationTokenCount) + private async Task GetPipelineAndDrainAsync(OptimisticDirectExecutionTestInput input, int numItems, bool isMultiPartition, int expectedContinuationTokenCount, bool requiresDist = false) { QueryRequestOptions queryRequestOptions = GetQueryRequestOptions(enableOptimisticDirectExecution: true); - DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: isMultiPartition); + DocumentContainer inMemoryCollection = await CreateDocumentContainerAsync(numItems, multiPartition: isMultiPartition, requiresDist: requiresDist); IQueryPipelineStage queryPipelineStage = await GetOdePipelineAsync(input, inMemoryCollection, queryRequestOptions); - List documents = new List(); int continuationTokenCount = 0; while (await queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton)) { - Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + if (!requiresDist) + { + Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); + } TryCatch tryGetPage = queryPipelineStage.Current; tryGetPage.ThrowIfFailed(); @@ -420,6 +554,7 @@ private static async Task GetOdePipelineAsync(OptimisticDir private static async Task CreateDocumentContainerAsync( int numItems, bool multiPartition, + bool requiresDist = false, FlakyDocumentContainer.FailureConfigs failureConfigs = null) { PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition() @@ -432,7 +567,9 @@ private static async Task CreateDocumentContainerAsync( Version = PartitionKeyDefinitionVersion.V2, }; - IMonadicDocumentContainer monadicDocumentContainer = new InMemoryContainer(partitionKeyDefinition); + MockDocumentContainer mockContainer = new MockDocumentContainer(partitionKeyDefinition, requiresDist); + IMonadicDocumentContainer monadicDocumentContainer = mockContainer; + if (failureConfigs != null) { monadicDocumentContainer = new FlakyDocumentContainer(monadicDocumentContainer, failureConfigs); @@ -523,7 +660,7 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect NoOpTrace.Singleton); bool result = queryPipelineStage.MoveNextAsync(NoOpTrace.Singleton).AsTask().GetAwaiter().GetResult(); - + if (input.ExpectedOptimisticDirectExecution) { Assert.AreEqual(TestInjections.PipelineType.OptimisticDirectExecution, queryRequestOptions.TestSettings.Stats.PipelineType.Value); @@ -546,11 +683,6 @@ public override OptimisticDirectExecutionTestOutput ExecuteTest(OptimisticDirect string sqlQuerySpecJsonString = streamReader.ReadToEnd(); PartitionedQueryExecutionInfo partitionedQueryExecutionInfo = GetPartitionedQueryExecutionInfo(sqlQuerySpecJsonString, input.PartitionKeyDefinition); - if (input.PartitionKeyValue == default || input.PartitionKeyValue == Cosmos.PartitionKey.None) - { - input.PartitionKeyValue = Cosmos.PartitionKey.Null; - } - CosmosQueryExecutionContextFactory.InputParameters inputParameters = new CosmosQueryExecutionContextFactory.InputParameters( sqlQuerySpec: new SqlQuerySpec(input.Query), initialUserContinuationToken: input.ContinuationToken, @@ -598,6 +730,68 @@ private static QueryRequestOptions GetQueryRequestOptions(bool enableOptimisticD }; } + internal readonly struct RequiresDistributionTestCase + { + public string Query { get; } + public int ExpectedContinuationTokenCount { get; } + public int ExpectedDocumentCount { get; } + + public RequiresDistributionTestCase( + string query, + int expectedContinuationTokenCount, + int expectedDocumentCount) + { + this.Query = query; + this.ExpectedContinuationTokenCount = expectedContinuationTokenCount; + this.ExpectedDocumentCount = expectedDocumentCount; + } + } + + private sealed class MockDocumentContainer : InMemoryContainer + { + private readonly bool requiresDistribution; + + public MockDocumentContainer( + PartitionKeyDefinition partitionKeyDefinition, + bool requiresDistribution) + : base(partitionKeyDefinition) + { + this.requiresDistribution = requiresDistribution; + } + + public override async Task> MonadicQueryAsync( + SqlQuerySpec sqlQuerySpec, + FeedRangeState feedRangeState, + QueryPaginationOptions queryPaginationOptions, + ITrace trace, + CancellationToken cancellationToken) + { + Task> queryPage = base.MonadicQueryAsync( + sqlQuerySpec, + feedRangeState, + queryPaginationOptions, + trace, + cancellationToken); + + ImmutableDictionary.Builder additionalHeaders = ImmutableDictionary.CreateBuilder(); + additionalHeaders.Add("x-ms-documentdb-partitionkeyrangeid", "0"); + additionalHeaders.Add("x-ms-test-header", "true"); + additionalHeaders.Add("x-ms-cosmos-query-requiresdistribution", this.requiresDistribution.ToString()); + + return await Task.FromResult( + TryCatch.FromResult( + new QueryPage( + queryPage.Result.Result.Documents, + requestCharge: 42, + activityId: Guid.NewGuid().ToString(), + responseLengthInBytes: 1337, + cosmosQueryExecutionInfo: default, + disallowContinuationTokenMessage: default, + additionalHeaders: additionalHeaders.ToImmutable(), + state: queryPage.Result.Result.State))); + } + } + private class MergeTestUtil { public int MoveNextCounter { get; private set; } @@ -626,7 +820,7 @@ public async Task ShouldReturnFailure() activityId: "0f8fad5b-d9cb-469f-a165-70867728950e", requestCharge: default); } - + if (this.IsFailedFallbackPipelineTest && this.GoneExceptionCreated && !this.TooManyRequestsFailureCreated) { this.TooManyRequestsFailureCreated = true; @@ -728,7 +922,7 @@ public override void SerializeAsXml(XmlWriter xmlWriter) } } } - + internal class TestCosmosQueryClient : CosmosQueryClient { public override Action OnExecuteScalarQueryCallback => throw new NotImplementedException(); @@ -743,7 +937,7 @@ public override void ClearSessionTokenCache(string collectionFullName) throw new NotImplementedException(); } - public override Task> ExecuteItemQueryAsync(string resourceUri, ResourceType resourceType, OperationType operationType, Guid clientQueryCorrelationId, Cosmos.FeedRange feedRange, QueryRequestOptions requestOptions, SqlQuerySpec sqlQuerySpec, string continuationToken, bool isContinuationExpected, int pageSize, ITrace trace, CancellationToken cancellationToken) + public override Task> ExecuteItemQueryAsync(string resourceUri, ResourceType resourceType, OperationType operationType, Cosmos.FeedRange feedRange, QueryRequestOptions requestOptions, AdditionalRequestHeaders additionalRequestHeaders, SqlQuerySpec sqlQuerySpec, string continuationToken, int pageSize, ITrace trace, CancellationToken cancellationToken) { throw new NotImplementedException(); } From c095bc1119684078737282dbe80ebbba100bab74 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Tue, 6 Jun 2023 17:26:50 -0700 Subject: [PATCH 130/164] Query: Refactors the EnableOptimisticDirectExecution flag to be public (#3883) * Made EnableOptimisticDirectExecution a public flag * Updated contract --- .../DotNetSDKEncryptionCustomAPI.json | 19 ++++++++++ .../src/RequestOptions/QueryRequestOptions.cs | 2 +- .../Contracts/DotNetSDKAPI.json | 38 +++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/Contracts/DotNetSDKEncryptionCustomAPI.json b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/Contracts/DotNetSDKEncryptionCustomAPI.json index 8f858ddb94..1912d16407 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/Contracts/DotNetSDKEncryptionCustomAPI.json +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/Microsoft.Azure.Cosmos.Encryption.Custom.Tests/Contracts/DotNetSDKEncryptionCustomAPI.json @@ -51,6 +51,13 @@ ], "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken)[System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Microsoft.Azure.Cosmos.Encryption.Custom.CosmosDataEncryptionKeyProvider+))]": { + "Type": "Method", + "Attributes": [ + "AsyncStateMachineAttribute" + ], + "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void .ctor(Microsoft.Azure.Cosmos.Encryption.Custom.EncryptionKeyWrapProvider, Microsoft.Data.Encryption.Cryptography.EncryptionKeyStoreProvider, System.Nullable`1[System.TimeSpan])[System.ObsoleteAttribute(\"Please use the constructor with EncryptionKeyStoreProvider only.\")]": { "Type": "Constructor", "Attributes": [ @@ -398,6 +405,13 @@ ], "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken)[System.Runtime.CompilerServices.AsyncStateMachineAttribute(typeof(Microsoft.Azure.Cosmos.Encryption.Custom.CosmosDataEncryptionKeyProvider+))]": { + "Type": "Method", + "Attributes": [ + "AsyncStateMachineAttribute" + ], + "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:False;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void .ctor(Microsoft.Azure.Cosmos.Encryption.Custom.EncryptionKeyWrapProvider, Microsoft.Data.Encryption.Cryptography.EncryptionKeyStoreProvider, System.Nullable`1[System.TimeSpan])[System.ObsoleteAttribute(\"Please use the constructor with EncryptionKeyStoreProvider only.\")]": { "Type": "Constructor", "Attributes": [ @@ -426,6 +440,11 @@ "Type": "Method", "Attributes": [], "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken)": { + "Type": "Method", + "Attributes": [], + "MethodInfo": "System.Threading.Tasks.Task`1[Microsoft.Azure.Cosmos.Encryption.Custom.DataEncryptionKey] FetchDataEncryptionKeyWithoutRawKeyAsync(System.String, System.String, System.Threading.CancellationToken);IsAbstract:True;IsStatic:False;IsVirtual:True;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" } }, "NestedTypes": {} diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index cd505f1158..4cca513013 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -49,7 +49,7 @@ public class QueryRequestOptions : RequestOptions /// /// Direct (optimistic) execution offers improved performance for several kinds of queries such as a single partition streaming query. /// - internal bool EnableOptimisticDirectExecution { get; set; } + public bool EnableOptimisticDirectExecution { get; set; } /// /// Gets or sets the maximum number of items that can be buffered client side during diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index e5b95a7ed9..8a3bc7b462 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -6279,6 +6279,18 @@ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { + "Boolean EnableOptimisticDirectExecution": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": { "Type": "Property", "Attributes": [], @@ -6433,6 +6445,13 @@ ], "MethodInfo": "Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_EnableScanInQuery(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ @@ -7301,6 +7320,18 @@ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { + "Boolean EnableOptimisticDirectExecution": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": { "Type": "Property", "Attributes": [], @@ -7455,6 +7486,13 @@ ], "MethodInfo": "Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, + "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, "Void set_EnableScanInQuery(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ From 6024f2433b342f58d738b0339492850a09018309 Mon Sep 17 00:00:00 2001 From: Arooshi Avasthy <113193425+aavasthy@users.noreply.github.com> Date: Wed, 7 Jun 2023 09:15:05 -0700 Subject: [PATCH 131/164] [Internal] OpenTelemetry : Adds Telemetry Distributed Tracing functionality (#3801) * Direct Package update and replacing dagnostic files * Resolve merge conflicts * Running updateCOnstracts script * Add code changes for distributed tracing open telemetry changes * Add distributed tracing tests * Updated tests for distributed tracing * Addin traceID for diagnostics * Running update contract script * Removed LinqTranslationWithCustomSerializerBaseline file * Adding isDistributedTracingEnabled flag * Running update contracts * Running update contracts * Updates based on differnt code review comments * Running update contracts * Running update contracts * Running update contracts * fix test * Code cleanup for test fix * Running Update contracts * resolving merge conflicts * resolving merge conflicts * Set EnableDistributedTracing to true for performance tests * Benchmark project change for distributed tracing * Updating tests * Updated unit tests * Updated unit tests * Updated tests and constructors based on review comments * Updated scope name in recorder * Updated distributedOtel tests to cover more scenarios * Updated distributedOtel tests * Reverting benchmark performance test changes * Update DistributedOpentelemetry tests * Update test cleanup * Update distributed tests with custom builder * Update distributed open telemetry tests * Update contracts * Cleanup files * Update distributed Otel tests * Update distributed Otel tests * code refactoring * fix custom listener * Update direct package to 3.31.1 * Code clean up * Update tests with display name --------- Co-authored-by: Sourabh Jain --- Directory.Build.props | 2 +- .../src/Resource/ClientContextCore.cs | 1 + .../OpenTelemetryAttributeKeys.cs | 1 + .../OpenTelemetryCoreRecorder.cs | 67 +++++- .../OpenTelemetryRecorderFactory.cs | 47 ++-- ...iterBaselineTests.BatchOperationsAsync.xml | 5 +- ...riterBaselineTests.BulkOperationsAsync.xml | 55 ++++- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 90 +++++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 10 +- ...neTests.PointOperationsExceptionsAsync.xml | 30 ++- ...EndTraceWriterBaselineTests.QueryAsync.xml | 84 +++++++ ...TraceWriterBaselineTests.ReadFeedAsync.xml | 80 +++++-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 10 +- ...selineTests.StreamPointOperationsAsync.xml | 20 +- ...aselineTests.TypedPointOperationsAsync.xml | 20 +- .../DistributedTracingOTelTests.cs | 222 ++++++++++++++++++ .../Tracing/AssertActivity.cs | 37 +-- .../Tracing/CustomListener.cs | 12 + .../Tracing/CustomOtelExporter.cs | 3 +- 19 files changed, 695 insertions(+), 101 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DistributedTracingOTelTests.cs diff --git a/Directory.Build.props b/Directory.Build.props index 7eecd3c8e2..c8b86ceed2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.34.0 3.34.0 preview - 3.31.0 + 3.31.1 2.0.2 2.0.2 preview diff --git a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs index d16d1c8bcc..42e128ac2e 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/ClientContextCore.cs @@ -497,6 +497,7 @@ private async Task RunWithDiagnosticsHelperAsync( databaseName: databaseName, operationType: operationType, requestOptions: requestOptions, + trace: trace, clientContext: this.isDisposed ? null : this)) using (new ActivityScope(Guid.NewGuid())) { diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs index 755e1e3a66..1bb66170b5 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryAttributeKeys.cs @@ -10,6 +10,7 @@ internal sealed class OpenTelemetryAttributeKeys public const string DiagnosticNamespace = "Azure.Cosmos"; public const string ResourceProviderNamespace = "Microsoft.DocumentDB"; public const string OperationPrefix = "Operation"; + public const string NetworkLevelPrefix = "Request"; // Common database attributes public const string DbSystemName = "db.system"; diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs index c199c0727c..2ef929ca8c 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryCoreRecorder.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; using System.Collections.Generic; + using System.Diagnostics; using global::Azure.Core; /// @@ -14,11 +15,12 @@ namespace Microsoft.Azure.Cosmos.Telemetry internal struct OpenTelemetryCoreRecorder : IDisposable { private const string CosmosDb = "cosmosdb"; - - private readonly DiagnosticScope scope; - private readonly DistributedTracingOptions config; - private readonly Documents.OperationType operationType; + private readonly DiagnosticScope scope = default; + private readonly DistributedTracingOptions config = null; + private readonly Activity activity = null; + + private readonly Documents.OperationType operationType = Documents.OperationType.Invalid; private OpenTelemetryAttributes response = null; internal static IDictionary> OTelCompatibleExceptions = new Dictionary>() @@ -30,7 +32,19 @@ internal struct OpenTelemetryCoreRecorder : IDisposable { typeof(ChangeFeedProcessorUserException), (exception, scope) => ChangeFeedProcessorUserException.RecordOtelAttributes((ChangeFeedProcessorUserException)exception, scope)} }; - public OpenTelemetryCoreRecorder( + private OpenTelemetryCoreRecorder(DiagnosticScope scope) + { + this.scope = scope; + this.scope.Start(); + } + + private OpenTelemetryCoreRecorder(string operationName) + { + this.activity = new Activity(operationName); + this.activity.Start(); + } + + private OpenTelemetryCoreRecorder( DiagnosticScope scope, string operationName, string containerName, @@ -54,6 +68,45 @@ public OpenTelemetryCoreRecorder( } } + /// + /// Used for creating parent activity in scenario where there are no listeners at operation level + /// but they are present at network level + /// + public static OpenTelemetryCoreRecorder CreateNetworkLevelParentActivity(DiagnosticScope networkScope) + { + return new OpenTelemetryCoreRecorder(networkScope); + } + + /// + /// Used for creating parent activity in scenario where there are no listeners at operation level and network level + /// + public static OpenTelemetryCoreRecorder CreateParentActivity(string operationName) + { + return new OpenTelemetryCoreRecorder(operationName); + } + + /// + /// Used for creating parent activity in scenario where there are listeners at operation level + /// + public static OpenTelemetryCoreRecorder CreateOperationLevelParentActivity( + DiagnosticScope operationScope, + string operationName, + string containerName, + string databaseName, + Documents.OperationType operationType, + CosmosClientContext clientContext, + DistributedTracingOptions config) + { + return new OpenTelemetryCoreRecorder( + operationScope, + operationName, + containerName, + databaseName, + operationType, + clientContext, + config); + } + public bool IsEnabled => this.scope.IsEnabled; public void Record(string key, string value) @@ -179,6 +232,10 @@ Documents.OperationType operationType this.scope.Dispose(); } + else + { + this.activity?.Stop(); + } } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index fe10e7b22c..fee3282c1a 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -5,7 +5,9 @@ namespace Microsoft.Azure.Cosmos.Telemetry { using System; + using System.Diagnostics; using global::Azure.Core; + using Microsoft.Azure.Cosmos.Tracing; /// /// This class is used to generate Activities with Azure.Cosmos.Operation Source Name @@ -15,33 +17,42 @@ internal static class OpenTelemetryRecorderFactory /// /// Singleton to make sure we only have one instance of the DiagnosticScopeFactory and pattern matching of listener happens only once /// - private static DiagnosticScopeFactory ScopeFactory { get; set; } - + private static readonly Lazy LazyOperationScopeFactory = new Lazy( + valueFactory: () => new DiagnosticScopeFactory( + clientNamespace: $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.{OpenTelemetryAttributeKeys.OperationPrefix}", + resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, + isActivityEnabled: true, + suppressNestedClientActivities: true), + isThreadSafe: true); + + private static readonly Lazy LazyNetworkScopeFactory = new Lazy( + valueFactory: () => new DiagnosticScopeFactory( + clientNamespace: $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.{OpenTelemetryAttributeKeys.NetworkLevelPrefix}", + resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, + isActivityEnabled: true, + suppressNestedClientActivities: true), + isThreadSafe: true); + public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, string containerName, string databaseName, Documents.OperationType operationType, RequestOptions requestOptions, + ITrace trace, CosmosClientContext clientContext) { + OpenTelemetryCoreRecorder openTelemetryRecorder = default; if (clientContext is { ClientOptions.IsDistributedTracingEnabled: true }) { - OpenTelemetryRecorderFactory.ScopeFactory ??= new DiagnosticScopeFactory(clientNamespace: $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.{OpenTelemetryAttributeKeys.OperationPrefix}", - resourceProviderNamespace: OpenTelemetryAttributeKeys.ResourceProviderNamespace, - isActivityEnabled: true, - suppressNestedClientActivities: true); - // If there is no source then it will return default otherwise a valid diagnostic scope - DiagnosticScope scope = OpenTelemetryRecorderFactory - .ScopeFactory - .CreateScope(name: operationName, + DiagnosticScope scope = LazyOperationScopeFactory.Value.CreateScope(name: operationName, kind: clientContext.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? DiagnosticScope.ActivityKind.Internal : DiagnosticScope.ActivityKind.Client); // Record values only when we have a valid Diagnostic Scope if (scope.IsEnabled) { - return new OpenTelemetryCoreRecorder( - scope: scope, + openTelemetryRecorder = OpenTelemetryCoreRecorder.CreateOperationLevelParentActivity( + operationScope: scope, operationName: operationName, containerName: containerName, databaseName: databaseName, @@ -49,9 +60,17 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, clientContext: clientContext, config: requestOptions?.DistributedTracingOptions ?? clientContext.ClientOptions?.DistributedTracingOptions); } - } +#if !INTERNAL + else if (Activity.Current is null) + { + DiagnosticScope requestScope = LazyNetworkScopeFactory.Value.CreateScope(name: operationName); - return default; + openTelemetryRecorder = requestScope.IsEnabled ? OpenTelemetryCoreRecorder.CreateNetworkLevelParentActivity(networkScope: requestScope) : OpenTelemetryCoreRecorder.CreateParentActivity(operationName); + } +#endif + trace.AddDatum("DistributedTraceId", Activity.Current?.TraceId); + } + return openTelemetryRecorder; } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 09579f83b7..66ca36f8ba 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -38,6 +38,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── Execute Next Batch(00000000-0000-0000-0000-000000000000) Batch-Component 00:00:00:000 0.00 milliseconds ├── Create Batch Request(00000000-0000-0000-0000-000000000000) Batch-Component 00:00:00:000 0.00 milliseconds @@ -64,7 +66,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index be3a8c7910..b483975a57 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -35,6 +35,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -69,7 +71,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -431,6 +434,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -459,7 +464,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -808,6 +814,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -836,7 +844,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1185,6 +1194,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -1213,7 +1224,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1562,6 +1574,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -1590,7 +1604,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1939,6 +1954,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -1967,7 +1984,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2316,6 +2334,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -2344,7 +2364,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2693,6 +2714,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -2721,7 +2744,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -3070,6 +3094,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -3098,7 +3124,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -3447,6 +3474,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -3475,7 +3504,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -3840,6 +3870,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get Collection Cache(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -4014,7 +4046,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index 43d95de95d..ffc97ea44f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -30,6 +30,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -72,6 +74,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -99,6 +103,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -126,6 +132,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -153,6 +161,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -245,7 +255,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -408,7 +419,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -495,7 +507,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -582,7 +595,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -669,7 +683,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1106,6 +1121,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1149,6 +1166,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1177,6 +1196,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1205,6 +1226,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1240,7 +1263,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1407,7 +1431,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1498,7 +1523,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1589,7 +1615,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1833,6 +1860,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1875,6 +1904,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1902,6 +1933,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1929,6 +1962,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1963,7 +1998,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2126,7 +2162,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2213,7 +2250,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2300,7 +2338,8 @@ "name": "Change Feed Iterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2540,6 +2579,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2583,6 +2624,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2611,6 +2654,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2639,6 +2684,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ChangeFeed MoveNextAsync(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2674,7 +2721,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2841,7 +2889,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2932,7 +2981,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -3023,7 +3073,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -3262,6 +3313,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Initialize Lease Store(00000000-0000-0000-0000-000000000000) ChangeFeed-Component 00:00:00:000 0.00 milliseconds ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -3331,7 +3384,8 @@ "name": "Change Feed Estimator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index 29fc40f674..df53bd53d0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -20,6 +20,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ ├── Waiting for Initialization of client to complete(00000000-0000-0000-0000-000000000000) Unknown-Component 00:00:00:000 0.00 milliseconds @@ -47,7 +49,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -175,6 +178,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -200,7 +205,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 9ee0b6e650..902712a2a4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -37,6 +37,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -71,7 +73,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -223,6 +226,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -276,7 +281,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -510,6 +516,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -555,7 +563,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -754,6 +763,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -810,7 +821,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1030,6 +1042,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -1108,7 +1122,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1331,6 +1346,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -1365,7 +1382,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index e9b0f96a00..5075d5d3e9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -24,6 +24,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -64,6 +66,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -97,6 +101,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -130,6 +136,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -171,6 +179,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -298,6 +307,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -391,6 +401,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -484,6 +495,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -697,6 +709,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -738,6 +752,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -772,6 +788,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -806,6 +824,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -848,6 +868,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -979,6 +1000,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -1076,6 +1098,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -1173,6 +1196,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -1391,6 +1415,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -1431,6 +1457,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -1464,6 +1492,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -1497,6 +1527,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -1538,6 +1570,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -1665,6 +1698,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -1758,6 +1792,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -1851,6 +1886,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -2065,6 +2101,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -2106,6 +2144,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -2140,6 +2180,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -2174,6 +2216,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -2216,6 +2260,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -2347,6 +2392,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -2444,6 +2490,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -2541,6 +2588,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -2762,6 +2810,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -2823,6 +2873,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -2857,6 +2909,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -2891,6 +2945,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -2933,6 +2989,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3108,6 +3165,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3205,6 +3263,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3302,6 +3361,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3522,6 +3582,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -3563,6 +3625,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -3596,6 +3660,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -3629,6 +3695,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -3670,6 +3738,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3803,6 +3872,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3896,6 +3966,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -3989,6 +4060,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -4205,6 +4277,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -4247,6 +4321,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -4281,6 +4357,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ [Query Correlated ActivityId] │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) @@ -4315,6 +4393,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ [Query Correlated ActivityId] │ Redacted To Not Change The Baselines From Run To Run │ ) @@ -4357,6 +4437,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -4494,6 +4575,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -4591,6 +4673,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ @@ -4688,6 +4771,7 @@ "duration in milliseconds": 0, "data": { "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run", "Query Correlated ActivityId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 501a8b187e..2dd4424cb7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -24,6 +24,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -64,6 +66,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -89,6 +93,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -114,6 +120,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -146,7 +154,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -301,7 +310,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -380,7 +390,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -459,7 +470,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -659,6 +671,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -700,6 +714,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -726,6 +742,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -752,6 +770,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -785,7 +805,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -944,7 +965,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1027,7 +1049,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1110,7 +1133,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1315,6 +1339,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1355,6 +1381,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1380,6 +1408,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1405,6 +1435,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1437,7 +1469,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1592,7 +1625,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1671,7 +1705,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1750,7 +1785,8 @@ "name": "FeedIterator Read Next Async", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -1951,6 +1987,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -1992,6 +2030,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2018,6 +2058,8 @@ │ │ ( │ │ [Client Configuration] │ │ Redacted To Not Change The Baselines From Run To Run + │ │ [DistributedTraceId] + │ │ Redacted To Not Change The Baselines From Run To Run │ │ ) │ ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2044,6 +2086,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── MoveNextAsync(00000000-0000-0000-0000-000000000000) ReadFeed-Component 00:00:00:000 0.00 milliseconds │ └── MoveNextAsync(00000000-0000-0000-0000-000000000000) Pagination-Component 00:00:00:000 0.00 milliseconds @@ -2077,7 +2121,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2236,7 +2281,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2319,7 +2365,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -2402,7 +2449,8 @@ "name": "Typed FeedIterator ReadNextAsync", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 627a8ea66f..362afa7444 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -16,6 +16,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Execute query for a partitionkeyrange(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds │ │ ( @@ -141,7 +143,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -582,6 +585,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Execute query for a partitionkeyrange(00000000-0000-0000-0000-000000000000) Query-Component 00:00:00:000 0.00 milliseconds │ │ ( @@ -710,7 +715,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 016a37aaaf..8816767262 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -22,6 +22,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -44,7 +46,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -132,6 +135,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -154,7 +159,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -250,6 +256,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -272,7 +280,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -363,6 +372,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) └── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -385,7 +396,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index add1fcc343..f23344b440 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -20,6 +20,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Get PkValue From Stream(00000000-0000-0000-0000-000000000000) Routing-Component 00:00:00:000 0.00 milliseconds @@ -46,7 +48,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -152,6 +155,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -175,7 +180,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -275,6 +281,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── ItemSerialize(00000000-0000-0000-0000-000000000000) Transport-Component 00:00:00:000 0.00 milliseconds ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -299,7 +307,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { @@ -397,6 +406,8 @@ │ ( │ [Client Configuration] │ Redacted To Not Change The Baselines From Run To Run + │ [DistributedTraceId] + │ Redacted To Not Change The Baselines From Run To Run │ ) ├── Microsoft.Azure.Cosmos.Handlers.RequestInvokerHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds │ └── Microsoft.Azure.Cosmos.Handlers.DiagnosticsHandler(00000000-0000-0000-0000-000000000000) RequestHandler-Component 00:00:00:000 0.00 milliseconds @@ -420,7 +431,8 @@ "start datetime": "0001-01-01T00:00:00Z", "duration in milliseconds": 0, "data": { - "Client Configuration": "Redacted To Not Change The Baselines From Run To Run" + "Client Configuration": "Redacted To Not Change The Baselines From Run To Run", + "DistributedTraceId": "Redacted To Not Change The Baselines From Run To Run" }, "children": [ { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DistributedTracingOTelTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DistributedTracingOTelTests.cs new file mode 100644 index 0000000000..8b5825831c --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DistributedTracingOTelTests.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace Microsoft.Azure.Cosmos +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.CosmosElements; + using Microsoft.Azure.Cosmos.SDK.EmulatorTests; + using Microsoft.VisualStudio.TestTools.UnitTesting; + using Newtonsoft.Json.Linq; + using OpenTelemetry.Trace; + using OpenTelemetry; + using AzureCore = global::Azure.Core; + using Microsoft.Azure.Cosmos.Telemetry; + using System.Diagnostics; + using Microsoft.Azure.Cosmos.Tracing; + using System.Net.Http; + using System.ComponentModel; + + [VisualStudio.TestTools.UnitTesting.TestClass] + public sealed class DistributedTracingOTelTests : BaseCosmosClientHelper + { + [TestInitialize] + public void TestInitialize() + { + AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", true); + AzureCore.ActivityExtensions.ResetFeatureSwitch(); + } + + [DataTestMethod] + [DataRow($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Request", DisplayName = "DirectMode and DistributedFlag On: Asserts activity creation at operation and network level with Diagnostic TraceId being added to logs")] + [DataRow($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", null, DisplayName = "DirectMode and DistributedFlag On: Asserts activity creation at operation level with Diagnostic TraceId being added to logs")] + public async Task SourceEnabled_FlagOn_DirectMode_RecordsActivity_AssertLogTraceId_AssertTraceparent(string operationLevelSource, string networkLevelSource) + { + string[] sources = new string[] { operationLevelSource, networkLevelSource }; + sources = sources.Where(x => x != null).ToArray(); + + using TracerProvider provider = Sdk.CreateTracerProviderBuilder() + .AddCustomOtelExporter() + .AddSource(sources) + .Build(); + + await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false, + customizeClientBuilder: (builder) => builder + .WithDistributedTracing(true) + .WithConnectionModeDirect()); + + Container containerResponse = await this.database.CreateContainerAsync( + id: Guid.NewGuid().ToString(), + partitionKeyPath: "/id", + throughput: 20000); + + CosmosObject cosmosObject = CosmosObject.Create( + new Dictionary() + { + { "id", CosmosString.Create("1") } + }); + + ItemResponse createResponse = await containerResponse.CreateItemAsync(JToken.Parse(cosmosObject.ToString())); + + //Assert traceparent header in Direct mode request + Assert.IsTrue(createResponse.RequestMessage.Headers.TryGetValue("traceparent", out string traceheader)); + Assert.IsNotNull(traceheader); + string[] traceheaderParts = traceheader.Split('-'); + string traceheaderId = traceheaderParts[1]; + + //Assert traceId in Diagnostics logs + string diagnosticsCreateItem = createResponse.Diagnostics.ToString(); + JObject objDiagnosticsCreate = JObject.Parse(diagnosticsCreateItem); + string distributedTraceId = (string)objDiagnosticsCreate["data"]["DistributedTraceId"]; + Assert.IsFalse(string.IsNullOrEmpty(distributedTraceId)); + + //Assert diagnostics log trace id is same as parent trace id of the activity + string operationName = (string)objDiagnosticsCreate["name"]; + string traceIdCreateItem = CustomOtelExporter.CollectedActivities + .Where(x => x.OperationName.Contains(operationName)) + .FirstOrDefault() + .TraceId + .ToString(); + //Assert created activity traceId and diagnosticsLog traceId + Assert.AreEqual(distributedTraceId, traceIdCreateItem); + + //Assert requestHeader trace id and and diagnosticsLog traceId + Assert.AreEqual(distributedTraceId, traceheaderId); + + //Assert activity creation + Assert.IsNotNull(CustomOtelExporter.CollectedActivities); + + if (networkLevelSource != null) + { + // Assert activity created at network level have an existing parent activity + Activity networkLevelChildActivity = CustomOtelExporter.CollectedActivities + .Where(x => x.OperationName.Contains("Request")) + .FirstOrDefault(); + Assert.IsNotNull(CustomOtelExporter.CollectedActivities + .Where(x => x.Id == networkLevelChildActivity.ParentId)); + } + } + + [DataTestMethod] + [DataRow($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Request", DisplayName = "GatewayMode and DistributedFlag On: Asserts activity creation at operation and network level with Diagnostic TraceId being added to logs")] + [DataRow($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", null, DisplayName = "GatewayMode and DistributedFlag On: Asserts activity creation at operation level with Diagnostic TraceId being added to logs")] + public async Task SourceEnabled_FlagOn_GatewayMode_RecordsActivity_AssertLogTraceId_AssertTraceparent(string operationLevelSource, string networkLevelSource) + { + string[] sources = new string[] { operationLevelSource, networkLevelSource }; + sources = sources.Where(x => x != null).ToArray(); + + HttpClientHandlerHelper httpClientHandlerHelper = new HttpClientHandlerHelper + { + RequestCallBack = (request, cancellation) => + { + if (request.Headers.TryGetValues("traceparent", out IEnumerable traceparentHeaderValues)) + { + Assert.IsNotNull(traceparentHeaderValues); + } + return null; + } + }; + + using TracerProvider provider = Sdk.CreateTracerProviderBuilder() + .AddCustomOtelExporter() + .AddSource(sources) + .Build(); + + await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false, + customizeClientBuilder: (builder) => builder + .WithDistributedTracing(true) + .WithHttpClientFactory(() => new HttpClient(httpClientHandlerHelper)) + .WithConnectionModeGateway()); + + ContainerResponse containerResponse = await this.database.CreateContainerAsync( + id: Guid.NewGuid().ToString(), + partitionKeyPath: "/id", + throughput: 20000); + + List b = CustomOtelExporter.CollectedActivities.ToList(); + //Assert traceId in Diagnostics logs + string diagnosticsCreateContainer = containerResponse.Diagnostics.ToString(); + JObject objDiagnosticsCreate = JObject.Parse(diagnosticsCreateContainer); + string distributedTraceId = (string)objDiagnosticsCreate["data"]["DistributedTraceId"]; + Assert.IsFalse(string.IsNullOrEmpty(distributedTraceId)); + + //Assert diagnostics log trace id is same as parent trace id of the activity + string operationName = (string)objDiagnosticsCreate["name"]; + string traceIdCreateContainer = CustomOtelExporter.CollectedActivities + .Where(x => x.OperationName.Contains(operationName)) + .FirstOrDefault() + .TraceId + .ToString(); + Assert.AreEqual(distributedTraceId, traceIdCreateContainer); + + //Assert activity creation + Assert.IsNotNull(CustomOtelExporter.CollectedActivities); + } + + [DataTestMethod] + [DataRow(false, true, "random.source.name", DisplayName = "DirectMode, DistributedFlag On, Random/No Source:Asserts no activity creation")] + [DataRow(true, true, "random.source.name", DisplayName = "GatewayMode, DistributedFlag On, Random/No Source:Asserts no activity creation")] + [DataRow(false, false, "random.source.name", DisplayName = "DirectMode, DistributedFlag Off, Random/No Source:Asserts no activity creation")] + [DataRow(true, false, "random.source.name", DisplayName = "GatewayMode, DistributedFlag Off, Random/No Source:Asserts no activity creation")] + [DataRow(false, false, $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", DisplayName = "DirectMode, DistributedFlag Off, OperationLevel Source:Asserts no activity creation")] + [DataRow(true, false, $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", DisplayName = "GatewayMode, DistributedFlag Off, OperationLevel Source:Asserts no activity creation")] + public async Task NoSourceEnabled_ResultsInNoSourceParentActivityCreation_AssertLogTraceId(bool useGateway, bool enableDistributingTracing, string source) + { + using TracerProvider provider = Sdk.CreateTracerProviderBuilder() + .AddCustomOtelExporter() + .AddSource(source) + .Build(); + + if (useGateway) + { + await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false, + customizeClientBuilder: (builder) => builder + .WithDistributedTracing(enableDistributingTracing) + .WithConnectionModeGateway()); + } + else + { + await base.TestInit(validateSinglePartitionKeyRangeCacheCall: false, + customizeClientBuilder: (builder) => builder + .WithDistributedTracing(enableDistributingTracing)); + } + + ContainerResponse containerResponse = await this.database.CreateContainerAsync( + id: Guid.NewGuid().ToString(), + partitionKeyPath: "/id", + throughput: 20000); + + //Assert traceId in Diagnostics logs + string diagnosticsCreateContainer = containerResponse.Diagnostics.ToString(); + JObject objDiagnosticsCreate = JObject.Parse(diagnosticsCreateContainer); + + if (enableDistributingTracing) + { + //DistributedTraceId present in logs + string distributedTraceId = (string)objDiagnosticsCreate["data"]["DistributedTraceId"]; + Assert.IsFalse(string.IsNullOrEmpty(distributedTraceId), "Distributed Trace Id is not there in diagnostics"); + } + else + { + //DistributedTraceId field not present in logs + Assert.IsNull(objDiagnosticsCreate["data"]["DistributedTraceId"], "Distributed Trace Id has value in diagnostics i.e. " + (string)objDiagnosticsCreate["data"]["DistributedTraceId"]); + } + + //Assert no activity with attached source is created + Assert.AreEqual(0, CustomOtelExporter.CollectedActivities.Count()); + } + + [TestCleanup] + public async Task CleanUp() + { + await base.TestCleanup(); + + AppContext.SetSwitch("Azure.Experimental.EnableActivitySource", false); + AzureCore.ActivityExtensions.ResetFeatureSwitch(); + } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index e25a46e44c..b1223656f1 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -4,9 +4,11 @@ namespace Microsoft.Azure.Cosmos.Tracing { + using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; + using global::Azure; using Microsoft.Azure.Cosmos.Telemetry; using Microsoft.Azure.Cosmos.Tests; using Microsoft.VisualStudio.TestTools.UnitTesting; @@ -16,20 +18,22 @@ internal static class AssertActivity { public static void IsValidOperationActivity(Activity activity) { - Assert.IsTrue(activity.OperationName == activity.DisplayName); + if (string.Equals(activity.Source.Name, $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", StringComparison.OrdinalIgnoreCase)) + { + Assert.IsTrue(activity.OperationName == activity.DisplayName); - Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is emtpy for {activity.OperationName}"); + Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is emtpy for {activity.OperationName}"); - if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString()) - { - Assert.AreEqual(ActivityKind.Internal, activity.Kind, $" Actual Kind is {activity.Kind} but expected is {ActivityKind.Internal} for {activity.OperationName}"); - } - else if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Direct.ToString()) - { - Assert.AreEqual(ActivityKind.Client, activity.Kind, $" Actual Kind is {activity.Kind} but expected is {ActivityKind.Client} for {activity.OperationName}"); - } - - IList expectedTags = new List + if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString()) + { + Assert.AreEqual(ActivityKind.Internal, activity.Kind, $" Actual Kind is {activity.Kind} but expected is {ActivityKind.Internal} for {activity.OperationName}"); + } + else if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Direct.ToString()) + { + Assert.AreEqual(ActivityKind.Client, activity.Kind, $" Actual Kind is {activity.Kind} but expected is {ActivityKind.Client} for {activity.OperationName}"); + } + + IList expectedTags = new List { "az.namespace", "az.schema_url", @@ -60,11 +64,12 @@ public static void IsValidOperationActivity(Activity activity) "db.cosmosdb.correlated_activity_id" }; - foreach (KeyValuePair actualTag in activity.Tags) - { - Assert.IsTrue(expectedTags.Contains(actualTag.Key), $"{actualTag.Key} is not allowed for {activity.OperationName}"); + foreach (KeyValuePair actualTag in activity.Tags) + { + Assert.IsTrue(expectedTags.Contains(actualTag.Key), $"{actualTag.Key} is not allowed for {activity.OperationName}"); - AssertActivity.AssertDatabaseAndContainerName(activity.OperationName, actualTag); + AssertActivity.AssertDatabaseAndContainerName(activity.OperationName, actualTag); + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index b0df15c3f2..44d34abece 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -34,6 +34,8 @@ internal class CustomListener : public static ConcurrentBag CollectedNetworkActivities { private set; get; } = new(); private static ConcurrentBag CollectedEvents { set; get; } = new(); + private static List EventSources { set; get; } = new(); + public CustomListener(string name, string eventName) : this(n => Regex.Match(n, name).Success, eventName) { @@ -43,6 +45,11 @@ public CustomListener(Func filter, string eventName) { this.sourceNameFilter = filter; this.eventName = eventName; + + foreach (EventSource eventSource in EventSources) + { + this.OnEventSourceCreated(eventSource); + } DiagnosticListener.AllListeners.Subscribe(this); } @@ -152,6 +159,11 @@ public void OnNext(DiagnosticListener value) /// protected override void OnEventSourceCreated(EventSource eventSource) { + if(this.eventName == null) + { + EventSources.Add(eventSource); + } + if (eventSource != null && eventSource.Name.Equals(this.eventName)) { this.EnableEvents(eventSource, EventLevel.Informational); // Enable information level events diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs index de819ee021..9572a298a6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs @@ -18,11 +18,12 @@ internal class CustomOtelExporter : BaseExporter { private readonly string _name; - public static List CollectedActivities = new List(); + public static List CollectedActivities; public CustomOtelExporter(string name = "CustomOtelExporter") { this._name = name; + CollectedActivities = new List(); } public override ExportResult Export(in Batch batch) From e08fd5242f2129c4f0297447f35ec69881a11682 Mon Sep 17 00:00:00 2001 From: Rinat Minibaev <132935507+rinatmini@users.noreply.github.com> Date: Thu, 8 Jun 2023 07:29:04 -0700 Subject: [PATCH 132/164] Documentation: Adds additional remarks to CosmosClient (#3891) * CosmosClient documentation improvements * Cref fix * Link fix * Documentation fix * Typo fix --------- Co-authored-by: Matias Quaranta --- Microsoft.Azure.Cosmos/src/CosmosClient.cs | 20 ++++++++++++++++++- .../src/Fluent/CosmosClientBuilder.cs | 13 ++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/CosmosClient.cs b/Microsoft.Azure.Cosmos/src/CosmosClient.cs index d4fe7dcb9b..d622e9ddcb 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClient.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClient.cs @@ -92,6 +92,9 @@ namespace Microsoft.Azure.Cosmos /// ]]> /// /// + /// + /// The returned not-initialized reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls + /// /// /// /// Performance Tips @@ -179,6 +182,9 @@ protected CosmosClient() /// ]]> /// /// + /// + /// The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls. + /// /// /// /// Performance Tips @@ -221,6 +227,9 @@ public CosmosClient( /// ]]> /// /// + /// + /// The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls. + /// /// /// /// Performance Tips @@ -274,7 +283,10 @@ public CosmosClient( /// /// Performance Tips /// Diagnose and troubleshoot issues - /// AzureKeyCredential enables changing/updating master-key/ResourceToken whle CosmosClient is still in use. + /// + /// AzureKeyCredential enables changing/updating master-key/ResourceToken whle CosmosClient is still in use. + /// The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls. + /// public CosmosClient( string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, @@ -292,6 +304,9 @@ public CosmosClient( /// of the application which enables efficient connection management and performance. Please refer to the /// performance guide. /// + /// + /// The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls. + /// /// The cosmos service endpoint to use. /// The token to provide AAD token for authorization. /// (Optional) client options @@ -368,6 +383,9 @@ internal CosmosClient( /// ]]> /// /// + /// + /// The returned reference doesn't guarantee credentials or connectivity validations because initialization doesn't make any network calls. + /// public static async Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList<(string databaseId, string containerId)> containers, diff --git a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs index 692d5b498a..8b72bfffa4 100644 --- a/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs +++ b/Microsoft.Azure.Cosmos/src/Fluent/CosmosClientBuilder.cs @@ -167,9 +167,13 @@ public CosmosClientBuilder( /// /// A method to create the cosmos client + /// CosmosClient is thread-safe. Its recommended to maintain a single instance of CosmosClient per lifetime + /// of the application which enables efficient connection management and performance. Please refer to the + /// performance guide. /// /// /// Setting this property after sending any request won't have any effect. + /// The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls. /// /// An instance of . public CosmosClient Build() @@ -191,6 +195,11 @@ public CosmosClient Build() /// /// A method to create the cosmos client and initialize the provided containers. + /// In addition to that it initializes the client with containers provided i.e The SDK warms up the caches and + /// connections before the first call to the service is made. Use this to obtain lower latency while startup of your application. + /// CosmosClient is thread-safe. Its recommended to maintain a single instance of CosmosClient per lifetime + /// of the application which enables efficient connection management and performance. Please refer to the + /// performance guide. /// /// Containers to be initialized identified by it's database name and container name. /// (Optional) Cancellation Token @@ -214,9 +223,13 @@ public Task BuildAndInitializeAsync(IReadOnlyList<(string database /// /// A method to create the cosmos client + /// CosmosClient is thread-safe. Its recommended to maintain a single instance of CosmosClient per lifetime + /// of the application which enables efficient connection management and performance. Please refer to the + /// performance guide. /// /// /// Setting this property after sending any request won't have any effect. + /// The returned reference doesn't guarantee credentials or connectivity validations because creation doesn't make any network calls. /// internal virtual CosmosClient Build(DocumentClient documentClient) { From d58b44138e07f17dcd8db5b80400a47c4561c095 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Fri, 9 Jun 2023 02:00:27 +0530 Subject: [PATCH 133/164] Open Telemetry End To End Test: Adds baseline for network level requests trace (#3887) * enable request level in end to end * made some changes * fix tests * fix display name * hardcoded containername and databasenam * fix tests * temp * fix tests * update contracts * fix tests * fixed display name --- .../OpenTelemetryRecorderFactory.cs | 2 + ...iterBaselineTests.BatchOperationsAsync.xml | 13 +- ...riterBaselineTests.BulkOperationsAsync.xml | 676 ++++++++++-------- ...aceWriterBaselineTests.ChangeFeedAsync.xml | 189 +++-- ...eWriterBaselineTests.MiscellanousAsync.xml | 28 +- ...neTests.PointOperationsExceptionsAsync.xml | 36 +- ...EndTraceWriterBaselineTests.QueryAsync.xml | 217 +++--- ...TraceWriterBaselineTests.ReadFeedAsync.xml | 124 ++-- ...TraceWriterBaselineTests.ReadManyAsync.xml | 26 +- ...selineTests.StreamPointOperationsAsync.xml | 52 +- ...aselineTests.TypedPointOperationsAsync.xml | 52 +- .../Tracing/AssertActivity.cs | 4 +- .../Tracing/CustomListener.cs | 35 +- .../Tracing/CustomOtelExporter.cs | 10 +- .../EndToEndTraceWriterBaselineTests.cs | 10 +- .../Utils/Util.cs | 4 +- 16 files changed, 895 insertions(+), 583 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs index fee3282c1a..ca0b864d2f 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/OpenTelemetryRecorderFactory.cs @@ -51,6 +51,8 @@ public static OpenTelemetryCoreRecorder CreateRecorder(string operationName, // Record values only when we have a valid Diagnostic Scope if (scope.IsEnabled) { + scope.SetDisplayName($"{operationName} {containerName}"); + openTelemetryRecorder = OpenTelemetryCoreRecorder.CreateOperationLevelParentActivity( operationScope: scope, operationName: operationName, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 66ca36f8ba..66edf29c06 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -132,12 +132,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ExecuteAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -155,6 +155,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 1001 + 207 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml index b483975a57..053f6ecc39 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BulkOperationsAsync.xml @@ -156,12 +156,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -179,12 +179,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -202,12 +202,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -225,12 +225,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -248,12 +248,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -271,12 +271,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -294,12 +294,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -317,12 +317,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -340,12 +340,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -363,12 +363,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -386,6 +386,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -536,12 +543,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -559,12 +566,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -582,12 +589,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -605,12 +612,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -628,12 +635,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -651,12 +658,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -674,12 +681,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -697,12 +704,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -720,12 +727,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -743,12 +750,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -766,6 +773,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -916,12 +930,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -939,12 +953,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -962,12 +976,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -985,12 +999,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1008,12 +1022,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1031,12 +1045,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1054,12 +1068,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1077,12 +1091,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1100,12 +1114,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1123,12 +1137,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1146,6 +1160,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1296,12 +1317,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1319,12 +1340,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1342,12 +1363,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1365,12 +1386,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1388,12 +1409,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1411,12 +1432,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1434,12 +1455,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1457,12 +1478,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1480,12 +1501,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1503,12 +1524,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1526,6 +1547,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1676,12 +1704,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1699,12 +1727,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1722,12 +1750,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1745,12 +1773,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1768,12 +1796,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1791,12 +1819,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1814,12 +1842,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1837,12 +1865,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1860,12 +1888,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1883,12 +1911,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1906,6 +1934,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -2056,12 +2091,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2079,12 +2114,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2102,12 +2137,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2125,12 +2160,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2148,12 +2183,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2171,12 +2206,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2194,12 +2229,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2217,12 +2252,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2240,12 +2275,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2263,12 +2298,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2286,6 +2321,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -2436,12 +2478,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2459,12 +2501,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2482,12 +2524,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2505,12 +2547,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2528,12 +2570,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2551,12 +2593,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2574,12 +2616,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2597,12 +2639,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2620,12 +2662,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2643,12 +2685,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2666,6 +2708,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -2816,12 +2865,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2839,12 +2888,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2862,12 +2911,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2885,12 +2934,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2908,12 +2957,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2931,12 +2980,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2954,12 +3003,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2977,12 +3026,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3000,12 +3049,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3023,12 +3072,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3046,6 +3095,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -3196,12 +3252,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3219,12 +3275,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3242,12 +3298,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3265,12 +3321,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3288,12 +3344,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3311,12 +3367,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3334,12 +3390,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3357,12 +3413,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3380,12 +3436,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3403,12 +3459,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3426,6 +3482,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -3576,12 +3639,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3599,12 +3662,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3622,12 +3685,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3645,12 +3708,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3668,12 +3731,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3691,12 +3754,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3714,12 +3777,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3737,12 +3800,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3760,12 +3823,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3783,12 +3846,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3806,6 +3869,13 @@ Some Value + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -4547,12 +4617,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml index ffc97ea44f..379c887104 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ChangeFeedAsync.xml @@ -967,12 +967,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -990,12 +990,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1013,12 +1013,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1036,12 +1036,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1059,12 +1059,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1082,6 +1082,20 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 304 + @@ -1705,12 +1719,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1728,12 +1742,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1751,12 +1765,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1774,12 +1788,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1797,12 +1811,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1820,6 +1834,20 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 304 + @@ -2424,12 +2452,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2447,12 +2475,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2470,12 +2498,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2493,12 +2521,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2516,12 +2544,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Iterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2539,6 +2567,20 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 304 + @@ -3163,12 +3205,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3186,12 +3228,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3209,12 +3251,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3232,12 +3274,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3255,12 +3297,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3278,6 +3320,20 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 304 + @@ -3556,12 +3612,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Change Feed Estimator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3579,6 +3635,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml index df53bd53d0..7341e76cb9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.MiscellanousAsync.xml @@ -4,7 +4,7 @@ Custom Handler - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 DeleteAsync - Some Value - Some Value + miscdbcustonhandler + cosmosdb Some Value 127.0.0.1 @@ -133,12 +133,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateDatabaseAsync - Some Value - Some Value + miscdbcustonhandler + cosmosdb Some Value 127.0.0.1 @@ -166,7 +166,7 @@ - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 DeleteAsync - Some Value - Some Value + miscdbdataplane + cosmosdb Some Value 127.0.0.1 @@ -279,12 +279,12 @@ Some Value - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateDatabaseAsync - Some Value - Some Value + miscdbdataplane + cosmosdb Some Value 127.0.0.1 diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml index 902712a2a4..4e11d5e4b7 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.PointOperationsExceptionsAsync.xml @@ -151,12 +151,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -415,12 +415,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -662,12 +662,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -941,12 +941,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1284,12 +1284,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1460,12 +1460,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 5075d5d3e9..8b737a419e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -586,12 +586,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -609,12 +609,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -632,12 +632,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -655,12 +655,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -678,6 +678,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1291,12 +1298,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1314,12 +1321,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1337,12 +1344,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1360,12 +1367,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1383,6 +1390,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1977,12 +1991,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2000,12 +2014,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2023,12 +2037,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2046,12 +2060,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2069,6 +2083,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -2683,12 +2704,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2706,12 +2727,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2729,12 +2750,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2752,12 +2773,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2775,6 +2796,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -3456,12 +3484,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3479,12 +3507,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3502,12 +3530,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3525,12 +3553,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -3548,6 +3576,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -4151,12 +4186,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4174,12 +4209,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4197,12 +4232,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4220,12 +4255,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4243,6 +4278,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -4866,12 +4908,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4889,12 +4931,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4912,12 +4954,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4935,12 +4977,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -4958,6 +5000,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml index 2dd4424cb7..86f16841b5 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadFeedAsync.xml @@ -548,12 +548,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -571,12 +571,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -594,12 +594,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -617,12 +617,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -640,6 +640,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1215,12 +1222,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1238,12 +1245,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1261,12 +1268,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1284,12 +1291,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1307,6 +1314,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1863,12 +1877,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1886,12 +1900,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1909,12 +1923,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1932,12 +1946,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 FeedIterator Read Next Async - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1955,6 +1969,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -2531,12 +2552,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2554,12 +2575,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2577,12 +2598,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2600,12 +2621,12 @@ Some Value South Central US - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 Typed FeedIterator ReadNextAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -2623,6 +2644,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml index 362afa7444..42c948a0d9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.ReadManyAsync.xml @@ -545,12 +545,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ReadManyItemsStreamAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -568,6 +568,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -1129,12 +1136,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ReadManyItemsAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -1152,6 +1159,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml index 8816767262..ea5327040a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.StreamPointOperationsAsync.xml @@ -92,12 +92,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemStreamAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -115,6 +115,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 201 + @@ -205,12 +212,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ReadItemStreamAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -228,6 +235,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -326,12 +340,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ReplaceItemStreamAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -349,6 +363,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -442,12 +463,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 DeleteItemStreamAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -465,6 +486,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 204 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml index f23344b440..25b6e52364 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.TypedPointOperationsAsync.xml @@ -112,12 +112,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 CreateItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -135,6 +135,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 201 + @@ -230,12 +237,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ReadItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -253,6 +260,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -361,12 +375,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 ReplaceItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -384,6 +398,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 200 + @@ -481,12 +502,12 @@ } ] }]]> - + Microsoft.DocumentDB https://opentelemetry.io/schemas/1.17.0 DeleteItemAsync - Some Value - Some Value + databaseName + containerName cosmosdb Some Value 127.0.0.1 @@ -504,6 +525,13 @@ Some Value South Central US + + Microsoft.DocumentDB + https://opentelemetry.io/schemas/1.17.0 + Some Value + 0 + 204 + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs index b1223656f1..75153d3b88 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/AssertActivity.cs @@ -20,9 +20,7 @@ public static void IsValidOperationActivity(Activity activity) { if (string.Equals(activity.Source.Name, $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", StringComparison.OrdinalIgnoreCase)) { - Assert.IsTrue(activity.OperationName == activity.DisplayName); - - Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is emtpy for {activity.OperationName}"); + Assert.IsFalse(string.IsNullOrEmpty(activity.GetTagItem("db.cosmosdb.connection_mode").ToString()), $"connection mode is empty for {activity.OperationName}"); if (activity.GetTagItem("db.cosmosdb.connection_mode").ToString() == ConnectionMode.Gateway.ToString()) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs index 44d34abece..cae05fa94d 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomListener.cs @@ -242,9 +242,13 @@ private string GenerateTagForBaselineTest(Activity activity) "db.operation", "db.system", "net.peer.name", + "db.name", + "db.cosmosdb.container", "db.cosmosdb.connection_mode", "db.cosmosdb.operation_type", - "db.cosmosdb.regions_contacted" + "db.cosmosdb.regions_contacted", + "tcp.sub_status_code", + "tcp.status_code" }; StringBuilder builder = new StringBuilder(); @@ -278,18 +282,18 @@ public List GetRecordedAttributes() generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity)); } - /* List collectedNetworkActivities = new List(CustomListener.CollectedNetworkActivities); - collectedNetworkActivities = collectedNetworkActivities + HashSet collectedNetworkActivities = new HashSet(CustomListener.CollectedNetworkActivities, new NetworkActivityComparer()); + List orderedUniqueNetworkActivities = collectedNetworkActivities .OrderBy(act => act.Source.Name + act.OperationName + - act.GetTagItem("rntbd.status_code") + - act.GetTagItem("rntbd.sub_status_code")) + act.GetTagItem("tcp.status_code") + + act.GetTagItem("tcp.sub_status_code")) .ToList(); - foreach (Activity activity in collectedNetworkActivities) + foreach (Activity activity in orderedUniqueNetworkActivities) { generatedActivityTagsForBaselineXmls.Add(this.GenerateTagForBaselineTest(activity)); - }*/ + } List outputList = new List(); if(generatedActivityTagsForBaselineXmls != null && generatedActivityTagsForBaselineXmls.Count > 0) @@ -345,5 +349,22 @@ public ProducedLink(string traceparent, string tracestate) public string Traceparent { get; set; } public string Tracestate { get; set; } } + + public class NetworkActivityComparer : IEqualityComparer + { + public bool Equals(Activity x, Activity y) + { + string xData = x.Source.Name + x.OperationName + x.GetTagItem("tcp.status_code") + x.GetTagItem("tcp.sub_status_code"); + string yData = y.Source.Name + y.OperationName + y.GetTagItem("tcp.status_code") + y.GetTagItem("tcp.sub_status_code"); + + return xData.Equals(yData, StringComparison.OrdinalIgnoreCase); + } + + public int GetHashCode(Activity obj) + { + return (obj.Source.Name + obj.OperationName + obj.GetTagItem("tcp.status_code") + obj.GetTagItem("tcp.sub_status_code")).GetHashCode() ; + } + } + } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs index 9572a298a6..eb46d83e48 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/CustomOtelExporter.cs @@ -7,6 +7,7 @@ namespace Microsoft.Azure.Cosmos.Tracing using System; using System.Collections.Generic; using System.Diagnostics; + using Microsoft.Azure.Cosmos.Telemetry; using OpenTelemetry; using OpenTelemetry.Trace; @@ -34,9 +35,12 @@ public override ExportResult Export(in Batch batch) foreach (Activity activity in batch) { - AssertActivity.IsValidOperationActivity(activity); - - CollectedActivities.Add(activity); + if (string.Equals(activity.Source.Name, $"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", StringComparison.OrdinalIgnoreCase)) + { + AssertActivity.IsValidOperationActivity(activity); + + CollectedActivities.Add(activity); + } } return ExportResult.Success; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index 63d883ef21..64bc7c015a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -71,11 +71,11 @@ public static async Task ClassInitAsync(TestContext context) })); EndToEndTraceWriterBaselineTests.database = await client.CreateDatabaseAsync( - Guid.NewGuid().ToString(), + "databaseName", cancellationToken: default); EndToEndTraceWriterBaselineTests.container = await EndToEndTraceWriterBaselineTests.database.CreateContainerAsync( - id: Guid.NewGuid().ToString(), + id: "containerName", partitionKeyPath: "/id", throughput: 20000); @@ -401,7 +401,7 @@ public async Task ChangeFeedAsync() //---------------------------------------------------------------- { Container leaseContainer = await EndToEndTraceWriterBaselineTests.database.CreateContainerAsync( - id: Guid.NewGuid().ToString(), + id: "changefeedleasecontainer", partitionKeyPath: "/id"); ChangeFeedProcessor processor = container @@ -1347,7 +1347,7 @@ public async Task MiscellanousAsync() { startLineNumber = GetLineNumber(); - DatabaseResponse databaseResponse = await miscCosmosClient.CreateDatabaseAsync(Guid.NewGuid().ToString()); + DatabaseResponse databaseResponse = await miscCosmosClient.CreateDatabaseAsync("miscdbcustonhandler"); EndToEndTraceWriterBaselineTests.AssertCustomHandlerTime( databaseResponse.Diagnostics.ToString(), requestHandler.FullHandlerName, @@ -1370,7 +1370,7 @@ public async Task MiscellanousAsync() startLineNumber = GetLineNumber(); RequestOptions requestOptions = new RequestOptions(); DatabaseResponse databaseResponse = await client.CreateDatabaseAsync( - id: Guid.NewGuid().ToString(), + id: "miscdbdataplane", requestOptions: requestOptions); ITrace trace = ((CosmosTraceDiagnostics)databaseResponse.Diagnostics).Value; await databaseResponse.Database.DeleteAsync(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs index 4773c7de96..366cc68811 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Utils/Util.cs @@ -548,11 +548,11 @@ internal static CustomListener ConfigureOpenTelemetryAndCustomListeners() // Open Telemetry Listener Util.OTelTracerProvider = Sdk.CreateTracerProviderBuilder() .AddCustomOtelExporter() // use any exporter here - .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation") + .AddSource($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*") .Build(); // Custom Listener - Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.Operation", "Azure-Cosmos-Operation-Request-Diagnostics"); + Util.TestListener = new CustomListener($"{OpenTelemetryAttributeKeys.DiagnosticNamespace}.*", "Azure-Cosmos-Operation-Request-Diagnostics"); return Util.TestListener; From df630928ca7f421177998464fd57b31ce27cd84e Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Sat, 10 Jun 2023 01:52:17 +0530 Subject: [PATCH 134/164] [Internal] Design Docs: Adds Design Document for Client Telemetry (#3590) * sdk design for client telemetry * Otel design * update optel design * added more nformation * updated ct design * remove otel design * Client Telemetry Design * update typos * fix typos * fix typos * added limitation * updated docs * updated doc * updated text * Update docs/observability.md Co-authored-by: Kiran Kumar Kolli * Update docs/observability.md Co-authored-by: Kiran Kumar Kolli * Update docs/observability.md Co-authored-by: Kiran Kumar Kolli * Update docs/observability.md Co-authored-by: Kiran Kumar Kolli * Update docs/observability.md Co-authored-by: Kiran Kumar Kolli * move stuff here and there. --------- Co-authored-by: Kiran Kumar Kolli --- docs/observability.md | 73 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/docs/observability.md b/docs/observability.md index b74b55cd21..184d609f76 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -33,4 +33,75 @@ flowchart TD OtherLogic --> GetResponse(Get Response for the request) SendResponse --> OperationCall -``` \ No newline at end of file +``` + +## Send telemetry from SDK to service (Private Preview) + +### Introduction +When opted-in CosmosDB SDK collects below aggregated telemetry data every 10 minutes to Azure CosmosDB service. +1. Operation(CRUD APIs) Latencies and Request Units (RUs). +2. Metadata caches (ex: CollectionCache) miss statistics +3. Client System Usage (during an operation) : + * CPU usage + * Memory Usage + * Thread Starvation + * Network Connections Opened (only TCP Connections) +4. TOP 10 slower network interactions + +> Note: We don't collect any PII data as part of this feature. + +### Benefits +Enabling this feature provides numerous benefits. The telemetry data collected will allow us to identify and address potential issues. This results in a superior support experience and ensures that some issues can even be resolved before they impact your application. In short, customers with this feature enabled can expect a smoother and more reliable experience. + +### Impact of this feature enabled +* _Latency_: Customer should not see any impact on latency. +* _Total RPS_: It depends on the infrastructure the application using SDK is hosted on among other factors but the impact should not exceed 10%. +* _Any other impact_: Collector needs around 18MB of in-memory storage to hold the data and this storage is always constant (it means it doesn't grow, no matter how much data we have) +* Benchmark Numbers: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json + +### Components + +**Telemetry Job:** Background task which collects the data and sends it to a Azure CosmosDB service every 10 minutes. + +**Collectors:** In-memory storage which keeps the telemetry data collected during an operation. There are 3 types of collectors including: +* _Operational Data Collector_: It keeps operation level latencies and request units. +* _Network Data Collector_: It keeps all the metrics related to network or TCP calls. It has its own Sampler which sample-in only slowest TCP calls for a particular replica. +* _Cache Data Collector_: It keeps all the cache call latencies. Right now, only collection cache is covered. + +**Get VM Information**: + +- Azure VM: [Azure Instance Metadata](https://learn.microsoft.com/azure/virtual-machines/instance-metadata-service?tabs=windows) call. +- Non-Azure VM: We don't collect any other information except VMID which will a Guid or Hashed Machine Name. + +**Processor**: Its responsibility is to get all the data and divide it into small chunks (<2MB) and send each chunk to the Azure CosmosDB service. + +```mermaid +flowchart TD + subgraph TelemetryJob[Telemetry Background Job] + subgraph Storage[In Memory Storage or Collectors] + subgraph NetworkDataCollector[Network Data Collector] + TcpDatapoint(Network Request Datapoint) --> NetworkHistogram[(Histogram)] + DataSampler(Sampler) + end + subgraph DataCollector[Operational Data Collector] + OpsDatapoint(Operation Datapoint) --> OperationHistogram[(Histogram)] + end + subgraph CacheCollector[Cache Data Collector] + CacheDatapoint(Cache Request Datapoint) --> CacheHistogram[(Histogram)] + end + end + subgraph TelemetryTask[Telemetry Task Every 10 min] + CacheAccountInfo(Cached Account Properties) --> VMInfo + VMInfo(Get VM Information) --> CollectSystemUsage + CollectSystemUsage(Record System Usage Information) --> GetDataFromCollector + end + subgraph Processor + GetDataFromCollector(Fetch Data from Collectors) --> Serializer + Serializer(Serialize and divide the Payload) --> SendCTOverHTTP(Send Data over HTTP to Service) + end + Storage --> |Get Aggregated data|GetDataFromCollector + end +``` + +### Limitations +1. AAD Support is not available. \ No newline at end of file From d1dbe94ee4e855ef90a6997ab075d7306413ff1e Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Sat, 10 Jun 2023 03:06:17 +0530 Subject: [PATCH 135/164] [Internal] Design Docs: Adds Design Document for Client Telemetry Part 2 (#3903) * updated doc * Update docs/observability.md Co-authored-by: Justine Cocchi * updated text --------- Co-authored-by: Justine Cocchi --- docs/observability.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/observability.md b/docs/observability.md index 184d609f76..50ce14d33c 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -39,19 +39,19 @@ flowchart TD ### Introduction When opted-in CosmosDB SDK collects below aggregated telemetry data every 10 minutes to Azure CosmosDB service. -1. Operation(CRUD APIs) Latencies and Request Units (RUs). +1. Operation(Point, Stream, Batch and Query APIs) Latencies and Request Units (RUs). 2. Metadata caches (ex: CollectionCache) miss statistics -3. Client System Usage (during an operation) : +3. Host Resource Usage: (during an operation) : * CPU usage * Memory Usage * Thread Starvation * Network Connections Opened (only TCP Connections) -4. TOP 10 slower network interactions +4. TOP 10 slowest network interactions per endpoint > Note: We don't collect any PII data as part of this feature. ### Benefits -Enabling this feature provides numerous benefits. The telemetry data collected will allow us to identify and address potential issues. This results in a superior support experience and ensures that some issues can even be resolved before they impact your application. In short, customers with this feature enabled can expect a smoother and more reliable experience. +Enabling this feature provides numerous benefits. The telemetry data collected will allow us to identify and address potential issues. This results in a superior support experience and ensures that some issues can even be resolved before they impact your application. In short, customers with this feature enabled can expect a smoother and more reliable support experience. ### Impact of this feature enabled * _Latency_: Customer should not see any impact on latency. From 28e03c8bd490a2f3c955dea02eb1bd78b0eda61a Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Fri, 9 Jun 2023 19:07:04 -0700 Subject: [PATCH 136/164] ConnectionPolicy: Refactors Code to Reduce Default Request Timeout to 6 Seconds. (#3902) * Code changes to reduce default request timeout to 6 seconds. * Code changes to update API doc default request timeout to 6 seconds. --- Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs | 2 +- Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs b/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs index 172aac4fbb..7abfd76deb 100644 --- a/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.Cosmos /// internal sealed class ConnectionPolicy { - private const int defaultRequestTimeout = 10; + private const int defaultRequestTimeout = 6; // defaultMediaRequestTimeout is based upon the blob client timeout and the retry policy. private const int defaultMediaRequestTimeout = 300; private const int defaultMaxConcurrentFanoutRequests = 32; diff --git a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs index c826bb90d1..1fce195915 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs @@ -223,7 +223,7 @@ public int GatewayModeMaxConnectionLimit /// Gets the request timeout in seconds when connecting to the Azure Cosmos DB service. /// The number specifies the time to wait for response to come back from network peer. ///
- /// Default value is 1 minute. + /// Default value is 6 seconds. /// public TimeSpan RequestTimeout { get; set; } From b9242094bada0cb5b05851ff077f068019b57d7b Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Fri, 9 Jun 2023 21:39:37 -0700 Subject: [PATCH 137/164] [Internal] Upgrade Resiliency: Adds Replica Health State Diagnostics. (#3835) * Code changes to add replica health status in diagnostics. * Code changes to fix performance test build failure. * Code changes to add health state capture logic in address cache. * Code changes to fix benchmark test execution. * Code changes to add tests to validate health state cache. * Code changes to reduce default request timeout to 5 seconds. * Revert "Code changes to reduce default request timeout to 5 seconds." This reverts commit 139f37e588fc9dfed608431f4186c567a080e622. --- .../src/Routing/GatewayAddressCache.cs | 23 +++++++ .../Tracing/TraceWriter.TraceJsonWriter.cs | 18 ++++++ .../Contracts/BenchmarkResults.json | 6 +- .../TraceWriterBaselineTests.TraceData.xml | 7 ++ .../GatewayAddressCacheTests.cs | 64 +++++++++++++++++++ .../Tracing/TraceTests.cs | 2 - 6 files changed, 115 insertions(+), 5 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index 182243ec40..14b641959a 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -550,10 +550,17 @@ await this.GetServerAddressesViaGatewayAsync(request, collectionRid, new[] { par } this.ValidateReplicaAddresses(transportAddressUris); + this.CaptureTransportAddressUriHealthStates( + partitionAddressInformation: mergedAddresses, + transportAddressUris: transportAddressUris); return mergedAddresses; } + this.CaptureTransportAddressUriHealthStates( + partitionAddressInformation: result.Item2, + transportAddressUris: result.Item2.Get(Protocol.Tcp)?.ReplicaTransportAddressUris); + return result.Item2; } } @@ -936,6 +943,22 @@ TransportAddressHealthState.HealthStatus.Unknown or TransportAddressHealthState.HealthStatus.UnhealthyPending); } + /// + /// The replica health status of the transport address uri will change eventually with the motonically increasing time. + /// However, the purpose of this method is to capture the health status snapshot at this moment. + /// + /// An instance of . + /// A read-only list of . + private void CaptureTransportAddressUriHealthStates( + PartitionAddressInformation partitionAddressInformation, + IReadOnlyList transportAddressUris) + { + partitionAddressInformation + .Get(Protocol.Tcp)? + .SetTransportAddressUrisHealthState( + replicaHealthStates: transportAddressUris.Select(x => x.GetCurrentHealthState().GetHealthStatusDiagnosticString()).ToList()); + } + protected virtual void Dispose(bool disposing) { if (this.disposedValue) diff --git a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs index 74363c8ca1..247c9f2587 100644 --- a/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs +++ b/Microsoft.Azure.Cosmos/src/Tracing/TraceWriter.TraceJsonWriter.cs @@ -430,6 +430,8 @@ public void Visit(StoreResult storeResult) this.jsonWriter.WriteFieldName("BELatencyInMs"); this.WriteStringValueOrNull(storeResult.BackendRequestDurationInMs); + this.WriteJsonUriArray("ReplicaHealthStatuses", storeResult.ReplicaHealthStatuses); + this.VisitTransportRequestStats(storeResult.TransportRequestStats); this.jsonWriter.WriteFieldName("TransportException"); @@ -468,6 +470,22 @@ private void WriteJsonUriArray(string propertyName, IEnumerable replicaHealthStatuses) + { + this.jsonWriter.WriteFieldName(propertyName); + this.jsonWriter.WriteArrayStart(); + + if (replicaHealthStatuses != null) + { + foreach (string replicaHealthStatus in replicaHealthStatuses) + { + this.WriteStringValueOrNull(replicaHealthStatus); + } + } + + this.jsonWriter.WriteArrayEnd(); + } + private void WriteRegionsContactedArray(string propertyName, IEnumerable<(string, Uri)> uris) { this.jsonWriter.WriteFieldName(propertyName); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json index c97e0b5b2c..a06dabf09c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Performance.Tests/Contracts/BenchmarkResults.json @@ -14,7 +14,7 @@ "MockedItemBenchmark.DeleteItemNotExists;[Type=OfT]": 42172.5, "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTCustom]": 42174.75, "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 42166.5, - "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithDiagnosticsToString]": 56695.5, + "MockedItemBenchmark.DeleteItemNotExists;[Type=OfTWithDiagnosticsToString]": 63338, "MockedItemBenchmark.DeleteItemNotExists;[Type=Stream]": 37610, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfT]": 13342232, "MockedItemBenchmark.QuerySinglePartitionMultiplePages;[Type=OfTCustom]": 13341058, @@ -34,12 +34,12 @@ "MockedItemBenchmark.ReadItemExists;[Type=OfT]": 33630.5, "MockedItemBenchmark.ReadItemExists;[Type=OfTCustom]": 33636.25, "MockedItemBenchmark.ReadItemExists;[Type=OfTWithClientTelemetryEnabled]": 33627.75, - "MockedItemBenchmark.ReadItemExists;[Type=OfTWithDiagnosticsToString]": 47961.25, + "MockedItemBenchmark.ReadItemExists;[Type=OfTWithDiagnosticsToString]": 55044, "MockedItemBenchmark.ReadItemExists;[Type=Stream]": 26018.25, "MockedItemBenchmark.ReadItemNotExists;[Type=OfT]": 43489.25, "MockedItemBenchmark.ReadItemNotExists;[Type=OfTCustom]": 43490, "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithClientTelemetryEnabled]": 43489.25, - "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithDiagnosticsToString]": 57420.25, + "MockedItemBenchmark.ReadItemNotExists;[Type=OfTWithDiagnosticsToString]": 58054, "MockedItemBenchmark.ReadItemNotExists;[Type=Stream]": 39044, "MockedItemBenchmark.UpdateItem;[Type=OfT]": 36591, "MockedItemBenchmark.UpdateItem;[Type=OfTCustom]": 36594.25, diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml index 8b6adc1c15..885699cb43 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml @@ -340,6 +340,12 @@ "RequestCharge": 3.14, "RetryAfterInMs": "9000", "BELatencyInMs": "4.2", + "ReplicaHealthStatuses": [ + "http://storephysicaladdress-1p.com:Connected", + "http://storephysicaladdress-2s.com:Unknown", + "http://storephysicaladdress-3s.com:Unhealthy", + "http://storephysicaladdress-4s.com:Unknown" + ], "transportRequestTimeline": { "requestTimeline": [ { @@ -529,6 +535,7 @@ "RequestCharge": 0, "RetryAfterInMs": null, "BELatencyInMs": null, + "ReplicaHealthStatuses":[], "transportRequestTimeline": null, "TransportException": null } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 2d0d0a5c6a..5116eb22de 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -971,6 +971,13 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidat expected: TransportAddressHealthState.HealthStatus.Connected, actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + GatewayAddressCacheTests.ValidateHealthStatesInDiagnostics( + addressInfo: addressInfo, + numberOfConnectedReplicas: 0, + numberOfUnknownReplicas: 4, + numberOfUnhealthyPendingReplicas: 0, + numberOfUnhealthyReplicas: 0); + Assert.AreEqual(4, addressInfo.AllAddresses.Count); Assert.AreEqual(1, addressInfo.AllAddresses.Count(x => x.PhysicalUri == oldAddress)); Assert.AreEqual(0, addressInfo.AllAddresses.Count(x => x.PhysicalUri == newAddress)); @@ -1008,6 +1015,14 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidat actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); mockHttpHandler.VerifyAll(); + + GatewayAddressCacheTests.ValidateHealthStatesInDiagnostics( + addressInfo: addressInfo, + numberOfConnectedReplicas: 2, + numberOfUnknownReplicas: 1, + numberOfUnhealthyPendingReplicas: 1, + numberOfUnhealthyReplicas: 0); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, expectedTotalFailedAddressesToOpenCount: 0, @@ -1106,6 +1121,13 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr manualResetEvent: manualResetEvent, shouldReset: true); + GatewayAddressCacheTests.ValidateHealthStatesInDiagnostics( + addressInfo: addressInfo, + numberOfConnectedReplicas: 0, + numberOfUnknownReplicas: 4, + numberOfUnhealthyPendingReplicas: 0, + numberOfUnhealthyReplicas: 0); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, expectedTotalFailedAddressesToOpenCount: 0, @@ -1157,6 +1179,13 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr expected: TransportAddressHealthState.HealthStatus.Unhealthy, actual: refreshedUri.GetCurrentHealthState().GetHealthStatus()); + GatewayAddressCacheTests.ValidateHealthStatesInDiagnostics( + addressInfo: addressInfo, + numberOfConnectedReplicas: 2, + numberOfUnknownReplicas: 1, + numberOfUnhealthyPendingReplicas: 1, + numberOfUnhealthyReplicas: 0); + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( fakeOpenConnectionHandler: fakeOpenConnectionHandler, expectedTotalFailedAddressesToOpenCount: 1, @@ -1356,6 +1385,41 @@ private static void AssertOpenConnectionHandlerAttributes( Assert.AreEqual(expectedTotalSuccessAddressesToOpenCount, fakeOpenConnectionHandler.GetTotalSuccessfulInvocationCount()); } + /// + /// Helper method to validate and assert on the cached health states for diagnostics. + /// + /// An instance of containing the partition address information. + /// An integer containing the number of connected replicas to be validated inthe cached health status list. + /// An integer containing the number of unknown replicas to be validated inthe cached health status list. + /// An integer containing the number of unhealthy pending replicas to be validated inthe cached health status list. + /// An integer containing the number of unhealthy replicas to be validated inthe cached health status list. + private static void ValidateHealthStatesInDiagnostics( + PartitionAddressInformation addressInfo, + int numberOfConnectedReplicas, + int numberOfUnknownReplicas, + int numberOfUnhealthyPendingReplicas, + int numberOfUnhealthyReplicas) + { + IReadOnlyList replicaHealthStatuses = addressInfo.Get(Protocol.Tcp)?.ReplicaTransportAddressUrisHealthState; + + Assert.IsNotNull(replicaHealthStatuses); + Assert.AreEqual( + expected: numberOfConnectedReplicas, + actual: replicaHealthStatuses.Where(x => x.Contains("| status: Connected |")).Count()); + + Assert.AreEqual( + expected: numberOfUnknownReplicas, + actual: replicaHealthStatuses.Where(x => x.Contains("| status: Unknown |")).Count()); + + Assert.AreEqual( + expected: numberOfUnhealthyPendingReplicas, + actual: replicaHealthStatuses.Where(x => x.Contains("| status: UnhealthyPending |")).Count()); + + Assert.AreEqual( + expected: numberOfUnhealthyReplicas, + actual: replicaHealthStatuses.Where(x => x.Contains("| status: Unhealthy |")).Count()); + } + private class FakeMessageHandler : HttpMessageHandler { private bool returnFullReplicaSet; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs index ad21070609..7c0cca1f95 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Tracing/TraceTests.cs @@ -125,8 +125,6 @@ public void ValidateStoreResultSerialization() storeResultProperties.Remove(nameof(storeResult.Target.Exception)); storeResultProperties.Add("transportRequestTimeline"); storeResultProperties.Remove(nameof(storeResult.Target.TransportRequestStats)); - storeResultProperties.Add("ReplicaHealthStatuses"); - storeResultProperties.Remove(nameof(storeResult.Target.ReplicaHealthStatuses)); foreach (string key in jsonPropertyNames) { From ea10439d2b3b1658b8dee97186b362d5b60ae537 Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Mon, 12 Jun 2023 10:54:00 -0700 Subject: [PATCH 138/164] Subpartitioning: Fixes handling of split physical partitions (#3879) * Initial Commit DO NOT REVIEW * bug fix, needs Direct Package Changes * fix for change feed and query plus tests * clean up * query + clean up --------- Co-authored-by: Kiran Kumar Kolli --- .../FeedRanges/FeedRangePartitionKey.cs | 11 +- .../Core/QueryPlan/QueryPartitionProvider.cs | 6 +- .../Routing/PartitionRoutingHelperTest.cs | 517 ++++++++++++++++++ 3 files changed, 527 insertions(+), 7 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/FeedRange/FeedRanges/FeedRangePartitionKey.cs b/Microsoft.Azure.Cosmos/src/FeedRange/FeedRanges/FeedRangePartitionKey.cs index 47f84fd280..1a04800b50 100644 --- a/Microsoft.Azure.Cosmos/src/FeedRange/FeedRanges/FeedRangePartitionKey.cs +++ b/Microsoft.Azure.Cosmos/src/FeedRange/FeedRanges/FeedRangePartitionKey.cs @@ -4,11 +4,13 @@ namespace Microsoft.Azure.Cosmos { + using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Tracing; + using Microsoft.Azure.Documents; /// /// FeedRange that represents an exact Partition Key value. @@ -31,8 +33,13 @@ public FeedRangePartitionKey(PartitionKey partitionKey) return Task.FromResult( new List> { - Documents.Routing.Range.GetPointRange( - this.PartitionKey.InternalKey.GetEffectivePartitionKeyString(partitionKeyDefinition)) + Documents.Routing.PartitionKeyInternal.GetEffectivePartitionKeyRange( + partitionKeyDefinition, + new Documents.Routing.Range( + min: this.PartitionKey.InternalKey, + max: this.PartitionKey.InternalKey, + isMinInclusive: true, + isMaxInclusive: true)) }); } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs index 6e7b0b4a8f..c62a65b27a 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryPlan/QueryPartitionProvider.cs @@ -147,11 +147,7 @@ internal PartitionedQueryExecutionInfo ConvertPartitionedQueryExecutionInfo( List> effectiveRanges = new List>(queryInfoInternal.QueryRanges.Count); foreach (Documents.Routing.Range internalRange in queryInfoInternal.QueryRanges) { - effectiveRanges.Add(new Documents.Routing.Range( - internalRange.Min.GetEffectivePartitionKeyString(partitionKeyDefinition, false), - internalRange.Max.GetEffectivePartitionKeyString(partitionKeyDefinition, false), - internalRange.IsMinInclusive, - internalRange.IsMaxInclusive)); + effectiveRanges.Add(PartitionKeyInternal.GetEffectivePartitionKeyRange(partitionKeyDefinition, internalRange)); } effectiveRanges.Sort(Documents.Routing.Range.MinComparer.Instance); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs index 35ffaa65bb..792621f54a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Routing/PartitionRoutingHelperTest.cs @@ -19,6 +19,8 @@ namespace Microsoft.Azure.Cosmos.Tests.Routing using Microsoft.Azure.Cosmos.Query.Core.QueryPlan; using System.Collections.ObjectModel; using System.Net; + using Microsoft.Azure.Cosmos.Query.Core; + using Microsoft.Azure.Cosmos.Query.Core.Monads; /// /// Tests for class. @@ -246,6 +248,521 @@ public async Task TestGetPartitionRoutingInfo() } } } + [TestMethod] + public async Task TestRoutingForPrefixedPartitionKeyQueriesAsync() + { + PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition() + { + Kind = PartitionKind.MultiHash, + Paths = new Collection() { "/path1", "/path2", "/path3" }, + Version = PartitionKeyDefinitionVersion.V2 + }; + + // Case 1: Query with 1 prefix path, split at 1st level. Should route to only one partition. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F856" //Seattle + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F856", //Seattle + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"Microsoft\"", + epkRanges => + { + return epkRanges.Count == 1; //Routes to only one pkRange. + }, + partitionKeyRanges); + } + + //Case 2: Query with 1 prefix path value which is split at 2nd level. Should route to two partitions. + //Case 3: Query with 2 prefix path values which is split at 2nd level. Should route to one partition. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963" //[Seattle, Redmond] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963",//[Seattle, Redmond] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\" or (r.path1 = \"seattle\" and r.path2 = \"bellevue\")", + epkRanges => + { + return epkRanges.Count == 2; //Since data is split at pkey [seattle, redmond], it should route to two pkRange. + }, + partitionKeyRanges); + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\" and r.path2 =\"redmond\"", + epkRanges => + { + return epkRanges.Count == 1; //Since data is split at pkey [seattle, redmond], this query should route to one pkRange + }, + partitionKeyRanges); + } + + //Case 4: Query with 2 prefix path values split at the 3rd level. Should route to 2 paritions. + //Case 5: Query with 1 prefix path value split at 3rd level. Should route to 2 partitions. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8"//[seattle, redmond, 5.12312419050912359123] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8",//[seattle, redmond, 5.12312419050912359123] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\" and r.path2 =\"redmond\"", + epkRanges => + { + return epkRanges.Count == 2; //Since data is split at pkey [seattle, redmond, 5.12312419050912359123], it should route to two pkRange. + }, + partitionKeyRanges); + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\" and r.path2 =\"redmond\" and r.path3=5.12312419050912359123", + epkRanges => + { + return epkRanges.Count == 1; + }, + partitionKeyRanges); + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\"", + epkRanges => + { + return epkRanges.Count == 2; + }, + partitionKeyRanges); + } + + //Case 6: Query with 1 prefix path value split succesively at 2nd and then at the 3rd level. Should route to 3 partitions. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963"//[seattle, redmond] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963",//[seattle, redmond] + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8"//[seattle, redmond, 5.12312419050912359123] + }, + new PartitionKeyRange() + { + Id = "2", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8",//[seattle, redmond, 5.12312419050912359123] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\"", + epkRanges => + { + return epkRanges.Count == 3; + }, + partitionKeyRanges); + } + + //Case 7: Query with 1 prefix path value split succesively at 1st, 2nd and then at the 3rd level. Should route to 3 partitions. + //Case 8: Query with 2 prefix path value split succesively at 1st, 2nd and then at the 3rd level. Should route to 2 partitions. + //Case 9: Query with fully specfied pkey, split succesively at 1st, 2nd and then at the 3rd level. Should route to 1 partitions. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F856" //[seattle] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F856", //[seattle] + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963" //[seattle, redmond] + }, + new PartitionKeyRange() + { + Id = "2", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963", //[seattle, redmond] + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8"//[seattle, redmond, 5.12312419050912359123] + }, + new PartitionKeyRange() + { + Id = "3", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8",//[seattle, redmond, 5.12312419050912359123] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\"", + epkRanges => + { + return epkRanges.Count == 3; //Routes tp three pkRanges + }, + partitionKeyRanges); + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\" and r.path2 = \"redmond\"", + epkRanges => + { + return epkRanges.Count == 2; //Routes to two pkRanges. + }, + partitionKeyRanges); + await PrefixPartitionKeyTestRunnerAsync( + partitionKeyDefinition, + $"SELECT VALUE r.id from r where r.path1 = \"seattle\" and r.path2 = \"redmond\" and r.path3 = \"98052\"", + epkRanges => + { + Assert.AreEqual(epkRanges.Count, 1); + + return epkRanges.Count == 1; //Routes to only one pkRanges. + }, + partitionKeyRanges); + } + } + + [TestMethod] + public async Task TestRoutingForPrefixedPartitionKeyChangeFeedAsync() + { + PartitionKeyDefinition partitionKeyDefinition = new PartitionKeyDefinition() + { + Kind = PartitionKind.MultiHash, + Paths = new Collection() { "/path1", "/path2", "/path3" }, + Version = PartitionKeyDefinitionVersion.V2 + }; + + // Case 1: ChangeFeed with 1 prefix path, split at 1st level. Should route to only one partition. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F856" //Seattle + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F856", //Seattle + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("Microsoft").Build(), + epkRanges => + { + return epkRanges.Count == 1; //Routes to only one pkRange. + }, + partitionKeyRanges); + } + + //Case 2: ChangeFeed with 1 prefix path value which is split at 2nd level. Should route to two partitions. + //Case 3: ChangeFeed with 2 prefix path values which is split at 2nd level. Should route to one partition. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963" //[Seattle, Redmond] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963", //[Seattle, Redmond] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Build(), + epkRanges => + { + return epkRanges.Count == 2; //Since data is split at pkey [seattle, redmond], it should route to two pkRange. + }, + partitionKeyRanges); + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Add("redmond").Build(), + epkRanges => + { + return epkRanges.Count == 1; //Since data is split at pkey [seattle, redmond], this query should route to one pkRange + }, + partitionKeyRanges); + } + + //Case 4: ChangeFeed with 2 prefix path values split at the 3rd level. Should route to 2 paritions. + //Case 5: ChangeFeed with 1 prefix path value split at 3rd level. Should route to 2 partitions. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8"//[seattle, redmond, 5.12312419050912359123] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8", //[seattle, redmond, 5.12312419050912359123] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Add("redmond").Build(), + epkRanges => + { + return epkRanges.Count == 2; //Since data is split at pkey [seattle, redmond, 5.12312419050912359123], it should route to two pkRange. + }, + partitionKeyRanges); + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Add("redmond").Add(5.12312419050912359123).Build(), + epkRanges => + { + return epkRanges.Count == 1; + }, + partitionKeyRanges); + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Build(), + epkRanges => + { + return epkRanges.Count == 2; + }, + partitionKeyRanges); + } + + //Case 6: ChangeFeed with 1 prefix path value split succesively at 2nd and then at the 3rd level. Should route to 3 partitions. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963" //[seattle, redmond] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963", //[seattle, redmond] + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8" //[seattle, redmond, 5.12312419050912359123] + }, + new PartitionKeyRange() + { + Id = "2", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8", //[seattle, redmond, 5.12312419050912359123] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Build(), + epkRanges => + { + return epkRanges.Count == 3; + }, + partitionKeyRanges); + } + + //Case 7: ChangeFeed with 1 prefix path value split succesively at 1st, 2nd and then at the 3rd level. Should route to 3 partitions. + //Case 8: ChangeFeed with 2 prefix path value split succesively at 1st, 2nd and then at the 3rd level. Should route to 2 partitions. + //Case 9: ChangeFeed with fully specfied pkey, split succesively at 1st, 2nd and then at the 3rd level. Should route to 1 partitions. + { + List partitionKeyRanges = new List() + { + new PartitionKeyRange() + { + Id = "0", + MinInclusive = string.Empty, + MaxExclusive = "07E4D14180A45153F00B44907886F856" //[seattle] + }, + new PartitionKeyRange() + { + Id = "1", + MinInclusive = "07E4D14180A45153F00B44907886F856", //[seattle] + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963" //[seattle, redmond] + }, + new PartitionKeyRange() + { + Id = "2", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A5963", //[seattle, redmond] + MaxExclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8"//[seattle, redmond, 5.12312419050912359123] + }, + new PartitionKeyRange() + { + Id = "3", + MinInclusive = "07E4D14180A45153F00B44907886F85622E342F38A486A088463DFF7838A59630EF2E2D82460884AF0F6440BE4F726A8", //[seattle, redmond, 5.12312419050912359123] + MaxExclusive = "FF" + }, + }; + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Build(), + epkRanges => + { + return epkRanges.Count == 3; //Routes tp three pkRanges + }, + partitionKeyRanges); + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Add("redmond").Build(), + epkRanges => + { + return epkRanges.Count == 2; //Routes to two pkRanges. + }, + partitionKeyRanges); + await PrefixPartitionKeyChangeFeedTestRunnerAsync( + partitionKeyDefinition, + new PartitionKeyBuilder().Add("seattle").Add("redmond").Add("98052").Build(), + epkRanges => + { + Assert.AreEqual(epkRanges.Count, 1); + + return epkRanges.Count == 1; //Routes to only one pkRanges. + }, + partitionKeyRanges); + } + } + + private static async Task PrefixPartitionKeyTestRunnerAsync( + PartitionKeyDefinition partitionKeyDefinition, + string queryText, + Predicate> validator, + List partitionKeyRanges) + { + IDictionary DefaultQueryengineConfiguration = new Dictionary() + { + {"maxSqlQueryInputLength", 30720}, + {"maxJoinsPerSqlQuery", 5}, + {"maxLogicalAndPerSqlQuery", 200}, + {"maxLogicalOrPerSqlQuery", 200}, + {"maxUdfRefPerSqlQuery", 2}, + {"maxInExpressionItemsCount", 8000}, + {"queryMaxInMemorySortDocumentCount", 500}, + {"maxQueryRequestTimeoutFraction", 0.90}, + {"sqlAllowNonFiniteNumbers", false}, + {"sqlAllowAggregateFunctions", true}, + {"sqlAllowSubQuery", true}, + {"sqlAllowScalarSubQuery", false}, + {"allowNewKeywords", true}, + {"sqlAllowLike", true}, + {"sqlAllowGroupByClause", false}, + {"queryEnableMongoNativeRegex", true}, + {"maxSpatialQueryCells", 12}, + {"spatialMaxGeometryPointCount", 256}, + {"sqlDisableOptimizationFlags", 0}, + {"sqlEnableParameterExpansionCheck", true} + }; + + QueryPartitionProvider QueryPartitionProvider = new QueryPartitionProvider(DefaultQueryengineConfiguration); + + IEnumerable> rangesAndServiceIdentity = partitionKeyRanges + .Select(range => Tuple.Create(range, (ServiceIdentity)null)); + string collectionRid = string.Empty; + CollectionRoutingMap routingMap = + CollectionRoutingMap.TryCreateCompleteRoutingMap( + rangesAndServiceIdentity, + collectionRid); + + RoutingMapProvider routingMapProvider = new RoutingMapProvider(routingMap); + TryCatch tryGetQueryPlan = + QueryPartitionProvider.TryGetPartitionedQueryExecutionInfo( + querySpecJsonString: JsonConvert.SerializeObject(new SqlQuerySpec(queryText)), + partitionKeyDefinition: partitionKeyDefinition, + requireFormattableOrderByQuery: true, + isContinuationExpected: true, + allowNonValueAggregateQuery: false, + hasLogicalPartitionKey: false, + allowDCount: true, + useSystemPrefix: false, + geospatialType: Cosmos.GeospatialType.Geography); + + HashSet resolvedPKRanges = new HashSet(); + foreach (Range range in tryGetQueryPlan.Result.QueryRanges) + { + resolvedPKRanges.UnionWith(await routingMapProvider.TryGetOverlappingRangesAsync( + collectionRid, + range, + NoOpTrace.Singleton)); + } + + Assert.IsTrue(validator(resolvedPKRanges)); + } + + private static async Task PrefixPartitionKeyChangeFeedTestRunnerAsync( + PartitionKeyDefinition partitionKeyDefinition, + Cosmos.PartitionKey partitionKey, + Predicate> validator, + List partitionKeyRanges) + { + IEnumerable> rangesAndServiceIdentity = partitionKeyRanges + .Select(range => Tuple.Create(range, (ServiceIdentity)null)); + string collectionRid = string.Empty; + CollectionRoutingMap routingMap = + CollectionRoutingMap.TryCreateCompleteRoutingMap( + rangesAndServiceIdentity, + collectionRid); + + RoutingMapProvider routingMapProvider = new RoutingMapProvider(routingMap); + + HashSet resolvedPKRanges = new HashSet(); + FeedRangePartitionKey feedRangePartitionKey = new FeedRangePartitionKey(partitionKey); + List> effectiveRanges = await feedRangePartitionKey.GetEffectiveRangesAsync(routingMapProvider, null, partitionKeyDefinition, null); + foreach (Range range in effectiveRanges) + { + resolvedPKRanges.UnionWith(await routingMapProvider.TryGetOverlappingRangesAsync( + collectionRid, + range, + NoOpTrace.Singleton)); + + } + + Assert.IsTrue(validator(resolvedPKRanges)); + } [TestMethod] public void TestCrossPartitionAggregateQueries() From 8137c7758eac966e75df7ea3aa8109c7170c5dba Mon Sep 17 00:00:00 2001 From: Maya-Painter <130110800+Maya-Painter@users.noreply.github.com> Date: Tue, 13 Jun 2023 18:26:55 -0700 Subject: [PATCH 139/164] [Query] Fixes empty property name parsing exception (#3907) * inital commit * cleanup * test cleanup * PR comments * PR comment --- .../CosmosQueryExecutionContextFactory.cs | 4 +-- .../Core/QueryClient/CosmosQueryClient.cs | 2 +- .../Query/v3Query/CosmosQueryClientCore.cs | 2 +- .../src/SqlObjects/SqlPropertyName.cs | 7 +---- .../CosmosGatewayTimeoutTests.cs | 2 +- .../Query/BypassQueryParsingTests.cs | 28 ++++++++++++++++--- .../Query/MockCosmosQueryClient.cs | 2 +- ...misticDirectExecutionQueryBaselineTests.cs | 2 +- 8 files changed, 32 insertions(+), 17 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs index 8f35ff821a..47aa1c4490 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs @@ -188,7 +188,7 @@ private static async Task> TryCreateCoreContextAsy // If the query would go to gateway, but we have a partition key, // then try seeing if we can execute as a passthrough using client side only logic. // This is to short circuit the need to go to the gateway to get the query plan. - if (cosmosQueryContext.QueryClient.ByPassQueryParsing() + if (cosmosQueryContext.QueryClient.BypassQueryParsing() && inputParameters.PartitionKey.HasValue) { bool parsed; @@ -586,7 +586,7 @@ private static async Task GetPartitionedQueryExec CancellationToken cancellationToken) { PartitionedQueryExecutionInfo partitionedQueryExecutionInfo; - if (cosmosQueryContext.QueryClient.ByPassQueryParsing()) + if (cosmosQueryContext.QueryClient.BypassQueryParsing()) { // For non-Windows platforms(like Linux and OSX) in .NET Core SDK, we cannot use ServiceInterop, so need to bypass in that case. // We are also now bypassing this for 32 bit host process running even on Windows as there are many 32 bit apps that will not work without this diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs index ac093cadce..3fa4cb90e7 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/QueryClient/CosmosQueryClient.cs @@ -98,7 +98,7 @@ public abstract Task ExecuteQueryPlanRequestAsync bool forceRefresh, ITrace trace); - public abstract bool ByPassQueryParsing(); + public abstract bool BypassQueryParsing(); public abstract Task ForceRefreshCollectionCacheAsync( string collectionLink, diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs index daf47e151c..1c5a9ef21f 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs @@ -285,7 +285,7 @@ public override async Task> GetTargetPartitionKeyRangesA } } - public override bool ByPassQueryParsing() + public override bool BypassQueryParsing() { return CustomTypeExtensions.ByPassQueryParsing(); } diff --git a/Microsoft.Azure.Cosmos/src/SqlObjects/SqlPropertyName.cs b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlPropertyName.cs index 059e799d99..e7f859ff18 100644 --- a/Microsoft.Azure.Cosmos/src/SqlObjects/SqlPropertyName.cs +++ b/Microsoft.Azure.Cosmos/src/SqlObjects/SqlPropertyName.cs @@ -68,12 +68,7 @@ sealed class SqlPropertyName : SqlObject private SqlPropertyName(string value) { - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException($"{nameof(value)} must not be null, empty, or whitespace."); - } - - this.Value = value; + this.Value = value ?? throw new ArgumentNullException(nameof(value)); } public string Value { get; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs index 8b4728c122..f50319f65f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs @@ -163,7 +163,7 @@ public DisableServiceInterop( { } - public override bool ByPassQueryParsing() + public override bool BypassQueryParsing() { return true; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs index a0c821c72d..4db276f4ce 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/BypassQueryParsingTests.cs @@ -1,5 +1,6 @@ namespace Microsoft.Azure.Cosmos.EmulatorTests.Query { + using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -14,9 +15,28 @@ public sealed class BypassQueryParsingTests : QueryTestsBase public async Task TestBypassQueryParsingWithNonePartitionKey() { int documentCount = 400; - QueryRequestOptions feedOptions = new QueryRequestOptions { PartitionKey = PartitionKey.None }; + string query = "SELECT VALUE r.numberField FROM r"; - IReadOnlyList expected = Enumerable.Range(0, documentCount).ToList(); + IReadOnlyList expectedOutput = Enumerable.Range(0, documentCount).Select(i => i.ToString()).ToList(); + + await this.ValidateQueryBypassWithNonePartitionKey(documentCount, query, expectedOutput); + } + + [TestMethod] + [TestCategory("Query")] + public async Task TestBypassQueryParsingWithNonePartitionKeyEmptyPropertyName() + { + int documentCount = 400; + + string query = @"SELECT VALUE { """" : r.numberField } FROM r"; + IReadOnlyList expectedOutput = Enumerable.Range(0, documentCount).Select(i => String.Format("{{\"\":{0}}}", i)).ToList(); + + await this.ValidateQueryBypassWithNonePartitionKey(documentCount, query, expectedOutput); + } + + private async Task ValidateQueryBypassWithNonePartitionKey(int documentCount, string query, IReadOnlyList expectedOutput) + { + QueryRequestOptions feedOptions = new QueryRequestOptions { PartitionKey = PartitionKey.None }; async Task ImplementationAsync(Container container, IReadOnlyList documents) { @@ -34,9 +54,9 @@ async Task ImplementationAsync(Container container, IReadOnlyList cosmosQueryClientCore); List items = await RunQueryAsync(containerWithBypassParsing, query, feedOptions); - int[] actual = items.Cast().Select(x => (int)Number64.ToLong(x.Value)).ToArray(); + string[] actualOutput = items.Select(x => x.ToString()).ToArray(); - Assert.IsTrue(expected.SequenceEqual(actual)); + Assert.IsTrue(expectedOutput.SequenceEqual(actualOutput)); } IReadOnlyList documents = CreateDocuments(documentCount); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs index 11d51403b1..6dd861ec88 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/MockCosmosQueryClient.cs @@ -35,7 +35,7 @@ public MockCosmosQueryClient( public int QueryPlanCalls { get; private set; } - public override bool ByPassQueryParsing() + public override bool BypassQueryParsing() { return this.forceQueryPlanGatewayElseServiceInterop; } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index fad65e80db..1e7d4e1e40 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -927,7 +927,7 @@ internal class TestCosmosQueryClient : CosmosQueryClient { public override Action OnExecuteScalarQueryCallback => throw new NotImplementedException(); - public override bool ByPassQueryParsing() + public override bool BypassQueryParsing() { return false; } From b200491ec789e81443990069cf2164a3e5e47ef8 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Wed, 14 Jun 2023 11:54:09 -0700 Subject: [PATCH 140/164] [Preview] Query: Refactors EnableOptimisticDirectExecution to true by default in Preview mode (#3909) * Setting EnableODE to true by default in Preview Mode. * Added seperate if block for default value * Updated property * Removed unused Usings * Updated contracts * Updated test * Updated directive indentation --- .../src/RequestOptions/QueryRequestOptions.cs | 10 +++- .../TraceWriterBaselineTests.TraceData.xml | 10 ++-- .../Contracts/DotNetPreviewSDKAPI.json | 53 ++++++++++++++++++- .../Contracts/DotNetSDKAPI.json | 38 ------------- ...misticDirectExecutionQueryBaselineTests.cs | 11 ++-- 5 files changed, 74 insertions(+), 48 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index 4cca513013..60cea5b48c 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -49,7 +49,15 @@ public class QueryRequestOptions : RequestOptions /// /// Direct (optimistic) execution offers improved performance for several kinds of queries such as a single partition streaming query. /// - public bool EnableOptimisticDirectExecution { get; set; } +#if PREVIEW + public +#else + internal +#endif + bool EnableOptimisticDirectExecution { get; set; } +#if PREVIEW + = true; +#endif /// /// Gets or sets the maximum number of items that can be buffered client side during diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml index 885699cb43..d1dee72a0f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/TraceWriterBaselineTests.TraceData.xml @@ -341,10 +341,10 @@ "RetryAfterInMs": "9000", "BELatencyInMs": "4.2", "ReplicaHealthStatuses": [ - "http://storephysicaladdress-1p.com:Connected", - "http://storephysicaladdress-2s.com:Unknown", - "http://storephysicaladdress-3s.com:Unhealthy", - "http://storephysicaladdress-4s.com:Unknown" + "http://storephysicaladdress-1p.com:Connected", + "http://storephysicaladdress-2s.com:Unknown", + "http://storephysicaladdress-3s.com:Unhealthy", + "http://storephysicaladdress-4s.com:Unknown" ], "transportRequestTimeline": { "requestTimeline": [ @@ -535,7 +535,7 @@ "RequestCharge": 0, "RetryAfterInMs": null, "BELatencyInMs": null, - "ReplicaHealthStatuses":[], + "ReplicaHealthStatuses": [], "transportRequestTimeline": null, "TransportException": null } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json index de49584da2..8546a93b2f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetPreviewSDKAPI.json @@ -496,8 +496,59 @@ }, "NestedTypes": {} }, - "Microsoft.Azure.Cosmos.RequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, + "Members": { + "Boolean EnableOptimisticDirectExecution": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + }, + "Microsoft.Azure.Cosmos.RequestOptions;System.Object;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": { + "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { + "Subclasses": {}, + "Members": { + "Boolean EnableOptimisticDirectExecution": { + "Type": "Property", + "Attributes": [], + "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + }, + "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { + "Type": "Method", + "Attributes": [ + "CompilerGeneratedAttribute" + ], + "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" + } + }, + "NestedTypes": {} + } + }, "Members": { "System.Nullable`1[Microsoft.Azure.Cosmos.PriorityLevel] get_PriorityLevel()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index 8a3bc7b462..e5b95a7ed9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -6279,18 +6279,6 @@ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { - "Boolean EnableOptimisticDirectExecution": { - "Type": "Property", - "Attributes": [], - "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": { "Type": "Property", "Attributes": [], @@ -6445,13 +6433,6 @@ ], "MethodInfo": "Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, - "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, "Void set_EnableScanInQuery(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ @@ -7320,18 +7301,6 @@ "Microsoft.Azure.Cosmos.QueryRequestOptions;Microsoft.Azure.Cosmos.RequestOptions;IsAbstract:False;IsSealed:False;IsInterface:False;IsEnum:False;IsClass:True;IsValueType:False;IsNested:False;IsGenericType:False;IsSerializable:False": { "Subclasses": {}, "Members": { - "Boolean EnableOptimisticDirectExecution": { - "Type": "Property", - "Attributes": [], - "MethodInfo": "Boolean EnableOptimisticDirectExecution;CanRead:True;CanWrite:True;Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, - "Boolean get_EnableOptimisticDirectExecution()[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Boolean get_EnableOptimisticDirectExecution();IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, "Microsoft.Azure.Cosmos.DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions": { "Type": "Property", "Attributes": [], @@ -7486,13 +7455,6 @@ ], "MethodInfo": "Void set_EnableLowPrecisionOrderBy(System.Nullable`1[System.Boolean]);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" }, - "Void set_EnableOptimisticDirectExecution(Boolean)[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { - "Type": "Method", - "Attributes": [ - "CompilerGeneratedAttribute" - ], - "MethodInfo": "Void set_EnableOptimisticDirectExecution(Boolean);IsAbstract:False;IsStatic:False;IsVirtual:False;IsGenericMethod:False;IsConstructor:False;IsFinal:False;" - }, "Void set_EnableScanInQuery(System.Nullable`1[System.Boolean])[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]": { "Type": "Method", "Attributes": [ diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs index 1e7d4e1e40..81c765adc4 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/OptimisticDirectExecutionQueryBaselineTests.cs @@ -144,10 +144,15 @@ public void NegativeOptimisticDirectExecutionOutput() [TestMethod] public async Task TestDefaultQueryRequestOptionsSettings() { - QueryRequestOptions requestOptions = new QueryRequestOptions(); - - Assert.AreEqual(requestOptions.EnableOptimisticDirectExecution, false); + bool odeExpectedValue = +#if PREVIEW + true; +#else + false; +#endif + + Assert.AreEqual(odeExpectedValue, requestOptions.EnableOptimisticDirectExecution); } // test checks that the pipeline can take a query to the backend and returns its associated document(s). From 8684535d233ea6a7147d857fae9a6c69e467c827 Mon Sep 17 00:00:00 2001 From: Rinat Minibaev <132935507+rinatmini@users.noreply.github.com> Date: Thu, 15 Jun 2023 07:53:21 -0700 Subject: [PATCH 141/164] Documentations: Adds links to PatchItems docs (#3910) * Added links to PatchItems docs * Undo changes from internal file --- Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs b/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs index 106262a13f..2978d741bf 100644 --- a/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs +++ b/Microsoft.Azure.Cosmos/src/Resource/Container/Container.cs @@ -751,6 +751,7 @@ public abstract Task> ReadManyItemsAsync( /// ]]> /// /// + /// Supported partial document update modes public abstract Task> PatchItemAsync( string id, PartitionKey partitionKey, @@ -783,6 +784,7 @@ public abstract Task> PatchItemAsync( /// /// /// + /// Supported partial document update modes public abstract Task PatchItemStreamAsync( string id, PartitionKey partitionKey, From 69702227d91de27a8257683d4984a750057406c5 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:29:42 -0700 Subject: [PATCH 142/164] [Internal] Direct Package Upgrade: Refactors Code to Bump Up `Cosmos.Direct` Package to `3.31.2` (#3918) * Code changes to bump up the direct version. * Code changes to mark the Israel Central region as public. * Code changes to update contracts. * Code changes to fix test failure. Some clean ups. * Code changes to add detailed message for open channels count. --- Directory.Build.props | 2 +- Microsoft.Azure.Cosmos/src/Regions.cs | 5 +++++ .../ClientCreateAndInitializeTest.cs | 10 +++++++--- .../Contracts/DotNetSDKAPI.json | 5 +++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index c8b86ceed2..6e15dbd850 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.34.0 3.34.0 preview - 3.31.1 + 3.31.2 2.0.2 2.0.2 preview diff --git a/Microsoft.Azure.Cosmos/src/Regions.cs b/Microsoft.Azure.Cosmos/src/Regions.cs index 666ec0435b..33c258aaf7 100644 --- a/Microsoft.Azure.Cosmos/src/Regions.cs +++ b/Microsoft.Azure.Cosmos/src/Regions.cs @@ -359,5 +359,10 @@ public static class Regions /// Name of the Azure Italy North region in the Azure Cosmos DB service. /// public const string ItalyNorth = "Italy North"; + + /// + /// Name of the Azure Israel Central region in the Azure Cosmos DB service. + /// + public const string IsraelCentral = "Israel Central"; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs index e977a8b459..e07fe85a7e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/ClientCreateAndInitializeTest.cs @@ -205,7 +205,7 @@ public async Task InitializeContainersAsync_WhenThrowsException_ShouldDisposeCos public async Task CreateAndInitializeAsync_WithValidDatabaseAndContainer_ShouldOpenRntbdConnectionsToBackendReplicas() { // Arrange. - int httpCallsMade = 0; + int httpCallsMade = 0, maxRequestsPerConnection = 6; HttpClientHandlerHelper httpClientHandlerHelper = new () { RequestCallBack = (request, cancellationToken) => @@ -227,6 +227,7 @@ public async Task CreateAndInitializeAsync_WithValidDatabaseAndContainer_ShouldO { HttpClientFactory = () => new HttpClient(httpClientHandlerHelper), ConnectionMode = ConnectionMode.Direct, + MaxRequestsPerTcpConnection = maxRequestsPerConnection, }; // Act. @@ -275,8 +276,11 @@ public async Task CreateAndInitializeAsync_WithValidDatabaseAndContainer_ShouldO .GetValue(loadBalancingPartition); Assert.IsNotNull(openChannels); - Assert.AreEqual(30, channelCapacity); - Assert.AreEqual(1, openChannels.Count); + Assert.AreEqual(48, openChannels.Count, "Here the expected value 48 rather explains how many time we call the" + + "LoadBalancingPartition.OpenChannelAsync(). The emulator by default returns 12 partitions, and each partition has 4 replicas," + + "and by behavior the emulator uses the same URI for eac of these replica, hence 12 * 4 = 48 times we call the OpenChannelAsync()." + + "In ideal world, the value should be 1, because for each unique URI, the OpenChannelAsync() call will just be 1."); + Assert.AreEqual(openChannels.Count * maxRequestsPerConnection, channelCapacity); Documents.Rntbd.LbChannelState channelState = openChannels.First(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index e5b95a7ed9..7fde376d49 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -6680,6 +6680,11 @@ "Attributes": [], "MethodInfo": "System.String GermanyWestCentral;IsInitOnly:False;IsStatic:True;" }, + "System.String IsraelCentral": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "System.String IsraelCentral;IsInitOnly:False;IsStatic:True;" + }, "System.String ItalyNorth": { "Type": "Field", "Attributes": [], From b97906191c98f80e0dc9cba85545dc163b7df9dc Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Mon, 19 Jun 2023 14:34:32 -0400 Subject: [PATCH 143/164] SDK 3.35.0 : Adds version bump and changelog (#3920) * release PR * updated changelog.md * more changelog updates --- Directory.Build.props | 4 +- .../contracts/API_3.35.0-preview.txt | 1563 +++++++++++++++++ .../contracts/API_3.35.0.txt | 1502 ++++++++++++++++ changelog.md | 27 + 4 files changed, 3094 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.35.0-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.35.0.txt diff --git a/Directory.Build.props b/Directory.Build.props index 6e15dbd850..eb4940bf4b 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.34.0 - 3.34.0 + 3.35.0 + 3.35.0 preview 3.31.2 2.0.2 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.35.0-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.35.0-preview.txt new file mode 100644 index 0000000000..6c989053fd --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.35.0-preview.txt @@ -0,0 +1,1563 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public sealed class ComputedProperty + { + public ComputedProperty(); + public string Name { get; set; } + public string Query { get; set; } + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public Collection ComputedProperties { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable BypassIntegratedCache { get; set; } + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public enum PriorityLevel + { + High = 1, + Low = 2, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public bool EnableOptimisticDirectExecution { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string IsraelCentral = "Israel Central"; + public const string ItalyNorth = "Italy North"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string MalaysiaSouth = "Malaysia South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public Nullable PriorityLevel { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ComputedPropertiesDefinition + { + public T Attach(); + public ComputedPropertiesDefinition WithComputedProperty(string name, string query); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public ComputedPropertiesDefinition WithComputedProperties(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.35.0.txt b/Microsoft.Azure.Cosmos/contracts/API_3.35.0.txt new file mode 100644 index 0000000000..c0dc3e280f --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.35.0.txt @@ -0,0 +1,1502 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string IsraelCentral = "Israel Central"; + public const string ItalyNorth = "Italy North"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string MalaysiaSouth = "Malaysia South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index b1b3139828..01e3703c89 100644 --- a/changelog.md +++ b/changelog.md @@ -12,6 +12,33 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [3.35.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.0-preview) - 2023-06-19 + +### Added +- [3836](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3836) Integrated cache: Adds BypassIntegratedCache to DedicatedGatewayRequestOptions +- [3909](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3909) Query: Adds EnableOptimisticDirectExecution in QueryRequestOptions enabled by default + +### [3.35.0](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.0) - 2023-06-19 + +#### Fixed +- [3864](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3864) NugetPackage: Removes ThirdPartyNotice.txt from content and contentFiles folders +- [3866](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3866) CosmosClient: Fixes missing Trace when converting HTTP Timeout to 503 +- [3879](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3879) Subpartitioning: Fixes handling of split physical partitions +- [3907](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3907) Query: Fixes empty property name parsing exception + +#### Added +- [3860](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3860) Documentation: Adds see also link to Container.CreateTransactionalBatch +- [3852](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3852) Query: Adds type-markers with count and length for large arrays +- [3838](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3838) Benchmarking: Adds use of ARM Templates for benchmarking +- [3877](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3877) Regions: Adds Malaysia South, Isreal Central, and Italy North +- [3877](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3877) Distributed Tracing: Enables Distributing Tracing for Operations +- [3874](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3874) Client Encryption: Adds Microsoft.Azure.Cosmos compatibility to version 3.34.0 +- [3891](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3891) Documentation: Adds additional remarks to CosmosClient +- [3902](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3902) ConnectionPolicy: Refactors Code to Reduce Default Request Timeout to 6 Seconds +- [3910](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3910) Documentations: Adds links to PatchItems docs +- [3918](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3918) Regions: Adds Israel Central +- [3918](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3918) CosmosClient: Fixes SynchronizationLockException when disposing client with requests in-flight. + ### [3.34.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.34.0-preview) - 2023-05-17 ### Added From b1d313452cdb4318b9239fe9b39668667f6cf034 Mon Sep 17 00:00:00 2001 From: Nalu Tripician <27316859+NaluTripician@users.noreply.github.com> Date: Mon, 19 Jun 2023 15:35:53 -0400 Subject: [PATCH 144/164] [Internal] Last minute fix to changelog for 3.35.0 (#3921) * release PR * updated changelog.md * more changelog updates * changelog fix * Update changelog.md * Update changelog.md --- changelog.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index 01e3703c89..bd5c29c32c 100644 --- a/changelog.md +++ b/changelog.md @@ -31,7 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [3852](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3852) Query: Adds type-markers with count and length for large arrays - [3838](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3838) Benchmarking: Adds use of ARM Templates for benchmarking - [3877](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3877) Regions: Adds Malaysia South, Isreal Central, and Italy North -- [3877](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3877) Distributed Tracing: Enables Distributing Tracing for Operations +- [3887](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3887) Distributed Tracing: Setting DisplayName for an operation level activity as `` - [3874](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3874) Client Encryption: Adds Microsoft.Azure.Cosmos compatibility to version 3.34.0 - [3891](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3891) Documentation: Adds additional remarks to CosmosClient - [3902](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3902) ConnectionPolicy: Refactors Code to Reduce Default Request Timeout to 6 Seconds From 92319a0528b5e257da71dd6ec0c8bc50375d05c3 Mon Sep 17 00:00:00 2001 From: Maya-Painter <130110800+Maya-Painter@users.noreply.github.com> Date: Thu, 22 Jun 2023 15:19:55 -0700 Subject: [PATCH 145/164] [Internal] Query: Adds new header SupportedSerializationFormats (#3911) * Binary Serilaization Response test * Added new header SupportedSerializationFormats * Modified existing use of CosmosSerializationFormatOptions * Modified tests and removed unused code * Addressed comments * Added more negative cases * Revert changes * Added spaces * Addressed comments * Addressed comments * Removed SupportedSerializationFormats from Headers file * Removed unused JsonSerilazationFormats option * Addressed comments * Addressed comments * Addressed comments * Addressed comments * Added new enum TransportSerializationFormat * Added new enum TransportSerializationFormat * Addressed comments * Removed unused parameter * Addressed comments * updating API * remove tests * Text fixes * fix typo * remove TransportSerializationFormat header * text reverts * revert * test update * PR comments * remove test owner headers HeadersValidationTests.cs * PR comments - remove unsupported tests and scope client --------- Co-authored-by: Heet Co-authored-by: neildsh <35383880+neildsh@users.noreply.github.com> Co-authored-by: Matias Quaranta --- .../Pagination/ChangeFeedPaginationOptions.cs | 5 +- Microsoft.Azure.Cosmos/src/FeedOptions.cs | 37 ++-- .../Headers/CosmosMessageHeadersInternal.cs | 6 + .../src/Headers/StoreRequestHeaders.cs | 6 + .../NetworkAttachedDocumentContainer.cs | 5 - .../src/Pagination/PaginationOptions.cs | 4 - .../Pagination/QueryPaginationOptions.cs | 3 +- .../DocumentQueryExecutionContextBase.cs | 30 +-- .../Query/v3Query/CosmosQueryClientCore.cs | 24 +-- .../Pagination/ReadFeedPaginationOptions.cs | 3 +- .../ReadFeedCrossFeedRangeAsyncEnumerator.cs | 3 +- .../src/RequestOptions/QueryRequestOptions.cs | 11 +- .../CosmosSerializationFormatOptions.cs | 2 +- .../HeadersValidationTests.cs | 192 +++++++++++++++++- .../SupportedSerializationFormatsTest.cs | 102 ++++++++++ .../ContentSerializationPerformanceTests.cs | 4 - .../BinaryEncodingOverTheWireTests.cs | 42 ++-- .../OrderByQueryResultTests.cs | 6 +- .../Query/FeedOptionTests.cs | 25 +++ 19 files changed, 383 insertions(+), 127 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SupportedSerializationFormatsTest.cs diff --git a/Microsoft.Azure.Cosmos/src/ChangeFeed/Pagination/ChangeFeedPaginationOptions.cs b/Microsoft.Azure.Cosmos/src/ChangeFeed/Pagination/ChangeFeedPaginationOptions.cs index 8579c6de42..85a2895774 100644 --- a/Microsoft.Azure.Cosmos/src/ChangeFeed/Pagination/ChangeFeedPaginationOptions.cs +++ b/Microsoft.Azure.Cosmos/src/ChangeFeed/Pagination/ChangeFeedPaginationOptions.cs @@ -33,16 +33,19 @@ public ChangeFeedPaginationOptions( JsonSerializationFormat? jsonSerializationFormat = null, Dictionary additionalHeaders = null, ChangeFeedQuerySpec changeFeedQuerySpec = null) - : base(pageSizeHint, jsonSerializationFormat, additionalHeaders) + : base(pageSizeHint, additionalHeaders) { this.Mode = mode ?? throw new ArgumentNullException(nameof(mode)); this.ChangeFeedQuerySpec = changeFeedQuerySpec; + this.JsonSerializationFormat = jsonSerializationFormat; } public ChangeFeedMode Mode { get; } public ChangeFeedQuerySpec ChangeFeedQuerySpec { get; } + public JsonSerializationFormat? JsonSerializationFormat { get; } + protected override ImmutableHashSet BannedAdditionalHeaders => BannedHeaders; } } diff --git a/Microsoft.Azure.Cosmos/src/FeedOptions.cs b/Microsoft.Azure.Cosmos/src/FeedOptions.cs index 6f4cae7e0d..4d6ce52f41 100644 --- a/Microsoft.Azure.Cosmos/src/FeedOptions.cs +++ b/Microsoft.Azure.Cosmos/src/FeedOptions.cs @@ -24,7 +24,7 @@ public FeedOptions() { } - internal FeedOptions(FeedOptions options) + public FeedOptions(FeedOptions options) { if (options == null) { @@ -65,10 +65,10 @@ internal FeedOptions(FeedOptions options) this.EndId = options.EndId; this.StartEpk = options.StartEpk; this.EndEpk = options.EndEpk; - this.ContentSerializationFormat = options.ContentSerializationFormat; this.EnableGroupBy = options.EnableGroupBy; this.MergeStaticId = options.MergeStaticId; this.Properties = options.Properties; + this.SupportedSerializationFormats = options.SupportedSerializationFormats; } /// @@ -282,7 +282,7 @@ internal FeedOptions(FeedOptions options) /// /// Option is true if query tracing is enabled; otherwise, false. /// - internal bool? EmitVerboseTracesInQuery { get; set; } + public bool? EmitVerboseTracesInQuery { get; set; } /// /// Gets or sets the schema rid which could be used to filter the document feed response @@ -292,7 +292,7 @@ internal FeedOptions(FeedOptions options) /// By default, it is null which means no filtering will be applied. /// Otherwise, it must be a valid resource id of Schema resource. /// - internal string FilterBySchemaResourceId { get; set; } + public string FilterBySchemaResourceId { get; set; } /// /// Gets or sets the request option for document query requests in the Azure Cosmos DB service. @@ -359,65 +359,62 @@ internal FeedOptions(FeedOptions options) /// /// Gets or sets the flag that tells the backend to forces the query to perform a scan (at a request level). /// - internal bool ForceQueryScan { get; set; } + public bool ForceQueryScan { get; set; } /// /// Gets or sets the EnumerationDirection /// To be used along with Read feed operation /// - internal EnumerationDirection? EnumerationDirection { get; set; } + public EnumerationDirection? EnumerationDirection { get; set; } /// /// Gets or sets the ReadFeedKeyType /// To be used along with Read feed operation /// - internal ReadFeedKeyType? ReadFeedKeyType { get; set; } + public ReadFeedKeyType? ReadFeedKeyType { get; set; } /// /// Gets or sets the StartId /// To be used along with Read feed operation /// - internal string StartId { get; set; } + public string StartId { get; set; } /// /// Gets or sets the EndId /// To be used along with Read feed operation /// - internal string EndId { get; set; } + public string EndId { get; set; } /// /// Gets or sets the StartEpk /// To be used along with Read feed operation /// - internal string StartEpk { get; set; } + public string StartEpk { get; set; } /// /// Gets or sets the EndEpk /// To be used along with Read feed operation /// - internal string EndEpk { get; set; } + public string EndEpk { get; set; } /// - /// Gets or sets the ContentSerializationFormat for the feed (query/read feed) operation in the Azure Cosmos DB service. + /// Gets or sets the SupportedSerializationFormats for the query response from the service. /// - /// - /// If the document is stored in a different serialization format then the one requested, then there will be a rewrite over the wire, but the source document will be untouched. - /// - internal ContentSerializationFormat? ContentSerializationFormat { get; set; } + public SupportedSerializationFormats? SupportedSerializationFormats { get; set; } - internal bool EnableGroupBy { get; set; } + public bool EnableGroupBy { get; set; } /// /// Gets or sets the MergeStaticId. /// To be used along with Read feed operation when Static Column merge is desired. /// - internal string MergeStaticId { get; set; } + public string MergeStaticId { get; set; } /// /// Gets or sets the custom serialization options for query /// - internal CosmosSerializationFormatOptions CosmosSerializationFormatOptions { get; set; } + public CosmosSerializationFormatOptions CosmosSerializationFormatOptions { get; set; } - internal IDictionary Properties { get; set; } + public IDictionary Properties { get; set; } } } diff --git a/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs b/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs index f12595d832..1cbf9b54e6 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/CosmosMessageHeadersInternal.cs @@ -159,6 +159,12 @@ public virtual string ContentSerializationFormat set => this.SetProperty(HttpConstants.HttpHeaders.ContentSerializationFormat, value); } + public virtual string SupportedSerializationFormats + { + get => this.GetValueOrDefault(HttpConstants.HttpHeaders.SupportedSerializationFormats); + set => this.SetProperty(HttpConstants.HttpHeaders.SupportedSerializationFormats, value); + } + public virtual string ReadFeedKeyType { get => this.GetValueOrDefault(HttpConstants.HttpHeaders.ReadFeedKeyType); diff --git a/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs b/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs index 68086095f7..b907363685 100644 --- a/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs +++ b/Microsoft.Azure.Cosmos/src/Headers/StoreRequestHeaders.cs @@ -76,6 +76,12 @@ public override string ContentSerializationFormat set => this.requestNameValueCollection.ContentSerializationFormat = value; } + public override string SupportedSerializationFormats + { + get => this.requestNameValueCollection.SupportedSerializationFormats; + set => this.requestNameValueCollection.SupportedSerializationFormats = value; + } + public override string ReadFeedKeyType { get => this.requestNameValueCollection.ReadFeedKeyType; diff --git a/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs b/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs index 7d8683c3fe..8420cb0540 100644 --- a/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs +++ b/Microsoft.Azure.Cosmos/src/Pagination/NetworkAttachedDocumentContainer.cs @@ -192,11 +192,6 @@ public async Task> MonadicReadFeedAsync( request.Headers.ContinuationToken = ((CosmosString)readFeedContinuationState.ContinuationToken).Value; } - if (readFeedPaginationOptions.JsonSerializationFormat.HasValue) - { - request.Headers.ContentSerializationFormat = readFeedPaginationOptions.JsonSerializationFormat.Value.ToContentSerializationFormatString(); - } - foreach (KeyValuePair kvp in readFeedPaginationOptions.AdditionalHeaders) { request.Headers[kvp.Key] = kvp.Value; diff --git a/Microsoft.Azure.Cosmos/src/Pagination/PaginationOptions.cs b/Microsoft.Azure.Cosmos/src/Pagination/PaginationOptions.cs index 5558f2be24..593d761ec0 100644 --- a/Microsoft.Azure.Cosmos/src/Pagination/PaginationOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Pagination/PaginationOptions.cs @@ -23,11 +23,9 @@ internal abstract class PaginationOptions protected PaginationOptions( int? pageSizeLimit = null, - JsonSerializationFormat? jsonSerializationFormat = null, Dictionary additionalHeaders = null) { this.PageSizeLimit = pageSizeLimit; - this.JsonSerializationFormat = jsonSerializationFormat; this.AdditionalHeaders = additionalHeaders != null ? additionalHeaders.ToImmutableDictionary() : EmptyDictionary; foreach (string key in this.AdditionalHeaders.Keys) @@ -41,8 +39,6 @@ protected PaginationOptions( public int? PageSizeLimit { get; } - public JsonSerializationFormat? JsonSerializationFormat { get; } - public ImmutableDictionary AdditionalHeaders { get; } protected abstract ImmutableHashSet BannedAdditionalHeaders { get; } diff --git a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs index c285135feb..c985158828 100644 --- a/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Pagination/QueryPaginationOptions.cs @@ -32,9 +32,8 @@ internal sealed class QueryPaginationOptions : PaginationOptions public QueryPaginationOptions( int? pageSizeHint = null, bool optimisticDirectExecute = false, - JsonSerializationFormat? jsonSerializationFormat = null, Dictionary additionalHeaders = null) - : base(pageSizeHint, jsonSerializationFormat, additionalHeaders) + : base(pageSizeHint, additionalHeaders) { this.OptimisticDirectExecute = optimisticDirectExecute; } diff --git a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs index ec4e6d9185..053c951f6c 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs @@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos.Query { using System; using System.Collections.Generic; + using System.ComponentModel; using System.Globalization; using System.IO; using System.Linq; @@ -31,6 +32,8 @@ namespace Microsoft.Azure.Cosmos.Query internal abstract class DocumentQueryExecutionContextBase : IDocumentQueryExecutionContext { + public static readonly string DefaultSupportedSerializationFormats = string.Join(",", SupportedSerializationFormats.JsonText, SupportedSerializationFormats.CosmosBinary); + public readonly struct InitParams { public IDocumentQueryClient Client { get; } @@ -326,14 +329,7 @@ await this.Client.EnsureValidOverwriteAsync( requestHeaders.Set(HttpConstants.HttpHeaders.MergeStaticId, this.feedOptions.MergeStaticId); } - if (this.feedOptions.CosmosSerializationFormatOptions != null) - { - requestHeaders[HttpConstants.HttpHeaders.ContentSerializationFormat] = this.feedOptions.CosmosSerializationFormatOptions.ContentSerializationFormat; - } - else if (this.feedOptions.ContentSerializationFormat.HasValue) - { - requestHeaders[HttpConstants.HttpHeaders.ContentSerializationFormat] = this.feedOptions.ContentSerializationFormat.Value.ToString(); - } + requestHeaders[HttpConstants.HttpHeaders.SupportedSerializationFormats] = this.feedOptions.SupportedSerializationFormats?.ToString() ?? DefaultSupportedSerializationFormats; return requestHeaders; } @@ -688,23 +684,7 @@ private DocumentFeedResponse GetFeedResponse( { content = memoryStream.ToArray(); } - - IJsonNavigator jsonNavigator = null; - - // Use the users custom navigator first. If it returns null back try the - // internal navigator. - if (this.feedOptions.CosmosSerializationFormatOptions != null) - { - jsonNavigator = this.feedOptions.CosmosSerializationFormatOptions.CreateCustomNavigatorCallback(content); - if (jsonNavigator == null) - { - throw new InvalidOperationException("The CosmosSerializationOptions did not return a JSON navigator."); - } - } - else - { - jsonNavigator = JsonNavigator.Create(content); - } + IJsonNavigator jsonNavigator = JsonNavigator.Create(content); string resourceName = this.GetRootNodeName(documentServiceRequest.ResourceType); diff --git a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs index 1c5a9ef21f..cce1a5268a 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v3Query/CosmosQueryClientCore.cs @@ -155,7 +155,6 @@ public override async Task> ExecuteItemQueryAsync( cancellationToken: cancellationToken); return CosmosQueryClientCore.GetCosmosElementResponse( - requestOptions, resourceType, message, trace); @@ -297,7 +296,6 @@ public override void ClearSessionTokenCache(string collectionFullName) } private static TryCatch GetCosmosElementResponse( - QueryRequestOptions requestOptions, ResourceType resourceType, ResponseMessage cosmosResponseMessage, ITrace trace) @@ -336,8 +334,7 @@ private static TryCatch GetCosmosElementResponse( long responseLengthBytes = memoryStream.Length; CosmosArray documents = CosmosQueryClientCore.ParseElementsFromRestStream( memoryStream, - resourceType, - requestOptions.CosmosSerializationFormatOptions); + resourceType); QueryState queryState; if (cosmosResponseMessage.Headers.ContinuationToken != null) @@ -444,12 +441,10 @@ private Task GetRoutingMapProviderAsync() /// /// The memory stream response for the query REST response Azure Cosmos /// The resource type - /// The custom serialization options. This allows custom serialization types like BSON, JSON, or other formats /// An array of CosmosElements parsed from the response body. public static CosmosArray ParseElementsFromRestStream( Stream stream, - ResourceType resourceType, - CosmosSerializationFormatOptions cosmosSerializationOptions) + ResourceType resourceType) { if (!(stream is MemoryStream memoryStream)) { @@ -478,20 +473,7 @@ public static CosmosArray ParseElementsFromRestStream( // You want to create a CosmosElement for each document in "Documents". ReadOnlyMemory content = memoryStream.TryGetBuffer(out ArraySegment buffer) ? buffer : (ReadOnlyMemory)memoryStream.ToArray(); - IJsonNavigator jsonNavigator; - if (cosmosSerializationOptions != null) - { - // Use the users custom navigator - jsonNavigator = cosmosSerializationOptions.CreateCustomNavigatorCallback(content); - if (jsonNavigator == null) - { - throw new InvalidOperationException("The CosmosSerializationOptions did not return a JSON navigator."); - } - } - else - { - jsonNavigator = JsonNavigator.Create(content); - } + IJsonNavigator jsonNavigator = JsonNavigator.Create(content); string resourceName = resourceType switch { diff --git a/Microsoft.Azure.Cosmos/src/ReadFeed/Pagination/ReadFeedPaginationOptions.cs b/Microsoft.Azure.Cosmos/src/ReadFeed/Pagination/ReadFeedPaginationOptions.cs index 757473c02c..ad219dfd99 100644 --- a/Microsoft.Azure.Cosmos/src/ReadFeed/Pagination/ReadFeedPaginationOptions.cs +++ b/Microsoft.Azure.Cosmos/src/ReadFeed/Pagination/ReadFeedPaginationOptions.cs @@ -27,9 +27,8 @@ internal sealed class ReadFeedPaginationOptions : PaginationOptions public ReadFeedPaginationOptions( PaginationDirection? paginationDirection = null, int? pageSizeHint = null, - JsonSerializationFormat? jsonSerializationFormat = null, Dictionary additionalHeaders = null) - : base(pageSizeHint, jsonSerializationFormat, additionalHeaders) + : base(pageSizeHint, additionalHeaders) { this.Direction = paginationDirection; } diff --git a/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedCrossFeedRangeAsyncEnumerator.cs b/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedCrossFeedRangeAsyncEnumerator.cs index 2f611840f7..95fb8b23cf 100644 --- a/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedCrossFeedRangeAsyncEnumerator.cs +++ b/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedCrossFeedRangeAsyncEnumerator.cs @@ -45,8 +45,7 @@ public async ValueTask MoveNextAsync() CosmosArray documents = CosmosQueryClientCore.ParseElementsFromRestStream( innerReadFeedPage.Page.Content, - Documents.ResourceType.Document, - cosmosSerializationOptions: null); + Documents.ResourceType.Document); ReadFeedPage page = new ReadFeedPage( documents, innerReadFeedPage.Page.RequestCharge, diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index 60cea5b48c..f723107ede 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -5,8 +5,10 @@ namespace Microsoft.Azure.Cosmos { using System; + using System.ComponentModel; using System.Text; using Microsoft.Azure.Cosmos.CosmosElements; + using Microsoft.Azure.Cosmos.Query; using Microsoft.Azure.Cosmos.Query.Core; using Microsoft.Azure.Cosmos.Query.Core.Pipeline; using Microsoft.Azure.Documents; @@ -188,6 +190,8 @@ public ConsistencyLevel? ConsistencyLevel internal CosmosSerializationFormatOptions CosmosSerializationFormatOptions { get; set; } + internal SupportedSerializationFormats? SupportedSerializationFormats { get; set; } + internal ExecutionEnvironment? ExecutionEnvironment { get; set; } internal bool? ReturnResultsInDeterministicOrder { get; set; } @@ -240,11 +244,8 @@ internal override void PopulateRequestOptions(RequestMessage request) { request.Headers.Add(HttpConstants.HttpHeaders.ResponseContinuationTokenLimitInKB, this.ResponseContinuationTokenLimitInKb.ToString()); } - - if (this.CosmosSerializationFormatOptions != null) - { - request.Headers.CosmosMessageHeaders.ContentSerializationFormat = this.CosmosSerializationFormatOptions.ContentSerializationFormat; - } + + request.Headers.CosmosMessageHeaders.SupportedSerializationFormats = this.SupportedSerializationFormats?.ToString() ?? DocumentQueryExecutionContextBase.DefaultSupportedSerializationFormats; if (this.StartId != null) { diff --git a/Microsoft.Azure.Cosmos/src/Serializer/CosmosSerializationFormatOptions.cs b/Microsoft.Azure.Cosmos/src/Serializer/CosmosSerializationFormatOptions.cs index 81ab5fd1e4..8ebefa502a 100644 --- a/Microsoft.Azure.Cosmos/src/Serializer/CosmosSerializationFormatOptions.cs +++ b/Microsoft.Azure.Cosmos/src/Serializer/CosmosSerializationFormatOptions.cs @@ -52,4 +52,4 @@ public CosmosSerializationFormatOptions( this.CreateCustomWriterCallback = createCustomWriter; } } -} +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs index b24ce5f03b..f9ca3f8ecc 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs @@ -13,6 +13,7 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests using System.Net; using System.Text; using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.Json; using Microsoft.Azure.Cosmos.Query.Core; using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Tracing; @@ -164,17 +165,17 @@ private void ValidatePageSize(DocumentClient client) public async Task ValidateConsistencyLevelGateway() { DocumentClient client = TestCommon.CreateClient(true); - await ValidateCosistencyLevel(client); + await ValidateConsistencyLevel(client); } [TestMethod] public async Task ValidateConsistencyLevelRntbd() { DocumentClient client = TestCommon.CreateClient(false, Protocol.Tcp); - await ValidateCosistencyLevel(client); + await ValidateConsistencyLevel(client); } - private async Task ValidateCosistencyLevel(DocumentClient client) + private async Task ValidateConsistencyLevel(DocumentClient client) { DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client); @@ -203,17 +204,16 @@ private async Task ValidateCosistencyLevel(DocumentClient client) } [TestMethod] - [Owner("brchon")] public void ValidateJsonSerializationFormatGateway() { - var client = TestCommon.CreateClient(true); + using var client = TestCommon.CreateClient(true); ValidateJsonSerializationFormat(client); } [TestMethod] public void ValidateJsonSerializationFormatRntbd() { - var client = TestCommon.CreateClient(false, Protocol.Tcp); + using var client = TestCommon.CreateClient(false, Protocol.Tcp); ValidateJsonSerializationFormat(client); } @@ -306,6 +306,184 @@ private void ValidateJsonSerializationFormatQuery(DocumentClient client, Documen Assert.IsTrue(response.ResponseBody.ReadByte() == HeadersValidationTests.BinarySerializationByteMarkValue); } + [TestMethod] + public void ValidateSupportedSerializationFormatsGateway() + { + using var client = TestCommon.CreateClient(true); + this.ValidateSupportedSerializationFormats(client, true); + } + + [TestMethod] + public void ValidateSupportedSerializationFormatsRntbd() + { + using var client = TestCommon.CreateClient(false, Protocol.Tcp); + this.ValidateSupportedSerializationFormats(client, false); + } + + private void ValidateSupportedSerializationFormats(DocumentClient client, bool isHttps) + { + DocumentCollection collection = TestCommon.CreateOrGetDocumentCollection(client); + this.ValidateSupportedSerializationFormatsReadFeed(client, collection, isHttps); + + List sqlQueryList = new List() + { + new SqlQuerySpec("SELECT * FROM c"), + new SqlQuerySpec("SELECT c.id FROM c ORDER BY c.partitionKey"), + new SqlQuerySpec("SELECT c.name FROM c GROUP BY c.name") + }; + + foreach(SqlQuerySpec sqlQuery in sqlQueryList) + { + this.ValidateSupportedSerializationFormatsQuery(client, collection, sqlQuery, isHttps); + } + } + + private void SupportedSerializationFormatsNegativeCases( + DocumentClient client, + DocumentCollection collection, + string invalidValue, + bool isHttps, + SqlQuerySpec sqlQuerySpec = null) + { + INameValueCollection headers = new RequestNameValueCollection(); + headers.Add(HttpConstants.HttpHeaders.SupportedSerializationFormats, invalidValue); + + try + { + DocumentServiceResponse response; + if (sqlQuerySpec != null) + { + response = this.QueryRequest(client, collection.ResourceId, sqlQuerySpec, headers); + } + else + { + headers.Set(HttpConstants.HttpHeaders.PartitionKey, "[\"test\"]"); + response = this.ReadDocumentFeedRequestSinglePartition(client, collection.ResourceId, headers); + } + + if (isHttps) + { + // Invalid value is treated as default JsonText if HTTPS + Assert.IsTrue(response.StatusCode == HttpStatusCode.OK, "Invalid status code"); + Assert.IsTrue(this.CheckSerializationFormat(response) == JsonSerializationFormat.Text); + } + else + { + Assert.Fail("Should throw an exception"); + } + } + catch (Exception ex) + { + DocumentClientException innerException = ex.InnerException as DocumentClientException; + Assert.IsTrue(innerException.StatusCode == HttpStatusCode.BadRequest, "invalid status code"); + } + } + + private void SupportedSerializationFormatsPositiveCases( + DocumentClient client, + DocumentCollection collection, + SupportedSerializationFormats expectedFormat, + string supportedSerializationFormats, + SqlQuerySpec sqlQuerySpec = null) + { + INameValueCollection headers = new RequestNameValueCollection(); + + headers.Add(HttpConstants.HttpHeaders.SupportedSerializationFormats, supportedSerializationFormats); + DocumentServiceResponse response; + if(sqlQuerySpec!=null) + { + response = this.QueryRequest(client, collection.ResourceId, sqlQuerySpec, headers); + } + else + { + Assert.IsTrue(expectedFormat == SupportedSerializationFormats.JsonText, "ReadFeed response should be in Text"); + response = this.ReadDocumentFeedRequestAsync(client, collection.ResourceId, headers).Result; + } + + Assert.IsTrue(response.StatusCode == HttpStatusCode.OK, "Invalid status code"); + + if(expectedFormat == SupportedSerializationFormats.JsonText) + { + Assert.IsTrue(this.CheckSerializationFormat(response) == JsonSerializationFormat.Text); + } + else + { + Assert.IsTrue(this.CheckSerializationFormat(response) == JsonSerializationFormat.Binary); + } + } + + private void ValidateSupportedSerializationFormatsReadFeed(DocumentClient client, DocumentCollection collection, bool isHttps) + { + // Value not supported + this.SupportedSerializationFormatsNegativeCases(client, collection, "Invalid value", isHttps); + + // Supported values + this.SupportedSerializationFormatsPositiveCases(client, collection, expectedFormat: SupportedSerializationFormats.JsonText, supportedSerializationFormats: "JSONText"); + this.SupportedSerializationFormatsPositiveCases(client, collection, expectedFormat: SupportedSerializationFormats.JsonText, supportedSerializationFormats: "COSMOSbinary"); + this.SupportedSerializationFormatsPositiveCases(client, collection, expectedFormat: SupportedSerializationFormats.JsonText, supportedSerializationFormats: "JsonText, CosmosBinary"); + } + + private void ValidateSupportedSerializationFormatsQuery(DocumentClient client, DocumentCollection collection, SqlQuerySpec sqlQuerySpec, bool isHttps) + { + // Values not supported + this.SupportedSerializationFormatsNegativeCases(client, collection, "Invalid value", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, ", ,", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, ",,", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, "JsonText CosmosBinary", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, ",JsonText|CosmosBinary", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, "Json Text", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, "Json,Text", isHttps, sqlQuerySpec: sqlQuerySpec); + this.SupportedSerializationFormatsNegativeCases(client, collection, "JsonText, ", isHttps, sqlQuerySpec: sqlQuerySpec); + + // Supported values + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.JsonText, + supportedSerializationFormats: "jsontext", + sqlQuerySpec: sqlQuerySpec); + /* + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.CosmosBinary, + supportedSerializationFormats: "COSMOSBINARY", + sqlQuerySpec: sqlQuerySpec); + */ + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.JsonText, + supportedSerializationFormats: "JsonText, CosmosBinary", + sqlQuerySpec: sqlQuerySpec); + /* + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.CosmosBinary, + supportedSerializationFormats: "CosmosBinary, HybridRow", + sqlQuerySpec: sqlQuerySpec); + */ + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.JsonText, + supportedSerializationFormats: "JsonText, CosmosBinary, HybridRow", + sqlQuerySpec: sqlQuerySpec); + /* + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.CosmosBinary, + supportedSerializationFormats: "JsonText, CosmosBinary, HybridRow", + sqlQuerySpec: sqlQuerySpec); + */ + this.SupportedSerializationFormatsPositiveCases(client, collection, + expectedFormat: SupportedSerializationFormats.JsonText, + supportedSerializationFormats: "JsonText, CosmosBinary, HybridRow", + sqlQuerySpec: sqlQuerySpec); + } + + private JsonSerializationFormat CheckSerializationFormat(DocumentServiceResponse response) + { + if(response.ResponseBody.ReadByte() < BinarySerializationByteMarkValue) + { + return JsonSerializationFormat.Text; + } + else + { + return JsonSerializationFormat.Binary; + } + } + [TestMethod] public void ValidateIndexingDirectiveGateway() { @@ -1105,4 +1283,4 @@ internal override string BaseUserAgent } } } -} \ No newline at end of file +} diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SupportedSerializationFormatsTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SupportedSerializationFormatsTest.cs new file mode 100644 index 0000000000..f4cdab6e51 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SupportedSerializationFormatsTest.cs @@ -0,0 +1,102 @@ +namespace Microsoft.Azure.Cosmos.Query +{ + using System; + using System.Collections.Generic; + using System.Linq; + using System.Threading.Tasks; + using Microsoft.Azure.Cosmos.CosmosElements; + using Microsoft.Azure.Cosmos.EmulatorTests.Query; + using Microsoft.Azure.Cosmos.SDK.EmulatorTests.QueryOracle; + using Microsoft.Azure.Documents; + using Microsoft.VisualStudio.TestTools.UnitTesting; + + [TestClass] + [TestCategory("Query")] + public sealed class SupportedSerializationFormatsTest : QueryTestsBase + { + [TestMethod] + public async Task TestSupportedSerializationFormats() + { + string[] inputDocuments = new[] + { + @"{""id"":""0"",""name"":""document_0""}", + @"{""id"":""1"",""name"":""document_1""}", + @"{""id"":""2"",""name"":""document_2""}", + @"{""id"":""3"",""name"":""document_3""}", + @"{""id"":""4"",""name"":""document_4""}", + @"{""id"":""5"",""name"":""document_5""}", + @"{""id"":""6"",""name"":""document_6""}", + @"{""id"":""7"",""name"":""document_7""}", + @"{""id"":""8"",""name"":""document_8""}", + @"{""id"":""9"",""name"":""document_9""}", + }; + + await this.CreateIngestQueryDeleteAsync( + ConnectionModes.Direct, + CollectionTypes.SinglePartition | CollectionTypes.MultiPartition, + inputDocuments, + this.TestSupportedSerializationFormatsHelper, + "/id"); + } + + private async Task TestSupportedSerializationFormatsHelper(Container container, IReadOnlyList documents) + { + string[] expectedResults = new[] { "document_0", "document_1", "document_2", "document_3", "document_4", "document_5", "document_6", "document_7", "document_8", "document_9" }; + string query = string.Format("SELECT c.name FROM c"); + List queryRequestOptionsList = new List() + { + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.CosmosBinary | SupportedSerializationFormats.HybridRow + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.JsonText | SupportedSerializationFormats.CosmosBinary + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.JsonText | SupportedSerializationFormats.HybridRow + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.JsonText | SupportedSerializationFormats.CosmosBinary | SupportedSerializationFormats.HybridRow + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.JsonText + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.CosmosBinary + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.CosmosBinary + }, + new QueryRequestOptions() + { + SupportedSerializationFormats = SupportedSerializationFormats.JsonText + } + }; + + foreach (QueryRequestOptions requestOptions in queryRequestOptionsList) + { + List results = new List(); + using (FeedIterator feedIterator = container.GetItemQueryIterator(new QueryDefinition(query), requestOptions: requestOptions)) + { + while (feedIterator.HasMoreResults) + { + FeedResponse response = await feedIterator.ReadNextAsync(); + results.AddRange(response.ToList()); + } + } + + string[] actualResults = results + .Select(doc => ((CosmosString)(doc as CosmosObject)["name"]).Value.ToString()) + .ToArray(); + + CollectionAssert.AreEquivalent(expectedResults, actualResults); + } + } + } +} \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryPerfTest/ContentSerializationPerformanceTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryPerfTest/ContentSerializationPerformanceTests.cs index c18ac5e420..759e63b345 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryPerfTest/ContentSerializationPerformanceTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/QueryPerfTest/ContentSerializationPerformanceTests.cs @@ -83,10 +83,6 @@ private async Task RunQueryAsync(Container container) { MaxConcurrency = this.MaxConcurrency, MaxItemCount = this.MaxItemCount, - CosmosSerializationFormatOptions = new CosmosSerializationFormatOptions( - contentSerializationFormat: this.contentSerialization, - createCustomNavigator: (content) => JsonNavigator.Create(content), - createCustomWriter: () => JsonWriter.Create(this.contentSerialization == "JsonText" ? JsonSerializationFormat.Text : JsonSerializationFormat.Binary)) }; if (this.useStronglyTypedIterator) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BinaryEncodingOverTheWireTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BinaryEncodingOverTheWireTests.cs index b55e837844..7d570d65d0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BinaryEncodingOverTheWireTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BinaryEncodingOverTheWireTests.cs @@ -28,15 +28,11 @@ public class BinaryEncodingOverTheWireTests ConfigurationManager.AppSettings["GatewayEndpoint"], ConfigurationManager.AppSettings["MasterKey"], new CosmosClientOptions() { ConnectionMode = ConnectionMode.Gateway }); - private static readonly CosmosClient DirectHttpsClient = new CosmosClient( - ConfigurationManager.AppSettings["GatewayEndpoint"], - ConfigurationManager.AppSettings["MasterKey"], - new CosmosClientOptions() { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Documents.Client.Protocol.Https }); private static readonly CosmosClient RntbdClient = new CosmosClient( ConfigurationManager.AppSettings["GatewayEndpoint"], ConfigurationManager.AppSettings["MasterKey"], new CosmosClientOptions() { ConnectionMode = ConnectionMode.Direct, ConnectionProtocol = Documents.Client.Protocol.Tcp }); - private static readonly CosmosClient[] Clients = new CosmosClient[] { GatewayClient, DirectHttpsClient, RntbdClient }; + private static readonly CosmosClient[] Clients = new CosmosClient[] { GatewayClient, RntbdClient }; private static readonly CosmosClient Client = RntbdClient; private static readonly AsyncLazy Database = new AsyncLazy(async () => { @@ -124,7 +120,7 @@ public void CheckThatAllTestsAreRunning() [TestMethod] public async Task CombinedScriptsDataTest() { - await this.TestCurratedDocs("CombinedScriptsData.json"); + await this.TestCuratedDocs("CombinedScriptsData.json"); } // For now we are skipping this test since the documents are too large to ingest and we get a rate size too large (HTTP 413). @@ -139,96 +135,96 @@ public async Task CountriesTest() [TestMethod] public async Task DevTestCollTest() { - await this.TestCurratedDocs("devtestcoll.json"); + await this.TestCuratedDocs("devtestcoll.json"); } [TestMethod] public async Task LastFMTest() { - await this.TestCurratedDocs("lastfm"); + await this.TestCuratedDocs("lastfm"); } [TestMethod] public async Task LogDataTest() { - await this.TestCurratedDocs("LogData.json"); + await this.TestCuratedDocs("LogData.json"); } [TestMethod] public async Task MillionSong1KDocumentsTest() { - await this.TestCurratedDocs("MillionSong1KDocuments.json"); + await this.TestCuratedDocs("MillionSong1KDocuments.json"); } [TestMethod] public async Task MsnCollectionTest() { - await this.TestCurratedDocs("MsnCollection.json"); + await this.TestCuratedDocs("MsnCollection.json"); } [TestMethod] public async Task NutritionDataTest() { - await this.TestCurratedDocs("NutritionData"); + await this.TestCuratedDocs("NutritionData"); } [TestMethod] public async Task RunsCollectionTest() { - await this.TestCurratedDocs("runsCollection"); + await this.TestCuratedDocs("runsCollection"); } [TestMethod] public async Task StatesCommitteesTest() { - await this.TestCurratedDocs("states_committees.json"); + await this.TestCuratedDocs("states_committees.json"); } [TestMethod] public async Task StatesLegislatorsTest() { - await this.TestCurratedDocs("states_legislators"); + await this.TestCuratedDocs("states_legislators"); } [TestMethod] public async Task Store01Test() { - await this.TestCurratedDocs("store01C.json"); + await this.TestCuratedDocs("store01C.json"); } [TestMethod] public async Task TicinoErrorBucketsTest() { - await this.TestCurratedDocs("TicinoErrorBuckets"); + await this.TestCuratedDocs("TicinoErrorBuckets"); } [TestMethod] public async Task TwitterDataTest() { - await this.TestCurratedDocs("twitter_data"); + await this.TestCuratedDocs("twitter_data"); } [TestMethod] public async Task Ups1Test() { - await this.TestCurratedDocs("ups1"); + await this.TestCuratedDocs("ups1"); } [TestMethod] public async Task XpertEventsTest() { - await this.TestCurratedDocs("XpertEvents"); + await this.TestCuratedDocs("XpertEvents"); } - private async Task TestCurratedDocs(string path) + private async Task TestCuratedDocs(string path) { IEnumerable documents = BinaryEncodingOverTheWireTests.GetDocumentsFromCurratedDoc(path); await BinaryEncodingOverTheWireTests.CreateIngestQueryDelete( documents.Select(x => x.ToString()), - this.TestCurratedDocs); + this.TestCuratedDocs); } - private async Task TestCurratedDocs(CosmosClient cosmosClient, Container container, List items) + private async Task TestCuratedDocs(CosmosClient cosmosClient, Container container, List items) { HashSet inputItems = new HashSet(items, JsonTokenEqualityComparer.Value); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/ContinuationTokens/OrderByQueryResultTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/ContinuationTokens/OrderByQueryResultTests.cs index 86093aa296..7207f897be 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/ContinuationTokens/OrderByQueryResultTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/ContinuationTokens/OrderByQueryResultTests.cs @@ -31,11 +31,7 @@ public void TestOrderByUndefined() CosmosArray documents = CosmosQueryClientCore.ParseElementsFromRestStream( memoryStream, - Documents.ResourceType.Document, - new CosmosSerializationFormatOptions( - "JsonText", - (content) => JsonNavigator.Create(content), - () => JsonWriter.Create(JsonSerializationFormat.Text))); + Documents.ResourceType.Document); List orderByQueryResults = documents.Select(x => new OrderByQueryResult(x)).ToList(); Assert.AreEqual(14, orderByQueryResults.Count); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/FeedOptionTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/FeedOptionTests.cs index 54c965cce8..703636ca81 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/FeedOptionTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Query/FeedOptionTests.cs @@ -50,6 +50,31 @@ public void TestCopyConstructor() _ = new FeedOptions(fo); } + [TestMethod] + public async Task TestSupportedSerializationFormats() + { + FeedOptions feedOptions = new FeedOptions(); + Mock client = new Mock(MockBehavior.Strict); + client.Setup(x => x.GetDefaultConsistencyLevelAsync()).Returns(Task.FromResult(ConsistencyLevel.BoundedStaleness)); + client.Setup(x => x.GetDesiredConsistencyLevelAsync()).Returns(Task.FromResult(ConsistencyLevel.BoundedStaleness)); + Expression> randomFunc = x => x * 2; + + TestQueryExecutionContext testQueryExecutionContext = new TestQueryExecutionContext( + client.Object, + ResourceType.Document, + typeof(TestQueryExecutionContext), + randomFunc, + feedOptions, + string.Empty, + true, Guid.NewGuid()); + INameValueCollection headers = await testQueryExecutionContext.CreateCommonHeadersAsync(feedOptions); + Assert.AreEqual("JsonText,CosmosBinary", headers[HttpConstants.HttpHeaders.SupportedSerializationFormats]); + + feedOptions.SupportedSerializationFormats = SupportedSerializationFormats.CosmosBinary | SupportedSerializationFormats.HybridRow; + headers = await testQueryExecutionContext.CreateCommonHeadersAsync(feedOptions); + Assert.AreEqual("CosmosBinary, HybridRow", headers[HttpConstants.HttpHeaders.SupportedSerializationFormats]); + } + internal class TestQueryExecutionContext : DocumentQueryExecutionContextBase { public TestQueryExecutionContext( From 3f4b7bd04dd9b456ceca20f269ed585599d9b4ca Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Mon, 26 Jun 2023 07:47:45 -0700 Subject: [PATCH 146/164] Code changes to optimize the rntbd open connection logic to open connections in parallel. (#3939) --- .../src/Routing/GatewayAddressCache.cs | 143 +++++++++++++----- .../GatewayAddressCacheTests.cs | 87 ++++++++++- 2 files changed, 185 insertions(+), 45 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index 14b641959a..f864256df9 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -31,6 +31,11 @@ internal class GatewayAddressCache : IAddressCache, IDisposable private const string AddressResolutionBatchSize = "AddressResolutionBatchSize"; private const int DefaultBatchSize = 50; + // This warmup cache and connection timeout is meant to mimic an indefinite timeframe till which + // a delay task will run, until a cancellation token is requested to cancel the task. The default + // value for this timeout is 45 minutes at the moment. + private static readonly TimeSpan WarmupCacheAndOpenConnectionTimeout = TimeSpan.FromMinutes(45); + private readonly Uri serviceEndpoint; private readonly Uri addressEndpoint; @@ -113,7 +118,7 @@ public async Task OpenConnectionsAsync( bool shouldOpenRntbdChannels, CancellationToken cancellationToken) { - List>> tasks = new (); + List tasks = new (); int batchSize = GatewayAddressCache.DefaultBatchSize; #if !(NETSTANDARD15 || NETSTANDARD16) @@ -147,50 +152,33 @@ public async Task OpenConnectionsAsync( { for (int i = 0; i < partitionKeyRangeIdentities.Count; i += batchSize) { - tasks - .Add(this.GetAddressesAsync( - request: request, - collectionRid: collection.ResourceId, - partitionKeyRangeIds: partitionKeyRangeIdentities.Skip(i).Take(batchSize).Select(range => range.PartitionKeyRangeId))); + tasks.Add( + this.WarmupCachesAndOpenConnectionsAsync( + request: request, + collectionRid: collection.ResourceId, + partitionKeyRangeIds: partitionKeyRangeIdentities.Skip(i).Take(batchSize).Select(range => range.PartitionKeyRangeId), + containerProperties: collection, + shouldOpenRntbdChannels: shouldOpenRntbdChannels)); } } - foreach (TryCatch task in await Task.WhenAll(tasks)) - { - if (task.Failed) - { - continue; - } + using CancellationTokenSource linkedTokenSource = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); - using (DocumentServiceResponse response = task.Result) - { - FeedResource
addressFeed = response.GetResource>(); - - bool inNetworkRequest = this.IsInNetworkRequest(response); + // The `timeoutTask` is a background task which adds a delay for a period of WarmupCacheAndOpenConnectionTimeout. The task will + // be cancelled either by - a) when `linkedTokenSource` expires, which means the original `cancellationToken` expires or + // b) the the `linkedTokenSource.Cancel()` is called. + Task timeoutTask = Task.Delay(GatewayAddressCache.WarmupCacheAndOpenConnectionTimeout, linkedTokenSource.Token); + Task resultTask = await Task.WhenAny(Task.WhenAll(tasks), timeoutTask); - IEnumerable> addressInfos = - addressFeed.Where(addressInfo => ProtocolFromString(addressInfo.Protocol) == this.protocol) - .GroupBy(address => address.PartitionKeyRangeId, StringComparer.Ordinal) - .Select(group => this.ToPartitionAddressAndRange(collection.ResourceId, @group.ToList(), inNetworkRequest)); - - foreach (Tuple addressInfo in addressInfos) - { - this.serverPartitionAddressCache.Set( - new PartitionKeyRangeIdentity(collection.ResourceId, addressInfo.Item1.PartitionKeyRangeId), - addressInfo.Item2); - - // The `shouldOpenRntbdChannels` boolean flag indicates whether the SDK should establish Rntbd connections to the - // backend replica nodes. For the `CosmosClient.CreateAndInitializeAsync()` flow, the flag should be passed as - // `true` so that the Rntbd connections to the backend replicas could be established deterministically. For any - // other flow, the flag should be passed as `false`. - if (this.openConnectionsHandler != null && shouldOpenRntbdChannels) - { - await this.openConnectionsHandler - .TryOpenRntbdChannelsAsync( - addresses: addressInfo.Item2.Get(Protocol.Tcp)?.ReplicaTransportAddressUris); - } - } - } + if (resultTask == timeoutTask) + { + // Operation has been cancelled. + DefaultTrace.TraceWarning("The open connection task was cancelled because the cancellation token was expired. '{0}'", + System.Diagnostics.Trace.CorrelationManager.ActivityId); + } + else + { + linkedTokenSource.Cancel(); } } @@ -350,6 +338,81 @@ public async Task TryGetAddressesAsync( } } + /// + /// Gets the address information from the gateway using the partition key range ids, and warms up the async non blocking cache + /// by inserting them as a key value pair for later lookup. Additionally attempts to establish Rntbd connections to the backend + /// replicas based on `shouldOpenRntbdChannels` boolean flag. + /// + /// An instance of containing the request payload. + /// A string containing the collection ids. + /// An instance of containing the list of partition key range ids. + /// An instance of containing the collection properties. + /// A boolean flag indicating whether Rntbd connections are required to be established to the backend replica nodes. + private async Task WarmupCachesAndOpenConnectionsAsync( + DocumentServiceRequest request, + string collectionRid, + IEnumerable partitionKeyRangeIds, + ContainerProperties containerProperties, + bool shouldOpenRntbdChannels) + { + TryCatch documentServiceResponseWrapper = await this.GetAddressesAsync( + request: request, + collectionRid: collectionRid, + partitionKeyRangeIds: partitionKeyRangeIds); + + if (documentServiceResponseWrapper.Failed) + { + return; + } + + try + { + using (DocumentServiceResponse response = documentServiceResponseWrapper.Result) + { + FeedResource
addressFeed = response.GetResource>(); + + bool inNetworkRequest = this.IsInNetworkRequest(response); + + IEnumerable> addressInfos = + addressFeed.Where(addressInfo => ProtocolFromString(addressInfo.Protocol) == this.protocol) + .GroupBy(address => address.PartitionKeyRangeId, StringComparer.Ordinal) + .Select(group => this.ToPartitionAddressAndRange(containerProperties.ResourceId, @group.ToList(), inNetworkRequest)); + + List openConnectionTasks = new (); + foreach (Tuple addressInfo in addressInfos) + { + this.serverPartitionAddressCache.Set( + new PartitionKeyRangeIdentity(containerProperties.ResourceId, addressInfo.Item1.PartitionKeyRangeId), + addressInfo.Item2); + + // The `shouldOpenRntbdChannels` boolean flag indicates whether the SDK should establish Rntbd connections to the + // backend replica nodes. For the `CosmosClient.CreateAndInitializeAsync()` flow, the flag should be passed as + // `true` so that the Rntbd connections to the backend replicas could be established deterministically. For any + // other flow, the flag should be passed as `false`. + if (this.openConnectionsHandler != null && shouldOpenRntbdChannels) + { + openConnectionTasks + .Add(this.openConnectionsHandler + .TryOpenRntbdChannelsAsync( + addresses: addressInfo.Item2.Get(Protocol.Tcp)?.ReplicaTransportAddressUris)); + } + } + + if (openConnectionTasks.Any()) + { + await Task.WhenAll(openConnectionTasks); + } + } + } + catch (Exception ex) + { + DefaultTrace.TraceWarning("Failed to warm-up caches and open connections for the server addresses: {0} with exception: {1}. '{2}'", + collectionRid, + ex, + System.Diagnostics.Trace.CorrelationManager.ActivityId); + } + } + private static void SetTransportAddressUrisToUnhealthy( PartitionAddressInformation stalePartitionAddressInformation, Lazy> failedEndpoints) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 5116eb22de..296c131fbf 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -480,6 +480,75 @@ await cache.OpenConnectionsAsync( expectedTotalSuccessAddressesToOpenCount: 0); } + /// + /// Test to validate that when is called with a valid open connection handler + /// and a cancellation token that will expire with a pre-configured time, the handler method is indeed invoked and the open connection + /// operation gets cancelled successfully, if the cancellation token expires. The open connection operation succeeds if the operation + /// is finished before the cancellation token expiry time. + /// + [TestMethod] + [Owner("dkunda")] + [DataRow(1, 2, 1, 0, 3, 0, true, DisplayName = "Validate that when the cancellation token expiry time (i.e. 1 sec) is smaller than the open connection opperation duration (i.e. 2 sec)," + + "the open connection operation gets cancelled and the cancellation token is indeed respected and eventually cancelled.")] + [DataRow(3, 1, 1, 0, 3, 3, false, DisplayName = "Validate that when the cancellation token expiry time (i.e. 3 sec) is larger than the open connection opperation duration (i.e. 1 sec)," + + "the open connection operation completes successfully and the cancellation token is not cancelled.")] + public async Task OpenConnectionsAsync_WithValidOpenConnectionHandlerAndCancellationTokenExpires_ShouldInvokeHandlerMethodAndCancelToken( + int cancellationTokenTimeoutInSeconds, + int openConnectionDelayInSeconds, + int expectedTotalHandlerInvocationCount, + int expectedTotalFailedAddressesToOpenCount, + int expectedTotalReceivedAddressesCount, + int expectedTotalSuccessAddressesToOpenCount, + bool shouldCancelToken) + { + // Arrange. + FakeMessageHandler messageHandler = new (); + FakeOpenConnectionHandler fakeOpenConnectionHandler = new ( + failingIndexes: new HashSet(), + openConnectionDelayInSeconds: openConnectionDelayInSeconds); + + ContainerProperties containerProperties = ContainerProperties.CreateWithResourceId("ccZ1ANCszwk="); + containerProperties.Id = "TestId"; + containerProperties.PartitionKeyPath = "/pk"; + HttpClient httpClient = new(messageHandler) + { + Timeout = TimeSpan.FromSeconds(120) + }; + + CancellationTokenSource cts = new (TimeSpan.FromSeconds(cancellationTokenTimeoutInSeconds)); + CancellationToken token = cts.Token; + + GatewayAddressCache cache = new ( + new Uri(GatewayAddressCacheTests.DatabaseAccountApiEndpoint), + Protocol.Tcp, + this.mockTokenProvider.Object, + this.mockServiceConfigReader.Object, + MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), + openConnectionsHandler: fakeOpenConnectionHandler, + suboptimalPartitionForceRefreshIntervalInSeconds: 2); + + // Act. + await cache.OpenConnectionsAsync( + databaseName: "test-database", + collection: containerProperties, + partitionKeyRangeIdentities: new List() + { + this.testPartitionKeyRangeIdentity + }, + shouldOpenRntbdChannels: true, + cancellationToken: token); + + // Assert. + GatewayAddressCacheTests.AssertOpenConnectionHandlerAttributes( + fakeOpenConnectionHandler: fakeOpenConnectionHandler, + expectedTotalFailedAddressesToOpenCount: expectedTotalFailedAddressesToOpenCount, + expectedTotalHandlerInvocationCount: expectedTotalHandlerInvocationCount, + expectedTotalReceivedAddressesCount: expectedTotalReceivedAddressesCount, + expectedTotalSuccessAddressesToOpenCount: expectedTotalSuccessAddressesToOpenCount); + + Assert.AreEqual(shouldCancelToken, token.IsCancellationRequested); + } + /// /// Test to validate that when is called with a /// valid open connection handler, the handler method is indeed invoked and an attempt is made to open @@ -1074,7 +1143,7 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr FakeOpenConnectionHandler fakeOpenConnectionHandler = new ( failIndexesByAttempts: new Dictionary>() { - { 0, new HashSet() { 1 } } + { 0, new HashSet() { 2 } } }, manualResetEvent: manualResetEvent); @@ -1513,16 +1582,19 @@ public class FakeOpenConnectionHandler : IOpenConnectionsHandler private int successInvocationCounter = 0; private int totalReceivedAddressesCounter = 0; private readonly HashSet failingIndexes; + private readonly int openConnectionDelayInSeconds; private readonly bool useAttemptBasedFailingIndexs; private readonly ManualResetEvent manualResetEvent; private readonly Dictionary> failIndexesByAttempts; public FakeOpenConnectionHandler( HashSet failingIndexes, - ManualResetEvent manualResetEvent = null) + ManualResetEvent manualResetEvent = null, + int openConnectionDelayInSeconds = 0) { this.failingIndexes = failingIndexes; this.manualResetEvent = manualResetEvent; + this.openConnectionDelayInSeconds = openConnectionDelayInSeconds; } public FakeOpenConnectionHandler( @@ -1554,11 +1626,18 @@ public int GetTotalMethodInvocationCount() return this.methodInvocationCounter; } - Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( + async Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( IEnumerable addresses) { int idx = 0; + this.methodInvocationCounter++; this.totalReceivedAddressesCounter += addresses.Count(); + + if (this.openConnectionDelayInSeconds > 0) + { + await Task.Delay(TimeSpan.FromSeconds(this.openConnectionDelayInSeconds)); + } + foreach (TransportAddressUri transportAddress in addresses) { if (this.useAttemptBasedFailingIndexs) @@ -1587,9 +1666,7 @@ Task IOpenConnectionsHandler.TryOpenRntbdChannelsAsync( idx++; } - this.methodInvocationCounter++; this.manualResetEvent?.Set(); - return Task.CompletedTask; } private void ExecuteSuccessCondition( From abab80e23858961a0f67db576ee51aac9255c094 Mon Sep 17 00:00:00 2001 From: Erik O'Leary <969938+onionhammer@users.noreply.github.com> Date: Mon, 26 Jun 2023 17:52:44 -0500 Subject: [PATCH 147/164] Query : Adds support for newtonsoft member access via ExtensionData (#3834) * Support newtonsoft member access via ExtensionData * Return null instead of empty string * Added tests for select & where * Updated baseline with note --------- Co-authored-by: leminh98 --- .../src/Linq/ExpressionToSQL.cs | 6 ++++ Microsoft.Azure.Cosmos/src/Linq/TypeSystem.cs | 8 +++++ ...ionBaselineTest.ValidateSQLTranslation.xml | 11 ++++++ ...Test.ValidateSQLTranslationComplexData.xml | 34 +++++++++++++++++++ .../LinqSQLTranslationBaselineTests.cs | 30 +++++++++++++++- .../Linq/CosmosLinqJsonConverterTests.cs | 30 ++++++++++++++++ 6 files changed, 118 insertions(+), 1 deletion(-) diff --git a/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs b/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs index 476774e137..b259234336 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs @@ -742,6 +742,12 @@ private static SqlScalarExpression VisitMemberAccess(MemberExpression inputExpre SqlScalarExpression memberExpression = ExpressionToSql.VisitScalarExpression(inputExpression.Expression, context); string memberName = inputExpression.Member.GetMemberName(context.linqSerializerOptions); + // If the resulting memberName is null, then the indexer should be on the root of the object. + if (memberName == null) + { + return memberExpression; + } + // if expression is nullable if (inputExpression.Expression.Type.IsNullable()) { diff --git a/Microsoft.Azure.Cosmos/src/Linq/TypeSystem.cs b/Microsoft.Azure.Cosmos/src/Linq/TypeSystem.cs index 34d771bf56..7c8e62d69c 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/TypeSystem.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/TypeSystem.cs @@ -25,6 +25,14 @@ public static Type GetElementType(Type type) public static string GetMemberName(this MemberInfo memberInfo, CosmosLinqSerializerOptions linqSerializerOptions = null) { string memberName = null; + + // Check if Newtonsoft JsonExtensionDataAttribute is present on the member, if so, return empty member name. + JsonExtensionDataAttribute jsonExtensionDataAttribute = memberInfo.GetCustomAttribute(true); + if (jsonExtensionDataAttribute != null && jsonExtensionDataAttribute.ReadData) + { + return null; + } + // Json.Net honors JsonPropertyAttribute more than DataMemberAttribute // So we check for JsonPropertyAttribute first. JsonPropertyAttribute jsonPropertyAttribute = memberInfo.GetCustomAttribute(true); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslation.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslation.xml index 877754ac74..d22afb37f9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslation.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslation.xml @@ -268,6 +268,17 @@ FROM root]]> + + + + + + new complex() {NewtonsoftExtensionData = new Dictionary`2() {Void Add(System.String, System.Object)("test", Convert(1.5, Object))}, NetExtensionData = new Dictionary`2() {Void Add(System.String, System.Object)("OtherTest", Convert(1.5, Object))}})]]> + + + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslationComplexData.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslationComplexData.xml index 04e8ab30fe..a557298543 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslationComplexData.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqSQLTranslationBaselineTest.ValidateSQLTranslationComplexData.xml @@ -166,4 +166,38 @@ FROM root JOIN x0 IN root["dblArray"]]]> + + + + (Convert(p.NewtonsoftExtensionData.get_Item("age"), Int32) > 18)).Select(x => new AnonymousType(Age = Convert(x.NewtonsoftExtensionData.get_Item("age"), Int32)))]]> + + + 18)]]> + + + + + + Convert(p.NewtonsoftExtensionData.get_Item("tags"), String[]).Contains("item-1")).Select(x => Convert(x.NewtonsoftExtensionData.get_Item("tags"), String[]))]]> + + + + + + + + + Convert(p.NewtonsoftExtensionData.get_Item("tags"), String[]).Contains("item-1")).SelectMany(x => Convert(x.NewtonsoftExtensionData.get_Item("tags"), Object[]))]]> + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs index f3c27a2230..230e2599a3 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqSQLTranslationBaselineTests.cs @@ -103,6 +103,12 @@ struct complex public string id; public string pk; + [Newtonsoft.Json.JsonExtensionData(ReadData = true, WriteData = true)] + public Dictionary NewtonsoftExtensionData { get; set; } + + [System.Text.Json.Serialization.JsonExtensionData()] + public Dictionary NetExtensionData { get; set; } + public complex(double d, string str, bool b, double[] da, simple s) { this.dbl = d; @@ -113,6 +119,8 @@ public complex(double d, string str, bool b, double[] da, simple s) this.json = null; this.id = Guid.NewGuid().ToString(); this.pk = "Test"; + this.NetExtensionData = new Dictionary(); + this.NewtonsoftExtensionData = new Dictionary(); } public override string ToString() @@ -236,7 +244,15 @@ public void ValidateSQLTranslation() inputs.Add(new LinqTestInput("Select new constructor", b => dataQuery(b).Select(x => new TimeSpan(x.x)))); inputs.Add(new LinqTestInput("Select method id", b => dataQuery(b).Select(x => id(x)))); inputs.Add(new LinqTestInput("Select identity", b => dataQuery(b).Select(x => x))); - inputs.Add(new LinqTestInput("Select simple property", b => dataQuery(b).Select(x => x.x))); + inputs.Add(new LinqTestInput("Select simple property", b => dataQuery(b).Select(x => x.x))); + inputs.Add(new LinqTestInput("Select extension data", b => dataQuery(b).Select(x => new complex() { + NewtonsoftExtensionData = new() { + { "test", 1.5 } + }, + NetExtensionData = new() { + { "OtherTest", 1.5 } + } + } ))); this.ExecuteTestSuite(inputs); } @@ -264,6 +280,10 @@ public void ValidateSQLTranslationComplexData() obj.str = random.NextDouble() < 0.1 ? "5" : LinqTestsCommon.RandomString(random, random.Next(MaxStringLength)); obj.id = Guid.NewGuid().ToString(); obj.pk = "Test"; + obj.NewtonsoftExtensionData = new Dictionary() { + ["age"] = 32, + ["tags"] = new [] { "item-1", "item-2" } + }; return obj; }; Func> getQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); @@ -285,6 +305,14 @@ public void ValidateSQLTranslationComplexData() inputs.Add(new LinqTestInput("SelectMany x -> Select y", b => getQuery(b).SelectMany(x => x.dblArray.Select(y => y)))); inputs.Add(new LinqTestInput("SelectMany x -> Select x.y", b => getQuery(b).SelectMany(x => x.dblArray.Select(y => y)))); inputs.Add(new LinqTestInput("SelectMany array", b => getQuery(b).SelectMany(x => x.dblArray))); + + inputs.Add(new LinqTestInput("Select where extensiondata", b => getQuery(b).Where(p => (int)p.NewtonsoftExtensionData["age"] > 18).Select(x => new { Age = (int)x.NewtonsoftExtensionData["age"] }))); + inputs.Add(new LinqTestInput("Select where extensiondata contains", b => getQuery(b).Where(p => ((string[])p.NewtonsoftExtensionData["tags"]).Contains("item-1")).Select(x => (string[])x.NewtonsoftExtensionData["tags"] ))); + + // TODO: SelectMany does not currently work with Dictionary objects, the snapshot represents + // the current (broken) behavior + inputs.Add(new LinqTestInput("SelectMany where extensiondata contains", b => getQuery(b).Where(p => ((string[])p.NewtonsoftExtensionData["tags"]).Contains("item-1")).SelectMany(x => (object[])x.NewtonsoftExtensionData["tags"] ))); + this.ExecuteTestSuite(inputs); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs index ca2e12c8da..8e50a21dd0 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Linq/CosmosLinqJsonConverterTests.cs @@ -5,6 +5,7 @@ namespace Microsoft.Azure.Cosmos.Linq { using System; + using System.Collections.Generic; using System.Globalization; using System.IO; using System.Linq; @@ -152,6 +153,35 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s } } + [TestMethod] + public void TestNewtonsoftExtensionDataQuery() + { + Expression> expr = a => (string)a.NewtonsoftExtensionData["foo"] == "bar"; + string sql = SqlTranslator.TranslateExpression(expr.Body); + + Assert.AreEqual("(a[\"foo\"] = \"bar\")", sql); + } + + [TestMethod] + public void TestSystemTextJsonExtensionDataQuery() + { + Expression> expr = a => ((object)a.NetExtensionData["foo"]) == "bar"; + string sql = SqlTranslator.TranslateExpression(expr.Body); + + // TODO: This is a limitation in the translator. It should be able to handle STJ extension data, if a custom + // JSON serializer is specified. + Assert.AreEqual("(a[\"NetExtensionData\"][\"foo\"] = \"bar\")", sql); + } + + class DocumentWithExtensionData + { + [Newtonsoft.Json.JsonExtensionData(ReadData = true, WriteData = true)] + public Dictionary NewtonsoftExtensionData { get; set; } + + [System.Text.Json.Serialization.JsonExtensionData()] + public Dictionary NetExtensionData { get; set; } + } + /// // See: https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/Microsoft.Azure.Cosmos.Samples/Usage/SystemTextJson/CosmosSystemTextJsonSerializer.cs /// From 3a1f46ba42ed08a65c1fc7eb47cea4020c469975 Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Tue, 27 Jun 2023 17:47:49 +0200 Subject: [PATCH 148/164] HttpTransport: Fixes HttpTimeoutPolicies to not accidentally suppress retries (#3944) * Fix HttpTimeoutPolicies to not accidentally suppress retries * Removing HttpTimeoutPolicy.MaxRetryTimeLimit altogether --- Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs | 3 +-- Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs | 1 - .../src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs | 2 -- .../HttpTimeoutPolicyControlPlaneRetriableHotPath.cs | 2 -- .../src/HttpClient/HttpTimeoutPolicyDefault.cs | 2 -- .../src/HttpClient/HttpTimeoutPolicyNoRetry.cs | 2 -- 6 files changed, 1 insertion(+), 11 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs index c29c3a5b94..0e7cc30c9e 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/CosmosHttpClientCore.cs @@ -438,8 +438,7 @@ private static bool IsOutOfRetries( DateTime startDateTimeUtc, IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> timeoutEnumerator) { - return (DateTime.UtcNow - startDateTimeUtc) > timeoutPolicy.MaximumRetryTimeLimit || // Maximum of time for all retries - !timeoutEnumerator.MoveNext(); // No more retries are configured + return !timeoutEnumerator.MoveNext(); // No more retries are configured } private async Task ExecuteHttpHelperAsync( diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs index fa2fc25bf7..42742f86c1 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicy.cs @@ -11,7 +11,6 @@ namespace Microsoft.Azure.Cosmos internal abstract class HttpTimeoutPolicy { public abstract string TimeoutPolicyName { get; } - public abstract TimeSpan MaximumRetryTimeLimit { get; } public abstract int TotalRetryCount { get; } public abstract IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> GetTimeoutEnumerator(); public abstract bool IsSafeToRetry(HttpMethod httpMethod); diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs index 757134a576..9f85ba33ab 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRead.cs @@ -25,8 +25,6 @@ private HttpTimeoutPolicyControlPlaneRead() public override string TimeoutPolicyName => HttpTimeoutPolicyControlPlaneRead.Name; - public override TimeSpan MaximumRetryTimeLimit => CosmosHttpClient.GatewayRequestTimeout; - public override int TotalRetryCount => this.TimeoutsAndDelays.Count; public override IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> GetTimeoutEnumerator() diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs index 8dbb8a2a44..53a7c78e9e 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyControlPlaneRetriableHotPath.cs @@ -29,8 +29,6 @@ private HttpTimeoutPolicyControlPlaneRetriableHotPath(bool shouldThrow503OnTimeo public override string TimeoutPolicyName => HttpTimeoutPolicyControlPlaneRetriableHotPath.Name; - public override TimeSpan MaximumRetryTimeLimit => CosmosHttpClient.GatewayRequestTimeout; - public override int TotalRetryCount => this.TimeoutsAndDelays.Count; public override IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> GetTimeoutEnumerator() diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs index 974509c70c..69a83707a1 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyDefault.cs @@ -29,8 +29,6 @@ private HttpTimeoutPolicyDefault(bool shouldThrow503OnTimeout) public override string TimeoutPolicyName => HttpTimeoutPolicyDefault.Name; - public override TimeSpan MaximumRetryTimeLimit => CosmosHttpClient.GatewayRequestTimeout; - public override int TotalRetryCount => this.TimeoutsAndDelays.Count; public override IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> GetTimeoutEnumerator() diff --git a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyNoRetry.cs b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyNoRetry.cs index 595498aec2..65ea12144b 100644 --- a/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyNoRetry.cs +++ b/Microsoft.Azure.Cosmos/src/HttpClient/HttpTimeoutPolicyNoRetry.cs @@ -24,8 +24,6 @@ private HttpTimeoutPolicyNoRetry() public override string TimeoutPolicyName => HttpTimeoutPolicyNoRetry.Name; - public override TimeSpan MaximumRetryTimeLimit => TimeSpan.Zero; - public override int TotalRetryCount => 0; public override IEnumerator<(TimeSpan requestTimeout, TimeSpan delayForNextRequest)> GetTimeoutEnumerator() From cf71ddd9103e2a375e46c93c5a3f1b35144e2038 Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Tue, 27 Jun 2023 09:56:29 -0700 Subject: [PATCH 149/164] SDK 3.35.1 : Adds version bump and changelog (#3945) * version bump * changelog * contract --- Directory.Build.props | 4 +- .../contracts/API_3.35.1-preview.txt | 1563 +++++++++++++++++ .../contracts/API_3.35.1.txt | 1502 ++++++++++++++++ changelog.md | 9 +- 4 files changed, 3075 insertions(+), 3 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.35.1-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.35.1.txt diff --git a/Directory.Build.props b/Directory.Build.props index eb4940bf4b..55a67ffec4 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.35.0 - 3.35.0 + 3.35.1 + 3.35.1 preview 3.31.2 2.0.2 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.35.1-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.35.1-preview.txt new file mode 100644 index 0000000000..6c989053fd --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.35.1-preview.txt @@ -0,0 +1,1563 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public sealed class ComputedProperty + { + public ComputedProperty(); + public string Name { get; set; } + public string Query { get; set; } + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public Collection ComputedProperties { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable BypassIntegratedCache { get; set; } + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public enum PriorityLevel + { + High = 1, + Low = 2, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public bool EnableOptimisticDirectExecution { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string IsraelCentral = "Israel Central"; + public const string ItalyNorth = "Italy North"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string MalaysiaSouth = "Malaysia South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public Nullable PriorityLevel { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ComputedPropertiesDefinition + { + public T Attach(); + public ComputedPropertiesDefinition WithComputedProperty(string name, string query); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public ComputedPropertiesDefinition WithComputedProperties(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.35.1.txt b/Microsoft.Azure.Cosmos/contracts/API_3.35.1.txt new file mode 100644 index 0000000000..c0dc3e280f --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.35.1.txt @@ -0,0 +1,1502 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string IsraelCentral = "Israel Central"; + public const string ItalyNorth = "Italy North"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string MalaysiaSouth = "Malaysia South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index bd5c29c32c..80a2d967c2 100644 --- a/changelog.md +++ b/changelog.md @@ -12,7 +12,14 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -### [3.35.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.0-preview) - 2023-06-19 + +### [3.35.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.1-preview) - 2023-06-27 +### [3.35.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.1) - 2023-06-27 + +#### Fixed +- [3944](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3944) Availability: Fixes HttpTimeoutPolicies to not accidentally suppress retries + +### [3.35.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.0-preview) - 2023-06-19 ### Added - [3836](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3836) Integrated cache: Adds BypassIntegratedCache to DedicatedGatewayRequestOptions From c2bf6409c923831171afc1c8790a18e66b8e2df0 Mon Sep 17 00:00:00 2001 From: Fabian Meiswinkel Date: Tue, 27 Jun 2023 19:11:01 +0200 Subject: [PATCH 150/164] [Internal] Changelog: Fixes recommended version and title (#3948) * SDK 3.35.1: Adds version bump and changelog * Update changelog.md * Update changelog.md * Update changelog.md * Update changelog.md * Update changelog.md --- changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 80a2d967c2..f72c7fd59f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,6 @@ ## Recommended version -The **minimum recommended version is [3.33.0](#3.33.0)**. +The **minimum recommended version is [3.33.0](#3.33.0) when using Direct mode and [3.35.1](#3.35.1) for Gateway mode**. Make sure that your applications, when using the .NET V3 SDK, are using at least the version described here to have all the critical fixes. @@ -21,7 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### [3.35.0-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.0-preview) - 2023-06-19 -### Added +#### Added - [3836](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3836) Integrated cache: Adds BypassIntegratedCache to DedicatedGatewayRequestOptions - [3909](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3909) Query: Adds EnableOptimisticDirectExecution in QueryRequestOptions enabled by default From a25730a77ab43a8e460ddc292f1a6d8eb193395a Mon Sep 17 00:00:00 2001 From: Matias Quaranta Date: Wed, 28 Jun 2023 09:45:30 -0700 Subject: [PATCH 151/164] [Internal] Dependencies: Fixes dependabot alert for System.Linq.Dynamic.Core (#3957) * Removing 1 * Removing 2 * Removing 3 --- ...Microsoft.Azure.Cosmos.Encryption.Custom.EmulatorTests.csproj | 1 - .../Microsoft.Azure.Cosmos.Encryption.EmulatorTests.csproj | 1 - .../Microsoft.Azure.Cosmos.EmulatorTests.csproj | 1 - 3 files changed, 3 deletions(-) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.Custom.EmulatorTests.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.Custom.EmulatorTests.csproj index d8dc8fb6a7..c5dfa8db0c 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.Custom.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.Custom.EmulatorTests.csproj @@ -26,7 +26,6 @@ - diff --git a/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.EmulatorTests.csproj b/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.EmulatorTests.csproj index 458cfb6849..0b7c24dbdd 100644 --- a/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos.Encryption/tests/EmulatorTests/Microsoft.Azure.Cosmos.Encryption.EmulatorTests.csproj @@ -26,7 +26,6 @@ - diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index 51891d7e3f..8b1aa3b149 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -54,7 +54,6 @@ - From 17f1b4eef8d6776b40a14fd3acf22c4ca64fb6a2 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Thu, 29 Jun 2023 19:06:53 -0700 Subject: [PATCH 152/164] [Internal] Upgrade Resiliency: Adds Code to Enable Replica Validation Feature for Preview (#3951) * Code changes to add replica validation feature in cosmos client options. * Code changes to upgrade the cosmos direct version to 3.31.3. * Adding emulator test to cover replica validation. * Code changes to address cosmetic clean ups. * Code changes to address review comments. Fixed preview build failures. * Code changes to enable replica validation for preview package by default. * Code changes to address review comments. * Code changes to fix preview unit tests. * Code changes to disable environment variable at the end of the test. --- Directory.Build.props | 2 +- Microsoft.Azure.Cosmos/src/DocumentClient.cs | 7 +- .../src/Routing/GatewayAddressCache.cs | 24 +- .../src/Routing/GlobalAddressResolver.cs | 7 +- .../src/Util/ConfigurationManager.cs | 30 +- .../ClientRetryPolicyTests.cs | 3 +- .../CosmosBadReplicaTests.cs | 291 ++++++++++-------- .../GatewayAddressCacheTests.cs | 30 +- .../RequestEventHandlerTests.cs | 2 +- .../StoreReaderTest.cs | 24 +- 10 files changed, 231 insertions(+), 189 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 55a67ffec4..71b854a5c7 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.35.1 3.35.1 preview - 3.31.2 + 3.31.3 2.0.2 2.0.2 preview diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index 068bb5b857..752ec8f5a5 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -113,6 +113,8 @@ internal partial class DocumentClient : IDisposable, IAuthorizationTokenProvider private const string DefaultInitTaskKey = "InitTaskKey"; private readonly bool IsLocalQuorumConsistency = false; + private readonly bool isReplicaAddressValidationEnabled; + //Auth internal readonly AuthorizationTokenProvider cosmosAuthorization; @@ -231,7 +233,7 @@ public DocumentClient(Uri serviceEndpoint, this.Initialize(serviceEndpoint, connectionPolicy, desiredConsistencyLevel); this.initTaskCache = new AsyncCacheNonBlocking(cancellationToken: this.cancellationTokenSource.Token); - + this.isReplicaAddressValidationEnabled = ConfigurationManager.IsReplicaAddressValidationEnabled(); } /// @@ -6700,7 +6702,8 @@ private void CreateStoreModel(bool subscribeRntbdStatus) this.ConnectionPolicy.EnableReadRequestsFallback ?? (this.accountServiceConfiguration.DefaultConsistencyLevel != Documents.ConsistencyLevel.BoundedStaleness), !this.enableRntbdChannel, this.UseMultipleWriteLocations && (this.accountServiceConfiguration.DefaultConsistencyLevel != Documents.ConsistencyLevel.Strong), - true); + true, + enableReplicaValidation: this.isReplicaAddressValidationEnabled); if (subscribeRntbdStatus) { diff --git a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs index f864256df9..a4dbb1d8a3 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GatewayAddressCache.cs @@ -66,7 +66,8 @@ public GatewayAddressCache( CosmosHttpClient httpClient, IOpenConnectionsHandler openConnectionsHandler, long suboptimalPartitionForceRefreshIntervalInSeconds = 600, - bool enableTcpConnectionEndpointRediscovery = false) + bool enableTcpConnectionEndpointRediscovery = false, + bool replicaAddressValidationEnabled = false) { this.addressEndpoint = new Uri(serviceEndpoint + "/" + Paths.AddressPathSegment); this.protocol = protocol; @@ -90,9 +91,7 @@ public GatewayAddressCache( GatewayAddressCache.ProtocolString(this.protocol)); this.openConnectionsHandler = openConnectionsHandler; - this.isReplicaAddressValidationEnabled = Helpers.GetEnvironmentVariable( - name: Constants.EnvironmentVariables.ReplicaConnectivityValidationEnabled, - defaultValue: false); + this.isReplicaAddressValidationEnabled = replicaAddressValidationEnabled; } public Uri ServiceEndpoint => this.serviceEndpoint; @@ -158,7 +157,8 @@ public async Task OpenConnectionsAsync( collectionRid: collection.ResourceId, partitionKeyRangeIds: partitionKeyRangeIdentities.Skip(i).Take(batchSize).Select(range => range.PartitionKeyRangeId), containerProperties: collection, - shouldOpenRntbdChannels: shouldOpenRntbdChannels)); + shouldOpenRntbdChannels: shouldOpenRntbdChannels, + cancellationToken: cancellationToken)); } } @@ -348,12 +348,14 @@ public async Task TryGetAddressesAsync( /// An instance of containing the list of partition key range ids. /// An instance of containing the collection properties. /// A boolean flag indicating whether Rntbd connections are required to be established to the backend replica nodes. + /// An instance of . private async Task WarmupCachesAndOpenConnectionsAsync( DocumentServiceRequest request, string collectionRid, IEnumerable partitionKeyRangeIds, ContainerProperties containerProperties, - bool shouldOpenRntbdChannels) + bool shouldOpenRntbdChannels, + CancellationToken cancellationToken) { TryCatch documentServiceResponseWrapper = await this.GetAddressesAsync( request: request, @@ -381,6 +383,11 @@ private async Task WarmupCachesAndOpenConnectionsAsync( List openConnectionTasks = new (); foreach (Tuple addressInfo in addressInfos) { + if (cancellationToken.IsCancellationRequested) + { + break; + } + this.serverPartitionAddressCache.Set( new PartitionKeyRangeIdentity(containerProperties.ResourceId, addressInfo.Item1.PartitionKeyRangeId), addressInfo.Item2); @@ -398,10 +405,7 @@ private async Task WarmupCachesAndOpenConnectionsAsync( } } - if (openConnectionTasks.Any()) - { - await Task.WhenAll(openConnectionTasks); - } + await Task.WhenAll(openConnectionTasks); } } catch (Exception ex) diff --git a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs index 344f994395..8ac0719dcd 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs @@ -27,7 +27,6 @@ namespace Microsoft.Azure.Cosmos.Routing internal sealed class GlobalAddressResolver : IAddressResolverExtension, IDisposable { private const int MaxBackupReadRegions = 3; - private readonly GlobalEndpointManager endpointManager; private readonly GlobalPartitionEndpointManager partitionKeyRangeLocationCache; private readonly Protocol protocol; @@ -39,6 +38,7 @@ internal sealed class GlobalAddressResolver : IAddressResolverExtension, IDispos private readonly CosmosHttpClient httpClient; private readonly ConcurrentDictionary addressCacheByEndpoint; private readonly bool enableTcpConnectionEndpointRediscovery; + private readonly bool isReplicaAddressValidationEnabled; private IOpenConnectionsHandler openConnectionsHandler; public GlobalAddressResolver( @@ -67,6 +67,8 @@ public GlobalAddressResolver( this.enableTcpConnectionEndpointRediscovery = connectionPolicy.EnableTcpConnectionEndpointRediscovery; + this.isReplicaAddressValidationEnabled = ConfigurationManager.IsReplicaAddressValidationEnabled(); + this.maxEndpoints = maxBackupReadEndpoints + 2; // for write and alternate write endpoint (during failover) this.addressCacheByEndpoint = new ConcurrentDictionary(); @@ -281,7 +283,8 @@ private EndpointCache GetOrAddEndpoint(Uri endpoint) this.serviceConfigReader, this.httpClient, this.openConnectionsHandler, - enableTcpConnectionEndpointRediscovery: this.enableTcpConnectionEndpointRediscovery); + enableTcpConnectionEndpointRediscovery: this.enableTcpConnectionEndpointRediscovery, + replicaAddressValidationEnabled: this.isReplicaAddressValidationEnabled); string location = this.endpointManager.GetLocation(endpoint); AddressResolver addressResolver = new AddressResolver(null, new NullRequestSigner(), location); diff --git a/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs b/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs index 4e9e8fde84..ed0f5a47a6 100644 --- a/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs +++ b/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs @@ -7,7 +7,14 @@ namespace Microsoft.Azure.Cosmos using System; internal static class ConfigurationManager - { + { + /// + /// A read-only string containing the environment variablename for enabling replica validation. + /// This will eventually be removed oncereplica valdiatin is enabled by default for both preview + /// and GA. + /// + internal static readonly string ReplicaConnectivityValidationEnabled = "AZURE_COSMOS_REPLICA_VALIDATION_ENABLED"; + public static T GetEnvironmentVariable(string variable, T defaultValue) { string value = Environment.GetEnvironmentVariable(variable); @@ -17,5 +24,26 @@ public static T GetEnvironmentVariable(string variable, T defaultValue) } return (T)Convert.ChangeType(value, typeof(T)); } + + /// + /// Gets the boolean value of the replica validation environment variable. Note that, replica validation + /// is enabled by default for the preview package and disabled for GA at the moment. The user can set the + /// respective environment variable 'AZURE_COSMOS_REPLICA_VALIDATION_ENABLED' to override the value for + /// both preview and GA. The method will eventually be removed, once replica valdiatin is enabled by default + /// for both preview and GA. + /// + /// A boolean flag indicating if replica validation is enabled. + public static bool IsReplicaAddressValidationEnabled() + { + bool replicaValidationDefaultValue = false; +#if PREVIEW + replicaValidationDefaultValue = true; +#endif + + return ConfigurationManager + .GetEnvironmentVariable( + variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, + defaultValue: replicaValidationDefaultValue); + } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs index a41f08afa1..0851952f40 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/ClientRetryPolicyTests.cs @@ -209,7 +209,8 @@ private async Task ValidateConnectTimeoutTriggersClientRetryPolicy( enableReadRequestsFallback: false, useMultipleWriteLocations: useMultipleWriteLocations, detectClientConnectivityIssues: true, - disableRetryWithRetryPolicy: false); + disableRetryWithRetryPolicy: false, + enableReplicaValidation: false); // Reducing retry timeout to avoid long-running tests replicatedResourceClient.GoneAndRetryWithRetryTimeoutInSecondsOverride = 1; diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs index 3ef86568b8..7a5b387e8e 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs @@ -6,7 +6,6 @@ namespace Microsoft.Azure.Cosmos.Tests { using System; using System.Collections.Generic; - using System.Globalization; using System.IO; using System.Linq; using System.Net; @@ -14,44 +13,50 @@ namespace Microsoft.Azure.Cosmos.Tests using System.Text; using System.Threading; using System.Threading.Tasks; - using global::Azure.Core; - using Microsoft.Azure.Cosmos.Fluent; using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; - using Newtonsoft.Json.Linq; [TestClass] public class CosmosBadReplicaTests { [TestMethod] [Timeout(30000)] - public async Task TestGoneFromServiceScenarioAsync() + [DataRow(true, DisplayName = "Validate when replica validation is enabled.")] + [DataRow(false, DisplayName = "Validate when replica validation is disabled.")] + public async Task TestGoneFromServiceScenarioAsync( + bool enableReplicaValidation) { - Mock mockHttpHandler = new Mock(MockBehavior.Strict); - Uri endpoint = MockSetupsHelper.SetupSingleRegionAccount( - "mockAccountInfo", - consistencyLevel: ConsistencyLevel.Session, - mockHttpHandler, - out string primaryRegionEndpoint); - - string databaseName = "mockDbName"; - string containerName = "mockContainerName"; - string containerRid = "ccZ1ANCszwk="; - Documents.ResourceId cRid = Documents.ResourceId.Parse(containerRid); - MockSetupsHelper.SetupContainerProperties( - mockHttpHandler: mockHttpHandler, - regionEndpoint: primaryRegionEndpoint, - databaseName: databaseName, - containerName: containerName, - containerRid: containerRid); - - MockSetupsHelper.SetupSinglePartitionKeyRange( - mockHttpHandler, - primaryRegionEndpoint, - cRid, - out IReadOnlyList partitionKeyRanges); - - List replicaIds1 = new List() + try + { + Environment.SetEnvironmentVariable( + variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, + value: enableReplicaValidation.ToString()); + + Mock mockHttpHandler = new Mock(MockBehavior.Strict); + Uri endpoint = MockSetupsHelper.SetupSingleRegionAccount( + "mockAccountInfo", + consistencyLevel: ConsistencyLevel.Session, + mockHttpHandler, + out string primaryRegionEndpoint); + + string databaseName = "mockDbName"; + string containerName = "mockContainerName"; + string containerRid = "ccZ1ANCszwk="; + Documents.ResourceId cRid = Documents.ResourceId.Parse(containerRid); + MockSetupsHelper.SetupContainerProperties( + mockHttpHandler: mockHttpHandler, + regionEndpoint: primaryRegionEndpoint, + databaseName: databaseName, + containerName: containerName, + containerRid: containerRid); + + MockSetupsHelper.SetupSinglePartitionKeyRange( + mockHttpHandler, + primaryRegionEndpoint, + cRid, + out IReadOnlyList partitionKeyRanges); + + List replicaIds1 = new List() { "11111111111111111", "22222222222222222", @@ -59,14 +64,14 @@ public async Task TestGoneFromServiceScenarioAsync() "44444444444444444", }; - HttpResponseMessage replicaSet1 = MockSetupsHelper.CreateAddresses( - replicaIds1, - partitionKeyRanges.First(), - "eastus", - cRid); + HttpResponseMessage replicaSet1 = MockSetupsHelper.CreateAddresses( + replicaIds1, + partitionKeyRanges.First(), + "eastus", + cRid); - // One replica changed on the refresh - List replicaIds2 = new List() + // One replica changed on the refresh + List replicaIds2 = new List() { "11111111111111111", "22222222222222222", @@ -74,118 +79,134 @@ public async Task TestGoneFromServiceScenarioAsync() "55555555555555555", }; - HttpResponseMessage replicaSet2 = MockSetupsHelper.CreateAddresses( - replicaIds2, - partitionKeyRanges.First(), - "eastus", - cRid); - - bool delayCacheRefresh = true; - bool delayRefreshUnblocked = false; - mockHttpHandler.SetupSequence(x => x.SendAsync( - It.Is(r => r.RequestUri.ToString().Contains("addresses")), It.IsAny())) - .Returns(Task.FromResult(replicaSet1)) - .Returns(async ()=> + HttpResponseMessage replicaSet2 = MockSetupsHelper.CreateAddresses( + replicaIds2, + partitionKeyRanges.First(), + "eastus", + cRid); + + bool delayCacheRefresh = true; + bool delayRefreshUnblocked = false; + mockHttpHandler.SetupSequence(x => x.SendAsync( + It.Is(r => r.RequestUri.ToString().Contains("addresses")), It.IsAny())) + .Returns(Task.FromResult(replicaSet1)) + .Returns(async ()=> + { + //block cache refresh to verify bad replica is not visited during refresh + while (delayCacheRefresh) + { + await Task.Delay(TimeSpan.FromMilliseconds(20)); + } + + delayRefreshUnblocked = true; + return replicaSet2; + }); + + int callBack = 0; + List urisVisited = new List(); + Mock mockTransportClient = new Mock(MockBehavior.Strict); + mockTransportClient.Setup(x => x.InvokeResourceOperationAsync(It.IsAny(), It.IsAny())) + .Callback((t, _) => urisVisited.Add(t)) + .Returns(() => { - //block cache refresh to verify bad replica is not visited during refresh - while (delayCacheRefresh) + callBack++; + if (callBack == 1) { - await Task.Delay(TimeSpan.FromMilliseconds(20)); + throw Documents.Rntbd.TransportExceptions.GetGoneException( + new Uri("https://localhost:8081"), + Guid.NewGuid(), + new Documents.TransportException(Documents.TransportErrorCode.ConnectionBroken, + null, + Guid.NewGuid(), + new Uri("https://localhost:8081"), + "Mock", + userPayload: true, + payloadSent: false)); } - delayRefreshUnblocked = true; - return replicaSet2; - }); - - int callBack = 0; - List urisVisited = new List(); - Mock mockTransportClient = new Mock(MockBehavior.Strict); - mockTransportClient.Setup(x => x.InvokeResourceOperationAsync(It.IsAny(), It.IsAny())) - .Callback((t, _) => urisVisited.Add(t)) - .Returns(() => - { - callBack++; - if (callBack == 1) - { - throw Documents.Rntbd.TransportExceptions.GetGoneException( - new Uri("https://localhost:8081"), - Guid.NewGuid(), - new Documents.TransportException(Documents.TransportErrorCode.ConnectionBroken, - null, - Guid.NewGuid(), - new Uri("https://localhost:8081"), - "Mock", - userPayload: true, - payloadSent: false)); - } - - return Task.FromResult(new Documents.StoreResponse() - { - Status = 200, - Headers = new Documents.Collections.StoreResponseNameValueCollection() + return Task.FromResult(new Documents.StoreResponse() { - ActivityId = Guid.NewGuid().ToString(), - LSN = "12345", - PartitionKeyRangeId = "0", - GlobalCommittedLSN = "12345", - SessionToken = "1#12345#1=12345" - }, - ResponseBody = new MemoryStream() + Status = 200, + Headers = new Documents.Collections.StoreResponseNameValueCollection() + { + ActivityId = Guid.NewGuid().ToString(), + LSN = "12345", + PartitionKeyRangeId = "0", + GlobalCommittedLSN = "12345", + SessionToken = "1#12345#1=12345" + }, + ResponseBody = new MemoryStream() + }); }); - }); - - CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() - { - ConsistencyLevel = Cosmos.ConsistencyLevel.Session, - HttpClientFactory = () => new HttpClient(new HttpHandlerHelper(mockHttpHandler.Object)), - TransportClientHandlerFactory = (original) => mockTransportClient.Object, - }; - using (CosmosClient customClient = new CosmosClient( - endpoint.ToString(), - Convert.ToBase64String(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())), - cosmosClientOptions)) - { - try + CosmosClientOptions cosmosClientOptions = new CosmosClientOptions() { - Container container = customClient.GetContainer(databaseName, containerName); - - for (int i = 0; i < 20; i++) + ConsistencyLevel = Cosmos.ConsistencyLevel.Session, + HttpClientFactory = () => new HttpClient(new HttpHandlerHelper(mockHttpHandler.Object)), + TransportClientHandlerFactory = (original) => mockTransportClient.Object, + }; + + using (CosmosClient customClient = new CosmosClient( + endpoint.ToString(), + Convert.ToBase64String(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())), + cosmosClientOptions)) + { + try { - ResponseMessage response = await container.ReadItemStreamAsync(Guid.NewGuid().ToString(), new Cosmos.PartitionKey(Guid.NewGuid().ToString())); - Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + Container container = customClient.GetContainer(databaseName, containerName); + + for (int i = 0; i < 20; i++) + { + ResponseMessage response = await container.ReadItemStreamAsync(Guid.NewGuid().ToString(), new Cosmos.PartitionKey(Guid.NewGuid().ToString())); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + } + + mockTransportClient.VerifyAll(); + mockHttpHandler.VerifyAll(); + + Documents.TransportAddressUri failedReplica = urisVisited.First(); + + // With replica validation enabled in preview mode, the failed replica will be validated as a part of the flow, + // and because any subsequent validation/ connection will be successful, the failed replica will now be marked + // as connected, thus it will be visited more than once. However, note that when replice validation is disabled, + // no validation is done thus the URI will be marked as unhealthy as expected. Therefore the uri will be visited + // just once. + Assert.IsTrue( + enableReplicaValidation + ? urisVisited.Any(x => x.Equals(failedReplica)) + : urisVisited.Count(x => x.Equals(failedReplica)) == 1); + + urisVisited.Clear(); + delayCacheRefresh = false; + do + { + await Task.Delay(TimeSpan.FromMilliseconds(100)); + }while (!delayRefreshUnblocked); + + for (int i = 0; i < 20; i++) + { + ResponseMessage response = await container.ReadItemStreamAsync(Guid.NewGuid().ToString(), new Cosmos.PartitionKey(Guid.NewGuid().ToString())); + Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + } + + Assert.AreEqual(4, urisVisited.ToHashSet().Count()); + + // Clears all the setups. No network calls should be done on the next operation. + mockHttpHandler.Reset(); + mockTransportClient.Reset(); } - - mockTransportClient.VerifyAll(); - mockHttpHandler.VerifyAll(); - - Documents.TransportAddressUri failedReplica = urisVisited.First(); - Assert.AreEqual(1, urisVisited.Count(x => x.Equals(failedReplica))); - - urisVisited.Clear(); - delayCacheRefresh = false; - do - { - await Task.Delay(TimeSpan.FromMilliseconds(100)); - }while (!delayRefreshUnblocked); - - for (int i = 0; i < 20; i++) + finally { - ResponseMessage response = await container.ReadItemStreamAsync(Guid.NewGuid().ToString(), new Cosmos.PartitionKey(Guid.NewGuid().ToString())); - Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); + mockTransportClient.Setup(x => x.Dispose()); } - - Assert.AreEqual(4, urisVisited.ToHashSet().Count()); - - // Clears all the setups. No network calls should be done on the next operation. - mockHttpHandler.Reset(); - mockTransportClient.Reset(); - } - finally - { - mockTransportClient.Setup(x => x.Dispose()); } } + finally + { + Environment.SetEnvironmentVariable( + variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, + value: null); + } } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs index 296c131fbf..c855599465 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/GatewayAddressCacheTests.cs @@ -1000,19 +1000,8 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabled_ShouldValidat MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), openConnectionsHandler: fakeOpenConnectionHandler, suboptimalPartitionForceRefreshIntervalInSeconds: 2, - enableTcpConnectionEndpointRediscovery: true); - - // By default, the replica validation feature is disabled in GatewayAddressCache. Reflection is used to enable the feature - // for the purpose of this test. - FieldInfo fieldInfo = cache - .GetType() - .GetField( - name: "isReplicaAddressValidationEnabled", - bindingAttr: BindingFlags.Instance | BindingFlags.NonPublic); - - fieldInfo.SetValue( - obj: cache, - value: true); + enableTcpConnectionEndpointRediscovery: true, + replicaAddressValidationEnabled: true); DocumentServiceRequest request = DocumentServiceRequest.Create(OperationType.Invalid, ResourceType.Address, AuthorizationTokenType.Invalid); @@ -1156,19 +1145,8 @@ public async Task TryGetAddressesAsync_WhenReplicaVlidationEnabledAndUnhealthyUr MockCosmosUtil.CreateCosmosHttpClient(() => httpClient), openConnectionsHandler: fakeOpenConnectionHandler, suboptimalPartitionForceRefreshIntervalInSeconds: 2, - enableTcpConnectionEndpointRediscovery: true); - - // By default, the replica validation feature is disabled in GatewayAddressCache. Reflection is used to enable the feature - // for the purpose of this test. - FieldInfo fieldInfo = cache - .GetType() - .GetField( - name: "isReplicaAddressValidationEnabled", - bindingAttr: BindingFlags.Instance | BindingFlags.NonPublic); - - fieldInfo.SetValue( - obj: cache, - value: true); + enableTcpConnectionEndpointRediscovery: true, + replicaAddressValidationEnabled: true); DocumentServiceRequest request = DocumentServiceRequest.Create(OperationType.Invalid, ResourceType.Address, AuthorizationTokenType.Invalid); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/RequestEventHandlerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/RequestEventHandlerTests.cs index f5602a1f29..9a19fb4a90 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/RequestEventHandlerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/RequestEventHandlerTests.cs @@ -82,7 +82,7 @@ private StoreClient GetMockStoreClient() TransportClient mockTransportClient = this.GetMockTransportClient(); ISessionContainer sessionContainer = new SessionContainer(string.Empty); - StoreReader storeReader = new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), sessionContainer); + StoreReader storeReader = new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), sessionContainer, false); Mock mockAuthorizationTokenProvider = new Mock(); mockAuthorizationTokenProvider.Setup(provider => provider.AddSystemAuthorizationHeaderAsync( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs index b92ca3c804..831e32041a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/StoreReaderTest.cs @@ -536,7 +536,8 @@ public void StoreReaderBarrierTest() new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), - sessionContainer); + sessionContainer, + enableReplicaValidation: false); // reads always go to read quorum (2) replicas int replicaCountToRead = 2; @@ -611,14 +612,14 @@ public void GlobalStrongConsistentWriteMockTest() for (int i = 0; i < addressInformation.Length; i++) { TransportClient mockTransportClient = this.GetMockTransportClientForGlobalStrongWrites(addressInformation, i, false, false, false); - StoreReader storeReader = new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), sessionContainer); - ConsistencyWriter consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false); + StoreReader storeReader = new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), sessionContainer, false); + ConsistencyWriter consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false, false); StoreResponse response = consistencyWriter.WriteAsync(entity, new TimeoutHelper(TimeSpan.FromSeconds(30)), false).Result; Assert.AreEqual(100, response.LSN); //globalCommittedLsn never catches up in this case mockTransportClient = this.GetMockTransportClientForGlobalStrongWrites(addressInformation, i, true, false, false); - consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false); + consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false, false); try { response = consistencyWriter.WriteAsync(entity, new TimeoutHelper(TimeSpan.FromSeconds(30)), false).Result; @@ -629,17 +630,17 @@ public void GlobalStrongConsistentWriteMockTest() } mockTransportClient = this.GetMockTransportClientForGlobalStrongWrites(addressInformation, i, false, true, false); - consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false); + consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false, false); response = consistencyWriter.WriteAsync(entity, new TimeoutHelper(TimeSpan.FromSeconds(30)), false).Result; Assert.AreEqual(100, response.LSN); mockTransportClient = this.GetMockTransportClientForGlobalStrongWrites(addressInformation, i, false, true, true); - consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false); + consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false, false); response = consistencyWriter.WriteAsync(entity, new TimeoutHelper(TimeSpan.FromSeconds(30)), false).Result; Assert.AreEqual(100, response.LSN); mockTransportClient = this.GetMockTransportClientForGlobalStrongWrites(addressInformation, i, false, false, true); - consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false); + consistencyWriter = new ConsistencyWriter(addressSelector, sessionContainer, mockTransportClient, mockServiceConfigReader.Object, mockAuthorizationTokenProvider.Object, false, false); response = consistencyWriter.WriteAsync(entity, new TimeoutHelper(TimeSpan.FromSeconds(30)), false).Result; Assert.AreEqual(100, response.LSN); } @@ -703,7 +704,8 @@ public void GlobalStrongConsistencyMockTest() new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), - sessionContainer); + sessionContainer, + false); Mock mockAuthorizationTokenProvider = new Mock(); mockAuthorizationTokenProvider.Setup(provider => provider.AddSystemAuthorizationHeaderAsync( @@ -746,7 +748,8 @@ public void GlobalStrongConsistencyMockTest() new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), - sessionContainer); + sessionContainer, + false); Mock mockAuthorizationTokenProvider = new Mock(); mockAuthorizationTokenProvider.Setup(provider => provider.AddSystemAuthorizationHeaderAsync( @@ -798,7 +801,8 @@ public void GlobalStrongConsistencyMockTest() new StoreReader(mockTransportClient, addressSelector, new AddressEnumerator(), - sessionContainer); + sessionContainer, + false); Mock mockAuthorizationTokenProvider = new Mock(); mockAuthorizationTokenProvider.Setup(provider => provider.AddSystemAuthorizationHeaderAsync( From 077acf3e1a172406fb660af6dea6372e0f5a54c0 Mon Sep 17 00:00:00 2001 From: vipulvishal-ms <110802706+vipulvishal-ms@users.noreply.github.com> Date: Tue, 4 Jul 2023 15:31:20 +0530 Subject: [PATCH 153/164] Client Encryption: Adds package reference Microsoft.Azure.Cosmos version 3.35.1-preview (#3956) * changing cosmos preview version * updating build file --------- Co-authored-by: Matias Quaranta --- Directory.Build.props | 2 +- Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md | 5 +++++ .../src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index 71b854a5c7..51d6237854 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ 2.0.2 2.0.2 preview - 1.0.0-preview05 + 1.0.0-preview06 1.1.0-preview3 10.0 $([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../')) diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md b/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md index 58fcf1d790..a96c9c325b 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/changelog.md @@ -3,6 +3,11 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +### [1.0.0-preview06](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview06) - 2023-06-28 + +#### Fixes +- [#3956](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3956) Updates package reference Microsoft.Azure.Cosmos to version 3.35.1-preview. + ### [1.0.0-preview05](https://www.nuget.org/packages/Microsoft.Azure.Cosmos.Encryption.Custom/1.0.0-preview05) - 2023-04-27 #### Fixes diff --git a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj index 09b92aa37e..a9f729c9ab 100644 --- a/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj +++ b/Microsoft.Azure.Cosmos.Encryption.Custom/src/Microsoft.Azure.Cosmos.Encryption.Custom.csproj @@ -27,7 +27,7 @@ - + From 0d4e93f932064b1287e64b091687eabb615f7eec Mon Sep 17 00:00:00 2001 From: "microsoft-github-policy-service[bot]" <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> Date: Thu, 6 Jul 2023 09:36:56 -0700 Subject: [PATCH 154/164] [Internal] FabricBot: Adds GitOps.ResourceManagement because of FabricBot decommissioning (#3966) * Add prIssueManagement.yml to onboard repo to GitOps.ResourceManagement as FabricBot replacement Owners of the FabricBot configuration should have received email notification. The same information contained in the email is published internally at: https://aka.ms/gim/fabricbot. Details on the replacement service and the syntax of the new yaml configuration file is available publicly at: https://microsoft.github.io/GitOps/policies/resource-management.html Please review and merge this PR to complete the process of onboarding to the new service. * Deleting fabricbot.json --------- Co-authored-by: microsoft-github-policy-service[bot] <77245923+microsoft-github-policy-service[bot]@users.noreply.github.com> --- .github/fabricbot.json | 183 ------------------------ .github/policies/resourceManagement.yml | 57 ++++++++ 2 files changed, 57 insertions(+), 183 deletions(-) delete mode 100644 .github/fabricbot.json create mode 100644 .github/policies/resourceManagement.yml diff --git a/.github/fabricbot.json b/.github/fabricbot.json deleted file mode 100644 index e400139553..0000000000 --- a/.github/fabricbot.json +++ /dev/null @@ -1,183 +0,0 @@ -{ - "version": "1.0", - "tasks": [ - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 0, - "hours": [], - "timezoneOffset": -8 - } - ], - "searchTerms": [ - { - "name": "noActivitySince", - "parameters": { - "days": 180 - } - }, - { - "name": "noLabel", - "parameters": { - "label": "VNext" - } - }, - { - "name": "noLabel", - "parameters": { - "label": "feature-request" - } - } - ], - "taskName": "CosmosV3-InactivePruge", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "Closing due to in-activity, pease feel free to re-open." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - }, - "disabled": true - }, - { - "taskType": "trigger", - "capabilityId": "IssueResponder", - "subCapability": "IssuesOnlyResponder", - "version": "1.0", - "config": { - "conditions": { - "operator": "and", - "operands": [ - { - "operator": "not", - "operands": [ - { - "name": "isAssignedToSomeone", - "parameters": {} - } - ] - }, - { - "name": "isAction", - "parameters": { - "action": "opened" - } - }, - { - "operator": "not", - "operands": [ - { - "name": "hasLabel", - "parameters": { - "label": "needs-investigation" - } - } - ] - } - ] - }, - "eventType": "issue", - "eventNames": [ - "issues", - "project_card" - ], - "taskName": "Add needs-investigation", - "actions": [ - { - "name": "addLabel", - "parameters": { - "label": "needs-investigation" - } - } - ] - } - }, - { - "taskType": "trigger", - "capabilityId": "AutoMerge", - "subCapability": "AutoMerge", - "version": "1.0", - "config": { - "taskName": "PR Automerge", - "allowAutoMergeInstructionsWithoutLabel": false, - "mergeType": "squash", - "deleteBranches": true, - "removeLabelOnPush": true, - "label": "auto-merge", - "requireAllStatuses": false, - "requireSpecificCheckRuns": false, - "usePrDescriptionAsCommitMessage": false, - "minMinutesOpen": "60", - "enforceDMPAsStatus": true - } - }, - { - "taskType": "scheduled", - "capabilityId": "ScheduledSearch", - "subCapability": "ScheduledSearch", - "version": "1.1", - "config": { - "frequency": [ - { - "weekDay": 1, - "hours": [ - 9 - ], - "timezoneOffset": -7 - } - ], - "searchTerms": [ - { - "name": "isOpen", - "parameters": {} - }, - { - "name": "isIssue", - "parameters": {} - }, - { - "name": "hasLabel", - "parameters": { - "label": "needs-more-information" - } - }, - { - "name": "noActivitySince", - "parameters": { - "days": 14 - } - }, - { - "name": "noAssignees", - "parameters": {} - } - ], - "taskName": "Close inactive needs-information", - "actions": [ - { - "name": "addReply", - "parameters": { - "comment": "@${issueAuthor} this issue requires more information for the team to be able to help. In case this information is available, please add it and re-open the Issue." - } - }, - { - "name": "closeIssue", - "parameters": {} - } - ] - } - } - ], - "userGroups": [] -} diff --git a/.github/policies/resourceManagement.yml b/.github/policies/resourceManagement.yml new file mode 100644 index 0000000000..8207a0708a --- /dev/null +++ b/.github/policies/resourceManagement.yml @@ -0,0 +1,57 @@ +id: +name: GitOps.PullRequestIssueManagement +description: GitOps.PullRequestIssueManagement primitive +owner: +resource: repository +disabled: false +where: +configuration: + resourceManagementConfiguration: + scheduledSearches: + - description: + frequencies: + - weekday: + day: Monday + time: 9:0 + filters: + - isOpen + - isIssue + - hasLabel: + label: needs-more-information + - noActivitySince: + days: 14 + - isNotAssigned + actions: + - addReply: + reply: '@${issueAuthor} this issue requires more information for the team to be able to help. In case this information is available, please add it and re-open the Issue.' + - closeIssue + eventResponderTasks: + - if: + - payloadType: Issues + - not: isAssignedToSomeone + - isAction: + action: Opened + - not: + hasLabel: + label: needs-investigation + then: + - addLabel: + label: needs-investigation + description: + - if: + - payloadType: Pull_Request + - hasLabel: + label: auto-merge + then: + - enableAutoMerge: + mergeMethod: Squash + description: + - if: + - payloadType: Pull_Request + - labelRemoved: + label: auto-merge + then: + - disableAutoMerge + description: +onFailure: +onSuccess: From 1981fc121408deff3204d50e941dbf4825e035f6 Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Fri, 7 Jul 2023 13:59:49 -0700 Subject: [PATCH 155/164] [Internal] Query: Refactors certain tests to not fail when EnableOptimisticDirectExecution is set to true in 3.35.0-preview package (#3955) * Updated emulator and baseline tests to not fail when ODE is set to default true in PREVIEW mode * Fixed QueryAsync() test * Fixed QueryAsync() in EndToEndTraceBaselineTests * Undid changes to IndexMetrics baseline file * Updated EndToEndTraceWriterBaselineTests.QueryAsync xml * Updated xml * Updated xml to have request options tag --- ...EndTraceWriterBaselineTests.QueryAsync.xml | 21 +++++++++----- .../CosmosBasicQueryTests.cs | 10 +++++-- .../CosmosGatewayTimeoutTests.cs | 9 +++++- .../CosmosItemSessionTokenTests.cs | 5 +++- .../CosmosJsonSerializerTests.cs | 12 ++++++-- .../FeedToken/QueryFeedTokenTests.cs | 7 ++++- .../LinqTestsCommon.cs | 18 ++++++++++-- .../LinqTranslationBaselineTests.cs | 8 ++++- .../Query/AggregateQueryTests.cs | 3 ++ .../Query/SanityQueryTests.cs | 6 ++++ .../EndToEndTraceWriterBaselineTests.cs | 29 ++++++++++++++----- 11 files changed, 103 insertions(+), 25 deletions(-) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml index 8b737a419e..d6d638fd47 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.QueryAsync.xml @@ -4,7 +4,8 @@ Query traces = new List(); while (feedIterator.HasMoreResults) @@ -696,7 +697,8 @@ Query Typed feedIterator = (FeedIteratorInternal)container.GetItemQueryIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); while (feedIterator.HasMoreResults) @@ -1408,7 +1410,8 @@ Query Public API traces = new List(); @@ -2101,7 +2104,8 @@ Query Public API Typed feedIterator = container.GetItemQueryIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); @@ -2816,7 +2820,8 @@ Lazy currentLazy = Documents.ServiceInteropWrapper.AssembliesExist; Documents.ServiceInteropWrapper.AssembliesExist = new Lazy(() => false); FeedIterator feedIterator = container.GetItemQueryIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); @@ -3596,7 +3601,8 @@ FeedIterator feedIterator = container.GetItemQueryStreamIterator( feedRange: FeedRangeEpk.FullRange, queryDefinition: new QueryDefinition("SELECT * FROM c"), - continuationToken: null); + continuationToken: null, + requestOptions: requestOptions); List traces = new List(); @@ -4298,7 +4304,8 @@ FeedIterator feedIterator = container.GetItemQueryIterator( feedRange: FeedRangeEpk.FullRange, queryDefinition: new QueryDefinition("SELECT * FROM c"), - continuationToken: null); + continuationToken: null, + requestOptions: requestOptions); List traces = new List(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs index 7ae2b28cc6..25ac9a705f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosBasicQueryTests.cs @@ -240,7 +240,10 @@ public async Task QueryRequestRateTest(bool directMode) requestOptions: new QueryRequestOptions() { MaxItemCount = 1, - MaxConcurrency = 1 + MaxConcurrency = 1, +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif })) { while (feedIterator.HasMoreResults) @@ -268,7 +271,10 @@ public async Task QueryRequestRateTest(bool directMode) requestOptions: new QueryRequestOptions() { MaxItemCount = 1, - MaxConcurrency = 1 + MaxConcurrency = 1, +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif }); // First request should be a success diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs index f50319f65f..241b60fb7f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosGatewayTimeoutTests.cs @@ -81,7 +81,14 @@ public async Task QueryPlanRetryTimeoutTestAsync() } }; - using FeedIterator iterator = gatewayQueryPlanContainer.GetItemQueryIterator("select * From T order by T.status"); + QueryRequestOptions requestOptions = new QueryRequestOptions() + { +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif + }; + + using FeedIterator iterator = gatewayQueryPlanContainer.GetItemQueryIterator("select * From T order by T.status", requestOptions: requestOptions); FeedResponse response = await iterator.ReadNextAsync(); Assert.IsTrue(isQueryRequestFound, "Query plan call back was not called."); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs index f815eba08e..c76110f1fb 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemSessionTokenTests.cs @@ -366,7 +366,10 @@ public async Task InvalidSessionTokenAfterContainerRecreationAndCollectionCacheR new QueryRequestOptions { ConsistencyLevel = Cosmos.ConsistencyLevel.Session, - PartitionKey = new Cosmos.PartitionKey(pk) + PartitionKey = new Cosmos.PartitionKey(pk), +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif }); int itemCountOldContainer = 0; while (queryIteratorOldContainer.HasMoreResults) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs index 0be44fbc1c..eadb62da7c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosJsonSerializerTests.cs @@ -98,7 +98,11 @@ public async Task TestQueryWithCustomJsonSerializer() fromStreamCount = 0; FeedIterator itemIterator = container.GetItemQueryIterator( - query); + query +#if PREVIEW + , requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } +#endif + ); List items = new List(); while (itemIterator.HasMoreResults) { @@ -113,7 +117,11 @@ public async Task TestQueryWithCustomJsonSerializer() // Verify that the custom serializer is actually being used via stream FeedIterator itemStreamIterator = container.GetItemQueryStreamIterator( - query); + query +#if PREVIEW + , requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } +#endif + ); while (itemStreamIterator.HasMoreResults) { ResponseMessage response = await itemStreamIterator.ReadNextAsync(); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs index df61615fe6..ce9723e7ee 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/FeedToken/QueryFeedTokenTests.cs @@ -101,7 +101,12 @@ public async Task InexistentPKRangeId() FeedIterator feedIterator = container.GetItemQueryIterator( queryDefinition: new QueryDefinition("select * from T where STARTSWITH(T.id, \"BasicItem\")"), feedRange: feedRange, - continuationToken: null); + continuationToken: null + +#if PREVIEW + , requestOptions: new QueryRequestOptions() { EnableOptimisticDirectExecution = false } +#endif + ); CosmosException exception = await Assert.ThrowsExceptionAsync(() => feedIterator.ReadNextAsync()); Assert.AreEqual(HttpStatusCode.Gone, exception.StatusCode); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs index 5907d861fc..87b33110e2 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTestsCommon.cs @@ -296,7 +296,14 @@ public static Func> GenerateTestCosmosData(Func query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true); + QueryRequestOptions requestOptions = new QueryRequestOptions() + { +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif + }; + + IOrderedQueryable query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); // To cover both query against backend and queries on the original data using LINQ nicely, // the LINQ expression should be written once and they should be compiled and executed against the two sources. @@ -483,7 +490,14 @@ Cosmos.Database cosmosDatabase } FeedOptions feedOptions = new FeedOptions() { EnableScanInQuery = true, EnableCrossPartitionQuery = true }; - IOrderedQueryable query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true); + QueryRequestOptions requestOptions = new QueryRequestOptions() + { +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif + }; + + IOrderedQueryable query = container.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); // To cover both query against backend and queries on the original data using LINQ nicely, // the LINQ expression should be written once and they should be compiled and executed against the two sources. diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs index 5a46a2d118..51da69c98f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs @@ -1136,8 +1136,14 @@ public void TestSelectTop() Tuple> generatedData = this.CreateDataTestSelectTop(); int seed = generatedData.Item1; List data = generatedData.Item2; + QueryRequestOptions requestOptions = new QueryRequestOptions() + { +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif + }; - IOrderedQueryable query = testContainer.GetItemLinqQueryable(allowSynchronousQueryExecution: true); + IOrderedQueryable query = testContainer.GetItemLinqQueryable(allowSynchronousQueryExecution: true, requestOptions: requestOptions); Func> getQuery = useQuery => useQuery ? query : data.AsQueryable(); List inputs = new List diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs index 0bcfcea030..d60f76f92c 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/AggregateQueryTests.cs @@ -152,6 +152,9 @@ async Task ImplementationAsync( new QueryRequestOptions() { MaxConcurrency = maxDoP, +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif }); if (argument.ExpectedValue == null) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs index 60ab6f9fe4..9eecd81e30 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Query/SanityQueryTests.cs @@ -538,6 +538,9 @@ static async Task ImplementationAsync(Container container, IReadOnlyList MaxBufferedItemCount = 7000, MaxConcurrency = maxDegreeOfParallelism, MaxItemCount = maxItemCount, +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif }; async Task> AssertPassthroughAsync(string query, Cosmos.PartitionKey? pk = default) diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs index 64bc7c015a..79e947d41b 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Tracing/EndToEndTraceWriterBaselineTests.cs @@ -25,7 +25,7 @@ namespace Microsoft.Azure.Cosmos.EmulatorTests.Tracing using Microsoft.VisualStudio.TestTools.UnitTesting; using Newtonsoft.Json.Linq; using static Microsoft.Azure.Cosmos.SDK.EmulatorTests.TransportClientHelper; - + [VisualStudio.TestTools.UnitTesting.TestClass] [TestCategory("UpdateContract")] public sealed class EndToEndTraceWriterBaselineTests : BaselineTests @@ -464,6 +464,12 @@ public async Task ChangeFeedAsync() public async Task QueryAsync() { List inputs = new List(); + QueryRequestOptions requestOptions = new QueryRequestOptions() + { +#if PREVIEW + EnableOptimisticDirectExecution = false +#endif + }; int startLineNumber; int endLineNumber; @@ -474,7 +480,8 @@ public async Task QueryAsync() { startLineNumber = GetLineNumber(); FeedIteratorInternal feedIterator = (FeedIteratorInternal)container.GetItemQueryStreamIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); while (feedIterator.HasMoreResults) @@ -499,7 +506,8 @@ public async Task QueryAsync() { startLineNumber = GetLineNumber(); FeedIteratorInternal feedIterator = (FeedIteratorInternal)container.GetItemQueryIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); while (feedIterator.HasMoreResults) @@ -524,7 +532,8 @@ public async Task QueryAsync() { startLineNumber = GetLineNumber(); FeedIterator feedIterator = container.GetItemQueryStreamIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); @@ -550,7 +559,8 @@ public async Task QueryAsync() { startLineNumber = GetLineNumber(); FeedIterator feedIterator = container.GetItemQueryIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); @@ -578,7 +588,8 @@ public async Task QueryAsync() Lazy currentLazy = Documents.ServiceInteropWrapper.AssembliesExist; Documents.ServiceInteropWrapper.AssembliesExist = new Lazy(() => false); FeedIterator feedIterator = container.GetItemQueryIterator( - queryText: "SELECT * FROM c"); + queryText: "SELECT * FROM c", + requestOptions: requestOptions); List traces = new List(); @@ -607,7 +618,8 @@ public async Task QueryAsync() FeedIterator feedIterator = container.GetItemQueryStreamIterator( feedRange: FeedRangeEpk.FullRange, queryDefinition: new QueryDefinition("SELECT * FROM c"), - continuationToken: null); + continuationToken: null, + requestOptions: requestOptions); List traces = new List(); @@ -635,7 +647,8 @@ public async Task QueryAsync() FeedIterator feedIterator = container.GetItemQueryIterator( feedRange: FeedRangeEpk.FullRange, queryDefinition: new QueryDefinition("SELECT * FROM c"), - continuationToken: null); + continuationToken: null, + requestOptions: requestOptions); List traces = new List(); From d3fa6a88142d7373c8ee9f96e1a54e08f63a6027 Mon Sep 17 00:00:00 2001 From: Rinat Minibaev <132935507+rinatmini@users.noreply.github.com> Date: Mon, 10 Jul 2023 08:07:18 -0700 Subject: [PATCH 156/164] Diagnostics: Fixes verbose levels for "Operation will NOT be retried" (#3969) --- Microsoft.Azure.Cosmos/src/ResourceThrottleRetryPolicy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ResourceThrottleRetryPolicy.cs b/Microsoft.Azure.Cosmos/src/ResourceThrottleRetryPolicy.cs index c6187f3e51..a99bc594f7 100644 --- a/Microsoft.Azure.Cosmos/src/ResourceThrottleRetryPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/ResourceThrottleRetryPolicy.cs @@ -52,7 +52,7 @@ public Task ShouldRetryAsync( { if (!this.IsValidThrottleStatusCode(dce.StatusCode)) { - DefaultTrace.TraceError( + DefaultTrace.TraceVerbose( "Operation will NOT be retried. Current attempt {0}, Status Code: {1} ", this.currentAttemptCount, dce.StatusCode); @@ -81,7 +81,7 @@ public Task ShouldRetryAsync( { if (!this.IsValidThrottleStatusCode(cosmosResponseMessage?.StatusCode)) { - DefaultTrace.TraceError( + DefaultTrace.TraceVerbose( "Operation will NOT be retried. Current attempt {0}, Status Code: {1} ", this.currentAttemptCount, cosmosResponseMessage?.StatusCode); From 51c9d9c6fda1656cb1d3a28d2bb23df3e1ce43ad Mon Sep 17 00:00:00 2001 From: akotalwar <94020786+akotalwar@users.noreply.github.com> Date: Mon, 10 Jul 2023 12:37:50 -0700 Subject: [PATCH 157/164] Query: Fixes malformed continuation token exception type and message (#3917) * Fixed malformed continuation token issue where Exception was not CosmosExceptionan and did not have the correct Status and Sub Status codes. * Fixed incorrect indentation * Added type check for incoming exception * Replaced if/else with extra catch block * Moved fix to a higher point in the call stack * Removed unused Usings * Updated test code --------- Co-authored-by: Matias Quaranta --- .../src/ReadFeed/ReadFeedIteratorCore.cs | 25 ++++++++++++++++-- .../CosmosItemLinqTests.cs | 26 +++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedIteratorCore.cs b/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedIteratorCore.cs index d9b935e758..8a46196a56 100644 --- a/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedIteratorCore.cs +++ b/Microsoft.Azure.Cosmos/src/ReadFeed/ReadFeedIteratorCore.cs @@ -9,13 +9,16 @@ namespace Microsoft.Azure.Cosmos.ReadFeed using System.Threading; using System.Threading.Tasks; using Microsoft.Azure.Cosmos.CosmosElements; - using Microsoft.Azure.Cosmos.Diagnostics; + using Microsoft.Azure.Cosmos.Json; using Microsoft.Azure.Cosmos.Pagination; using Microsoft.Azure.Cosmos.Query.Core; + using Microsoft.Azure.Cosmos.Query.Core.Exceptions; using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.ReadFeed.Pagination; + using Microsoft.Azure.Cosmos.Resource.CosmosExceptions; using Microsoft.Azure.Cosmos.Routing; using Microsoft.Azure.Cosmos.Tracing; + using Microsoft.Azure.Documents; /// /// Cosmos feed stream iterator. This is used to get the query responses with a Stream content @@ -113,7 +116,25 @@ public ReadFeedIteratorCore( else { CosmosString tokenAsString = (CosmosString)token; - state = ReadFeedState.Continuation(CosmosElement.Parse(tokenAsString.Value)); + try + { + state = ReadFeedState.Continuation(CosmosElement.Parse(tokenAsString.Value)); + } + catch (Exception exception) when (exception.InnerException is JsonParseException) + { + MalformedContinuationTokenException malformedContinuationTokenException = new MalformedContinuationTokenException(exception.Message); + throw CosmosExceptionFactory.CreateBadRequestException( + message: $"Malformed Continuation Token: {tokenAsString}.", + headers: CosmosQueryResponseMessageHeaders.ConvertToQueryHeaders( + new Headers(), + default, + default, + (int)SubStatusCodes.MalformedContinuationToken, + default), + stackTrace: exception.StackTrace, + innerException: malformedContinuationTokenException, + trace: null); + } } FeedRangeState feedRangeState = new FeedRangeState(feedRange, state); diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemLinqTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemLinqTests.cs index 28fc3ec61c..b3dc7afa41 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemLinqTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosItemLinqTests.cs @@ -211,6 +211,32 @@ public async Task ItemLINQQueryTest() Assert.AreEqual(itemList[1].id, queriable.ToList()[0].id); } + [TestMethod] + public void ItemLINQQueryWithInvalidContinuationTokenTest() + { + string malformedString = "Malformed String"; + FeedIterator feedIterator = this.Container.GetItemLinqQueryable().ToFeedIterator(); + + while (feedIterator.HasMoreResults) + { + IOrderedQueryable querable = this.Container.GetItemLinqQueryable( + continuationToken: malformedString); + try + { + FeedIterator iterator = querable.ToFeedIterator(); + } + catch (CosmosException exception) + { + Assert.IsTrue(exception.StatusCode == System.Net.HttpStatusCode.BadRequest); + Assert.IsTrue(exception.SubStatusCode == (int)Documents.SubStatusCodes.MalformedContinuationToken); + Assert.IsTrue(exception.Message.Contains(malformedString)); + return; + } + + Assert.Fail("Should never reach till here, hence ensuring that an exception is always recieved"); + } + } + [TestMethod] public async Task ItemLINQQueryWithContinuationTokenTest() { From 4bb62d378c2960088efa44c76f96ca4bdac8fae6 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Mon, 10 Jul 2023 17:38:22 -0700 Subject: [PATCH 158/164] [Internal] Upgrade Resiliency: Refactors Code to Enable Replica Validation Feature Through `CosmosClientOptions` And Environment Variable (#3974) * Code changes to use client options to enable or disable replica validation. * Code changes to fix preview build failures. --- .../src/ConnectionPolicy.cs | 12 +++ .../src/CosmosClientOptions.cs | 12 +++ Microsoft.Azure.Cosmos/src/DocumentClient.cs | 2 +- .../src/Routing/GlobalAddressResolver.cs | 2 +- .../src/Util/ConfigurationManager.cs | 9 ++- .../CosmosReadManyItemsTests.cs | 61 +++++++++++---- .../CosmosBadReplicaTests.cs | 75 +++++++++++-------- .../CosmosClientOptionsUnitTests.cs | 7 +- 8 files changed, 131 insertions(+), 49 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs b/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs index 7abfd76deb..9193abedef 100644 --- a/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs +++ b/Microsoft.Azure.Cosmos/src/ConnectionPolicy.cs @@ -459,6 +459,18 @@ public Func HttpClientFactory set; } + /// + /// Gets or sets the boolean flag to enable replica validation. + /// + /// + /// The default value for this parameter is false. + /// + public bool? EnableAdvancedReplicaSelectionForTcp + { + get; + set; + } + /// /// (Direct/TCP) This is an advanced setting that controls the number of TCP connections that will be opened eagerly to each Cosmos DB back-end. /// diff --git a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs index 1fce195915..330738c00b 100644 --- a/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs +++ b/Microsoft.Azure.Cosmos/src/CosmosClientOptions.cs @@ -346,6 +346,17 @@ public ConnectionMode ConnectionMode /// public bool? EnableContentResponseOnWrite { get; set; } + /// + /// Gets or sets the advanced replica selection flag. The advanced replica selection logic keeps track of the replica connection + /// status, and based on status, it prioritizes the replicas which show healthy stable connections, so that the requests can be sent + /// confidently to the particular replica. This helps the cosmos client to become more resilient and effective to any connectivity issues. + /// The default value for this parameter is 'false'. + /// + /// + /// This is optimal for latency-sensitive workloads. Does not apply if is used. + /// + internal bool? EnableAdvancedReplicaSelectionForTcp { get; set; } + /// /// (Direct/TCP) Controls the amount of idle time after which unused connections are closed. /// @@ -758,6 +769,7 @@ internal virtual ConnectionPolicy GetConnectionPolicy(int clientId) EnablePartitionLevelFailover = this.EnablePartitionLevelFailover, PortReuseMode = this.portReuseMode, EnableTcpConnectionEndpointRediscovery = this.EnableTcpConnectionEndpointRediscovery, + EnableAdvancedReplicaSelectionForTcp = this.EnableAdvancedReplicaSelectionForTcp, HttpClientFactory = this.httpClientFactory, ServerCertificateCustomValidationCallback = this.ServerCertificateCustomValidationCallback }; diff --git a/Microsoft.Azure.Cosmos/src/DocumentClient.cs b/Microsoft.Azure.Cosmos/src/DocumentClient.cs index 752ec8f5a5..c7aeb07a6f 100644 --- a/Microsoft.Azure.Cosmos/src/DocumentClient.cs +++ b/Microsoft.Azure.Cosmos/src/DocumentClient.cs @@ -233,7 +233,7 @@ public DocumentClient(Uri serviceEndpoint, this.Initialize(serviceEndpoint, connectionPolicy, desiredConsistencyLevel); this.initTaskCache = new AsyncCacheNonBlocking(cancellationToken: this.cancellationTokenSource.Token); - this.isReplicaAddressValidationEnabled = ConfigurationManager.IsReplicaAddressValidationEnabled(); + this.isReplicaAddressValidationEnabled = ConfigurationManager.IsReplicaAddressValidationEnabled(connectionPolicy); } /// diff --git a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs index 8ac0719dcd..058e9c3ce4 100644 --- a/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs +++ b/Microsoft.Azure.Cosmos/src/Routing/GlobalAddressResolver.cs @@ -67,7 +67,7 @@ public GlobalAddressResolver( this.enableTcpConnectionEndpointRediscovery = connectionPolicy.EnableTcpConnectionEndpointRediscovery; - this.isReplicaAddressValidationEnabled = ConfigurationManager.IsReplicaAddressValidationEnabled(); + this.isReplicaAddressValidationEnabled = ConfigurationManager.IsReplicaAddressValidationEnabled(connectionPolicy); this.maxEndpoints = maxBackupReadEndpoints + 2; // for write and alternate write endpoint (during failover) diff --git a/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs b/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs index ed0f5a47a6..216e1295b5 100644 --- a/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs +++ b/Microsoft.Azure.Cosmos/src/Util/ConfigurationManager.cs @@ -32,13 +32,20 @@ public static T GetEnvironmentVariable(string variable, T defaultValue) /// both preview and GA. The method will eventually be removed, once replica valdiatin is enabled by default /// for both preview and GA. /// + /// An instance of containing the client options. /// A boolean flag indicating if replica validation is enabled. - public static bool IsReplicaAddressValidationEnabled() + public static bool IsReplicaAddressValidationEnabled( + ConnectionPolicy connectionPolicy) { bool replicaValidationDefaultValue = false; #if PREVIEW replicaValidationDefaultValue = true; #endif + if (connectionPolicy != null + && connectionPolicy.EnableAdvancedReplicaSelectionForTcp.HasValue) + { + return connectionPolicy.EnableAdvancedReplicaSelectionForTcp.Value; + } return ConfigurationManager .GetEnvironmentVariable( diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs index d215b6b18b..05184d7826 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/CosmosReadManyItemsTests.cs @@ -51,27 +51,58 @@ public async Task Cleanup() } [TestMethod] - public async Task ReadManyTypedTest() + [DataRow(true, DisplayName = "Validates Read Many scenario with advanced replica selection enabled.")] + [DataRow(false, DisplayName = "Validates Read Many scenario with advanced replica selection disabled.")] + public async Task ReadManyTypedTestWithAdvancedReplicaSelection( + bool advancedReplicaSelectionEnabled) { - List<(string, PartitionKey)> itemList = new List<(string, PartitionKey)>(); - for (int i=0; i<10; i++) + CosmosClientOptions clientOptions = new () { - itemList.Add((i.ToString(), new PartitionKey("pk" + i.ToString()))); - } + EnableAdvancedReplicaSelectionForTcp = advancedReplicaSelectionEnabled, + }; - FeedResponse feedResponse= await this.Container.ReadManyItemsAsync(itemList); - Assert.IsNotNull(feedResponse); - Assert.AreEqual(feedResponse.Count, 10); - Assert.IsTrue(feedResponse.Headers.RequestCharge > 0); - Assert.IsNotNull(feedResponse.Diagnostics); + Database database = null; + CosmosClient cosmosClient = TestCommon.CreateCosmosClient(clientOptions); + try + { + database = await cosmosClient.CreateDatabaseAsync("ReadManyTypedTestScenarioDb"); + Container container = await database.CreateContainerAsync("ReadManyTypedTestContainer", "/pk"); - int count = 0; - foreach (ToDoActivity item in feedResponse) + // Create items with different pk values + for (int i = 0; i < 500; i++) + { + ToDoActivity item = ToDoActivity.CreateRandomToDoActivity(); + item.pk = "pk" + i.ToString(); + item.id = i.ToString(); + ItemResponse itemResponse = await container.CreateItemAsync(item); + Assert.AreEqual(HttpStatusCode.Created, itemResponse.StatusCode); + } + + List<(string, PartitionKey)> itemList = new List<(string, PartitionKey)>(); + for (int i = 0; i < 20; i++) + { + itemList.Add((i.ToString(), new PartitionKey("pk" + i.ToString()))); + } + + FeedResponse feedResponse = await container.ReadManyItemsAsync(itemList); + Assert.IsNotNull(feedResponse); + Assert.AreEqual(20, feedResponse.Count); + Assert.IsTrue(feedResponse.Headers.RequestCharge > 0); + Assert.IsNotNull(feedResponse.Diagnostics); + + int count = 0; + foreach (ToDoActivity item in feedResponse) + { + count++; + Assert.IsNotNull(item); + } + Assert.AreEqual(20, count); + } + finally { - count++; - Assert.IsNotNull(item); + await database.DeleteAsync(); + cosmosClient.Dispose(); } - Assert.AreEqual(count, 10); } [TestMethod] diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs index 7a5b387e8e..151e0690a8 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosBadReplicaTests.cs @@ -21,16 +21,23 @@ public class CosmosBadReplicaTests { [TestMethod] [Timeout(30000)] - [DataRow(true, DisplayName = "Validate when replica validation is enabled.")] - [DataRow(false, DisplayName = "Validate when replica validation is disabled.")] + [DataRow(true, true, false, DisplayName = "Validate when replica validation is enabled using environment variable.")] + [DataRow(false, true, false, DisplayName = "Validate when replica validation is disabled using environment variable.")] + [DataRow(true, false, true, DisplayName = "Validate when replica validation is enabled using cosmos client options.")] + [DataRow(false, false, true, DisplayName = "Validate when replica validation is disabled using cosmos client options.")] public async Task TestGoneFromServiceScenarioAsync( - bool enableReplicaValidation) + bool enableReplicaValidation, + bool useEnvironmentVariable, + bool useCosmosClientOptions) { try { - Environment.SetEnvironmentVariable( - variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, - value: enableReplicaValidation.ToString()); + if (useEnvironmentVariable) + { + Environment.SetEnvironmentVariable( + variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, + value: enableReplicaValidation.ToString()); + } Mock mockHttpHandler = new Mock(MockBehavior.Strict); Uri endpoint = MockSetupsHelper.SetupSingleRegionAccount( @@ -56,28 +63,28 @@ public async Task TestGoneFromServiceScenarioAsync( cRid, out IReadOnlyList partitionKeyRanges); - List replicaIds1 = new List() - { - "11111111111111111", - "22222222222222222", - "33333333333333333", - "44444444444444444", - }; - - HttpResponseMessage replicaSet1 = MockSetupsHelper.CreateAddresses( - replicaIds1, - partitionKeyRanges.First(), - "eastus", - cRid); + List replicaIds1 = new List() + { + "11111111111111111", + "22222222222222222", + "33333333333333333", + "44444444444444444", + }; - // One replica changed on the refresh - List replicaIds2 = new List() - { - "11111111111111111", - "22222222222222222", - "33333333333333333", - "55555555555555555", - }; + HttpResponseMessage replicaSet1 = MockSetupsHelper.CreateAddresses( + replicaIds1, + partitionKeyRanges.First(), + "eastus", + cRid); + + // One replica changed on the refresh + List replicaIds2 = new List() + { + "11111111111111111", + "22222222222222222", + "33333333333333333", + "55555555555555555", + }; HttpResponseMessage replicaSet2 = MockSetupsHelper.CreateAddresses( replicaIds2, @@ -146,6 +153,11 @@ public async Task TestGoneFromServiceScenarioAsync( TransportClientHandlerFactory = (original) => mockTransportClient.Object, }; + if (useCosmosClientOptions) + { + cosmosClientOptions.EnableAdvancedReplicaSelectionForTcp = enableReplicaValidation; + } + using (CosmosClient customClient = new CosmosClient( endpoint.ToString(), Convert.ToBase64String(Encoding.UTF8.GetBytes(Guid.NewGuid().ToString())), @@ -203,9 +215,12 @@ public async Task TestGoneFromServiceScenarioAsync( } finally { - Environment.SetEnvironmentVariable( - variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, - value: null); + if (useEnvironmentVariable) + { + Environment.SetEnvironmentVariable( + variable: ConfigurationManager.ReplicaConnectivityValidationEnabled, + value: null); + } } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs index efb06d7cc5..37d89c389a 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/CosmosClientOptionsUnitTests.cs @@ -81,6 +81,7 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.IsNull(clientOptions.HttpClientFactory); Assert.AreNotEqual(consistencyLevel, clientOptions.ConsistencyLevel); Assert.IsFalse(clientOptions.EnablePartitionLevelFailover); + Assert.IsFalse(clientOptions.EnableAdvancedReplicaSelectionForTcp.HasValue); //Verify GetConnectionPolicy returns the correct values for default ConnectionPolicy policy = clientOptions.GetConnectionPolicy(clientId: 0); @@ -97,6 +98,7 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.IsNull(policy.HttpClientFactory); Assert.AreNotEqual(Cosmos.ConsistencyLevel.Session, clientOptions.ConsistencyLevel); Assert.IsFalse(policy.EnablePartitionLevelFailover); + Assert.IsFalse(clientOptions.EnableAdvancedReplicaSelectionForTcp.HasValue); cosmosClientBuilder.WithApplicationRegion(region) .WithConnectionModeGateway(maxConnections, webProxy) @@ -112,6 +114,7 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() cosmosClient = cosmosClientBuilder.Build(new MockDocumentClient()); clientOptions = cosmosClient.ClientOptions; + clientOptions.EnableAdvancedReplicaSelectionForTcp = true; //Verify all the values are updated Assert.AreEqual(region, clientOptions.ApplicationRegion); @@ -131,6 +134,7 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.IsTrue(clientOptions.AllowBulkExecution); Assert.AreEqual(consistencyLevel, clientOptions.ConsistencyLevel); Assert.IsTrue(clientOptions.EnablePartitionLevelFailover); + Assert.IsTrue(clientOptions.EnableAdvancedReplicaSelectionForTcp.HasValue && clientOptions.EnableAdvancedReplicaSelectionForTcp.Value); //Verify GetConnectionPolicy returns the correct values policy = clientOptions.GetConnectionPolicy(clientId: 0); @@ -145,7 +149,8 @@ public void VerifyCosmosConfigurationPropertiesGetUpdated() Assert.AreEqual((int)maxRetryWaitTime.TotalSeconds, policy.RetryOptions.MaxRetryWaitTimeInSeconds); Assert.AreEqual((Documents.ConsistencyLevel)consistencyLevel, clientOptions.GetDocumentsConsistencyLevel()); Assert.IsTrue(policy.EnablePartitionLevelFailover); - + Assert.IsTrue(clientOptions.EnableAdvancedReplicaSelectionForTcp.Value); + IReadOnlyList preferredLocations = new List() { Regions.AustraliaCentral, Regions.AustraliaCentral2 }; //Verify Direct Mode settings cosmosClientBuilder = new CosmosClientBuilder( From d0aac27bfdd5fb90a7ab0523491897454f69ba6b Mon Sep 17 00:00:00 2001 From: ernesto1596 Date: Tue, 11 Jul 2023 11:43:55 -0700 Subject: [PATCH 159/164] Query : Adds string comparison alternative when converting LINQ to SQL (#3668) * string.Compare supported with LINQ to SQL * Update tests * Update test name * Update tests * Add test * Create helper ReverseExpressionTypeForStrings * PR feedback * Update tests * Update base line --------- Co-authored-by: Aditya Co-authored-by: Matias Quaranta --- .../src/ClientResources.Designer.cs | 18 ++ .../src/ClientResources.resx | 8 +- .../src/Linq/ExpressionToSQL.cs | 87 +++++- ...slationBaselineTests.TestStringCompare.xml | 267 ++++++++++++++++++ ...ationBaselineTests.TestStringCompareTo.xml | 6 +- .../LinqTranslationBaselineTests.cs | 52 ++++ ...icrosoft.Azure.Cosmos.EmulatorTests.csproj | 8 +- 7 files changed, 429 insertions(+), 17 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompare.xml diff --git a/Microsoft.Azure.Cosmos/src/ClientResources.Designer.cs b/Microsoft.Azure.Cosmos/src/ClientResources.Designer.cs index 7ea2672d6c..3736d0fbbd 100644 --- a/Microsoft.Azure.Cosmos/src/ClientResources.Designer.cs +++ b/Microsoft.Azure.Cosmos/src/ClientResources.Designer.cs @@ -582,6 +582,24 @@ internal static string StringCompareToInvalidOperator { } } + /// + /// Looks up a localized string similar to Invalid operator for string.Compare(). Valid operators are ('==', '<', '<=', '>' or '>='). + /// + internal static string StringCompareInvalidOperator { + get { + return ResourceManager.GetString("StringCompareInvalidOperator", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The right hand side of string.Compare() comparison must be constant '0'. + /// + internal static string StringCompareInvalidConstant { + get { + return ResourceManager.GetString("StringCompareInvalidConstant", resourceCulture); + } + } + /// /// Looks up a localized string similar to Token refresh in progress.. /// diff --git a/Microsoft.Azure.Cosmos/src/ClientResources.resx b/Microsoft.Azure.Cosmos/src/ClientResources.resx index ae00e80a78..7a3e336e2a 100644 --- a/Microsoft.Azure.Cosmos/src/ClientResources.resx +++ b/Microsoft.Azure.Cosmos/src/ClientResources.resx @@ -268,11 +268,17 @@ Failed to deserialize response returned by server. - The right hand side of string.CompareTo() comparison must be constant '0' + The right-hand side of String.CompareTo() comparison must be constant '0'. + + + The right-hand side of String.Compare() comparison must be constant '0'. Invalid operator for string.CompareTo(). Vaid operators are ('==', '<', '<=', '>' or '>=') + + Invalid operator for string.Compare(). Vaid operators are ('==', '<', '<=', '>' or '>=') + Token refresh in progress. diff --git a/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs b/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs index b259234336..2ada0738da 100644 --- a/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs +++ b/Microsoft.Azure.Cosmos/src/Linq/ExpressionToSQL.cs @@ -457,6 +457,11 @@ private static SqlScalarExpression VisitBinary(BinaryExpression inputExpression, { return ExpressionToSql.VisitStringCompareTo(methodCallExpression, constantExpression, inputExpression.NodeType, reverseNodeType, context); } + + if (TryMatchStringCompare(methodCallExpression, constantExpression, inputExpression.NodeType)) + { + return ExpressionToSql.VisitStringCompare(methodCallExpression, constantExpression, inputExpression.NodeType, reverseNodeType, context); + } } SqlScalarExpression left = ExpressionToSql.VisitScalarExpression(inputExpression.Left, context); @@ -615,32 +620,90 @@ private static SqlScalarExpression VisitStringCompareTo( { if (reverseNodeType) { + compareOperator = ReverseExpressionTypeForStrings(compareOperator, ClientResources.StringCompareToInvalidOperator); + } + + SqlBinaryScalarOperatorKind op = GetBinaryOperatorKind(compareOperator, null); + + SqlScalarExpression leftExpression = ExpressionToSql.VisitNonSubqueryScalarExpression(left.Object, context); + SqlScalarExpression rightExpression = ExpressionToSql.VisitNonSubqueryScalarExpression(left.Arguments[0], context); + + return SqlBinaryScalarExpression.Create(op, leftExpression, rightExpression); + } + + private static ExpressionType ReverseExpressionTypeForStrings(ExpressionType compareOperator, string errorMessage) + { + switch (compareOperator) + { + case ExpressionType.Equal: + // do nothing + break; + case ExpressionType.GreaterThan: + compareOperator = ExpressionType.LessThan; + break; + case ExpressionType.GreaterThanOrEqual: + compareOperator = ExpressionType.LessThanOrEqual; + break; + case ExpressionType.LessThan: + compareOperator = ExpressionType.GreaterThan; + break; + case ExpressionType.LessThanOrEqual: + compareOperator = ExpressionType.GreaterThanOrEqual; + break; + default: + throw new DocumentQueryException(string.Format(CultureInfo.CurrentCulture, errorMessage)); + } + + return compareOperator; + } + + private static bool TryMatchStringCompare(MethodCallExpression left, ConstantExpression right, ExpressionType compareOperator) + { + if (left.Method.Equals(typeof(string).GetMethod("Compare", new Type[] { typeof(string), typeof(string) })) && left.Arguments.Count == 2) + { + // operator can only be =, >, >=, <, <= switch (compareOperator) { case ExpressionType.Equal: - // do nothing - break; case ExpressionType.GreaterThan: - compareOperator = ExpressionType.LessThan; - break; case ExpressionType.GreaterThanOrEqual: - compareOperator = ExpressionType.LessThanOrEqual; - break; case ExpressionType.LessThan: - compareOperator = ExpressionType.GreaterThan; - break; case ExpressionType.LessThanOrEqual: - compareOperator = ExpressionType.GreaterThanOrEqual; break; default: - throw new DocumentQueryException(string.Format(CultureInfo.CurrentCulture, ClientResources.StringCompareToInvalidOperator)); + throw new DocumentQueryException(string.Format(CultureInfo.CurrentCulture, ClientResources.StringCompareInvalidOperator)); + } + + // the constant value should be zero, otherwise we can't determine how to translate the expression + // it could be either integer or nullable integer + if (!(right.Type == typeof(int) && (int)right.Value == 0) && + !(right.Type == typeof(int?) && ((int?)right.Value).HasValue && ((int?)right.Value).Value == 0)) + { + throw new DocumentQueryException(string.Format(CultureInfo.CurrentCulture, ClientResources.StringCompareInvalidConstant)); } + + return true; + } + + return false; + } + + private static SqlScalarExpression VisitStringCompare( + MethodCallExpression left, + ConstantExpression right, + ExpressionType compareOperator, + bool reverseNodeType, + TranslationContext context) + { + if (reverseNodeType) + { + compareOperator = ReverseExpressionTypeForStrings(compareOperator, ClientResources.StringCompareInvalidOperator); } SqlBinaryScalarOperatorKind op = GetBinaryOperatorKind(compareOperator, null); - SqlScalarExpression leftExpression = ExpressionToSql.VisitNonSubqueryScalarExpression(left.Object, context); - SqlScalarExpression rightExpression = ExpressionToSql.VisitNonSubqueryScalarExpression(left.Arguments[0], context); + SqlScalarExpression leftExpression = ExpressionToSql.VisitNonSubqueryScalarExpression(left.Arguments[0], context); + SqlScalarExpression rightExpression = ExpressionToSql.VisitNonSubqueryScalarExpression(left.Arguments[1], context); return SqlBinaryScalarExpression.Create(op, leftExpression, rightExpression); } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompare.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompare.xml new file mode 100644 index 0000000000..17538ff1d8 --- /dev/null +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompare.xml @@ -0,0 +1,267 @@ + + + + + (Compare(doc.StringField, doc.StringField2) == 0))]]> + + + + + + + + + + ]]> + (Compare(doc.StringField, doc.StringField2) > 0))]]> + + + + root["StringField2"]) +FROM root]]> + + + + + + =]]> + (Compare(doc.StringField, doc.StringField2) >= 0))]]> + + + + = root["StringField2"]) +FROM root]]> + + + + + + + (Compare(doc.StringField, doc.StringField2) < 0))]]> + + + + + + + + + + + (Compare(doc.StringField, doc.StringField2) <= 0))]]> + + + + + + + + + + + (Compare(doc.StringField, "str") == 0))]]> + + + + + + + + + + ]]> + (Compare(doc.StringField, "str") > 0))]]> + + + + "str") +FROM root]]> + + + + + + =]]> + (Compare(doc.StringField, "str") >= 0))]]> + + + + = "str") +FROM root]]> + + + + + + + (Compare(doc.StringField, "str") < 0))]]> + + + + + + + + + + + (Compare(doc.StringField, "str") <= 0))]]> + + + + + + + + + + + (0 == Compare(doc.StringField, doc.StringField2)))]]> + + + + + + + + + + + (0 < Compare(doc.StringField, doc.StringField2)))]]> + + + + root["StringField2"]) +FROM root]]> + + + + + + + (0 <= Compare(doc.StringField, doc.StringField2)))]]> + + + + = root["StringField2"]) +FROM root]]> + + + + + + reverse operands]]> + (0 > Compare(doc.StringField, doc.StringField2)))]]> + + + + + + + + + + = reverse operands]]> + (0 >= Compare(doc.StringField, doc.StringField2)))]]> + + + + + + + + + + 1]]> + (Compare(doc.StringField, "str") > 1))]]> + + + + + + + + + + (Compare(doc.StringField, "str") == 1))]]> + + + + + + + + + + (Compare(doc.StringField, "str") == -1))]]> + + + + + + + + + + (Compare(doc.StringField, "str") | 0))]]> + + + + ' or '>=')]]> + + + + + + (Compare(doc.StringField, "str") & 0))]]> + + + + ' or '>=')]]> + + + + + + (Compare(doc.StringField, "str") ^ 0))]]> + + + + ' or '>=')]]> + + + + + + (Compare(doc.StringField, 0, "str", 0, 3) == 0))]]> + + + + + + + \ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompareTo.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompareTo.xml index 979d6f6191..c730415fb6 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompareTo.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/LinqTranslationBaselineTests.TestStringCompareTo.xml @@ -171,7 +171,7 @@ FROM root]]> - + @@ -181,7 +181,7 @@ FROM root]]> - + @@ -191,7 +191,7 @@ FROM root]]> - + diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs index 51da69c98f..4c8d6c423f 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/LinqTranslationBaselineTests.cs @@ -1044,6 +1044,58 @@ public void TestStringCompareTo() this.ExecuteTestSuite(inputs); } + [TestMethod] + public void TestStringCompare() + { + IOrderedQueryable testQuery = testContainer.GetItemLinqQueryable(allowSynchronousQueryExecution: true); + + const int Records = 100; + const int MaxStringLength = 20; + Func createDataObj = (random) => + { + DataObject obj = new DataObject(); + obj.StringField = LinqTestsCommon.RandomString(random, random.Next(MaxStringLength)); + obj.StringField2 = random.NextDouble() < 0.5 ? obj.StringField : LinqTestsCommon.RandomString(random, random.Next(MaxStringLength)); + obj.Id = Guid.NewGuid().ToString(); + obj.Pk = "Test"; + return obj; + }; + Func> getQuery = LinqTestsCommon.GenerateTestCosmosData(createDataObj, Records, testContainer); + + List inputs = new List + { + // projected compare + new LinqTestInput("Projected Compare ==", b => getQuery(b).Select(doc => String.Compare(doc.StringField, doc.StringField2) == 0)), + new LinqTestInput("Projected Compare >", b => getQuery(b).Select(doc => String.Compare(doc.StringField, doc.StringField2) > 0)), + new LinqTestInput("Projected Compare >=", b => getQuery(b).Select(doc => String.Compare(doc.StringField, doc.StringField2) >= 0)), + new LinqTestInput("Projected Compare <", b => getQuery(b).Select(doc => String.Compare(doc.StringField, doc.StringField2) < 0)), + new LinqTestInput("Projected Compare <=", b => getQuery(b).Select(doc => String.Compare(doc.StringField, doc.StringField2) <= 0)), + // static strings + new LinqTestInput("String.Compare static string ==", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") == 0)), + new LinqTestInput("String.Compare static string >", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") > 0)), + new LinqTestInput("String.Compare static string >=", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") >= 0)), + new LinqTestInput("String.Compare static string <", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") < 0)), + new LinqTestInput("String.Compare static string <=", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") <= 0)), + // reverse operands + new LinqTestInput("Projected Compare == reverse operands", b => getQuery(b).Select(doc => 0 == String.Compare(doc.StringField, doc.StringField2))), + new LinqTestInput("Projected Compare < reverse operands", b => getQuery(b).Select(doc => 0 < String.Compare(doc.StringField, doc.StringField2))), + new LinqTestInput("Projected Compare <= reverse operands", b => getQuery(b).Select(doc => 0 <= String.Compare(doc.StringField, doc.StringField2))), + new LinqTestInput("Projected Compare > reverse operands", b => getQuery(b).Select(doc => 0 > String.Compare(doc.StringField, doc.StringField2))), + new LinqTestInput("Projected Compare >= reverse operands", b => getQuery(b).Select(doc => 0 >= String.Compare(doc.StringField, doc.StringField2))), + // errors Invalid compare value + new LinqTestInput("String.Compare > 1", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") > 1)), + new LinqTestInput("String.Compare == 1", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") == 1)), + new LinqTestInput("String.Compare == -1", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") == -1)), + // errors Invalid operator + new LinqTestInput("String.Compare | 0", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") | 0)), + new LinqTestInput("String.Compare & 0", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") & 0)), + new LinqTestInput("String.Compare ^ 0", b => getQuery(b).Select(doc => String.Compare(doc.StringField, "str") ^ 0)), + // errors Unexpected number of arguments to string.Compare + new LinqTestInput("Unexpected number of arguments to string.Compare", b => getQuery(b).Select(doc => String.Compare(doc.StringField, 0, "str", 0, 3) == 0)) + }; + this.ExecuteTestSuite(inputs); + } + [TestMethod] public void TestUDFs() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj index 8b1aa3b149..8011b07351 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/Microsoft.Azure.Cosmos.EmulatorTests.csproj @@ -1,4 +1,4 @@ - + true true @@ -214,6 +214,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest @@ -300,6 +303,9 @@ PreserveNewest + + PreserveNewest + PreserveNewest From d7fc28225057ac402a7c862daf7707d08a2f70d3 Mon Sep 17 00:00:00 2001 From: Sourabh Jain Date: Thu, 13 Jul 2023 00:41:10 +0530 Subject: [PATCH 160/164] AI Integration: Fixes event generation for failed requests (#3973) * first draft * fix code * included feedback * flip condition * updated docs * Update docs/observability.md Co-authored-by: Matias Quaranta * Update observability.md * updated contract --------- Co-authored-by: Matias Quaranta --- .../OpenTelemetry/CosmosDbEventSource.cs | 13 +++++++++++- .../Filters/DiagnosticsFilterHelper.cs | 21 ++++++++++++++----- ...iterBaselineTests.BatchOperationsAsync.xml | 2 +- .../Telemetry/DiagnosticsFilterHelperTest.cs | 6 +++--- docs/observability.md | 7 ++++++- 5 files changed, 38 insertions(+), 11 deletions(-) diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs index 091373b0de..9e8028c0d8 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/CosmosDbEventSource.cs @@ -35,7 +35,12 @@ public static void RecordDiagnosticsForRequests( Documents.OperationType operationType, OpenTelemetryAttributes response) { - if (DiagnosticsFilterHelper.IsTracingNeeded( + if (!DiagnosticsFilterHelper.IsSuccessfulResponse( + response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning)) + { + CosmosDbEventSource.Singleton.FailedRequest(response.Diagnostics.ToString()); + } + else if (DiagnosticsFilterHelper.IsLatencyThresholdCrossed( config: config, operationType: operationType, response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning)) @@ -64,5 +69,11 @@ private void LatencyOverThreshold(string message) { this.WriteEvent(2, message); } + + [Event(3, Level = EventLevel.Error)] + private void FailedRequest(string message) + { + this.WriteEvent(3, message); + } } } diff --git a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs index 7649977fa0..60fb86fa5c 100644 --- a/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs +++ b/Microsoft.Azure.Cosmos/src/Telemetry/OpenTelemetry/Filters/DiagnosticsFilterHelper.cs @@ -10,12 +10,10 @@ namespace Microsoft.Azure.Cosmos.Telemetry.Diagnostics internal static class DiagnosticsFilterHelper { /// - /// Allow only when either of below is True

- /// 1) Latency is not more than 100/250 (query) ms

- /// 3) HTTP status code is not Success

+ /// Allow only when Latency is not more than 100 (non-query) /250 (query) ms ///
/// true or false - public static bool IsTracingNeeded( + public static bool IsLatencyThresholdCrossed( DistributedTracingOptions config, OperationType operationType, OpenTelemetryAttributes response) @@ -31,7 +29,20 @@ public static bool IsTracingNeeded( latencyThreshold = operationType == OperationType.Query ? DistributedTracingOptions.DefaultQueryTimeoutThreshold : DistributedTracingOptions.DefaultCrudLatencyThreshold; } - return response.Diagnostics.GetClientElapsedTime() > latencyThreshold || !response.StatusCode.IsSuccess(); + return response.Diagnostics.GetClientElapsedTime() > latencyThreshold; + } + + /// + /// Check if response HTTP status code is returning successful + /// + /// true or false + public static bool IsSuccessfulResponse(OpenTelemetryAttributes response) + { + return response.StatusCode.IsSuccess() + || (response.StatusCode == System.Net.HttpStatusCode.NotFound && response.SubStatusCode == 0) + || (response.StatusCode == System.Net.HttpStatusCode.NotModified && response.SubStatusCode == 0) + || (response.StatusCode == System.Net.HttpStatusCode.Conflict && response.SubStatusCode == 0) + || (response.StatusCode == System.Net.HttpStatusCode.PreconditionFailed && response.SubStatusCode == 0); } } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml index 66edf29c06..fd097032d9 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/BaselineTest/TestBaseline/EndToEndTraceWriterBaselineTests.BatchOperationsAsync.xml @@ -162,7 +162,7 @@ 1001 207 - +
\ No newline at end of file diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs index c04c0d6faf..e345394265 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Telemetry/DiagnosticsFilterHelperTest.cs @@ -46,7 +46,7 @@ public void CheckReturnFalseOnSuccessAndLowerLatencyThanConfiguredConfig() Assert.IsFalse( DiagnosticsFilterHelper - .IsTracingNeeded(distributedTracingOptions, OperationType.Read, response), + .IsLatencyThresholdCrossed(distributedTracingOptions, OperationType.Read, response), $" Response time is {response.Diagnostics.GetClientElapsedTime().Milliseconds}ms " + $"and Configured threshold value is {distributedTracingOptions.LatencyThresholdForDiagnosticEvent.Value.Milliseconds}ms " + $"and Is response Success : {response.StatusCode.IsSuccess()}" ); @@ -70,8 +70,8 @@ public void CheckReturnTrueOnFailedStatusCode() }; Assert.IsTrue( - DiagnosticsFilterHelper - .IsTracingNeeded(distributedTracingOptions, OperationType.Read, response), + !DiagnosticsFilterHelper + .IsSuccessfulResponse(response), $" Response time is {response.Diagnostics.GetClientElapsedTime().Milliseconds}ms " + $"and Configured threshold value is {distributedTracingOptions.LatencyThresholdForDiagnosticEvent.Value.Milliseconds}ms " + $"and Is response Success : {response.StatusCode.IsSuccess()}"); diff --git a/docs/observability.md b/docs/observability.md index 50ce14d33c..1da6f02e44 100644 --- a/docs/observability.md +++ b/docs/observability.md @@ -5,6 +5,11 @@ **Source to capture operation level activities**: _Azure.Cosmos.Operation_\ **Source to capture event with request diagnostics** : _Azure-Cosmos-Operation-Request-Diagnostics_ +There are 3 kind of events generated: +1. LatencyOverThrehold: If particular operation latency is more than threshold. +2. FailedRequest: If particular reequest failed. Status codes not considered as failed, are anything below 300, 404/0, 304/0, 409/0, and 412/0 +3. Exception: If any exception occured. + For detail about usage of this feature, please see the [Azure Cosmos DB SDK observability](https://learn.microsoft.com/azure/cosmos-db/nosql/sdk-observability?tabs=dotnet) ```mermaid @@ -104,4 +109,4 @@ flowchart TD ``` ### Limitations -1. AAD Support is not available. \ No newline at end of file +1. AAD Support is not available. From 8d2691b984dac9a1c668d37f74cbfe306dd03671 Mon Sep 17 00:00:00 2001 From: Mikhail Lipin Date: Fri, 14 Jul 2023 22:10:39 +0300 Subject: [PATCH 161/164] [Internal] Category: Refactors Cosmos benchmark operations (#3961) * Refactoring: base classes for operations. * Updating comments. * Adding new line at the end of the file. * Fixing code review points. * Restore PrepareAsync to be virtual. --- .../Tools/Benchmark/BenchmarkOperationType.cs | 16 ++++++++++++++++ .../Benchmark/Fx/CosmosDiagnosticsLogger.cs | 3 --- .../Tools/Benchmark/IBenchmarkOperation.cs | 18 +++++++++++++++++- .../Benchmark/v2/InsertV2BenchmarkOperation.cs | 2 ++ .../QueryStreamSinglePkV2BenchmarkOperation.cs | 2 ++ .../v2/QueryTSinglePkV2BenchmarkOperation.cs | 4 +++- .../v2/ReadFeedStreamV2BenchmarkOperation.cs | 4 +++- .../v2/ReadNotExistsV2BenchmarkOperation.cs | 4 +++- .../v2/ReadStreamExistsV2BenchmarkOperation.cs | 4 +++- .../v2/ReadTExistsV2BenchmarkOperation.cs | 4 +++- .../Benchmark/v3/InsertV3BenchmarkOperation.cs | 2 ++ .../Benchmark/v3/QueryTV3BenchmarkOperation.cs | 4 +++- .../v3/ReadFeedStreamV3BenchmarkOperation.cs | 6 ++++-- .../v3/ReadNotExistsV3BenchmarkOperation.cs | 4 +++- .../v3/ReadStreamExistsV3BenchmarkOperation.cs | 2 ++ ...xistsWithDiagnosticsV3BenchmarkOperation.cs | 4 +++- .../v3/ReadTExistsV3BenchmarkOperation.cs | 7 ++++--- 17 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkOperationType.cs diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkOperationType.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkOperationType.cs new file mode 100644 index 0000000000..b18fb1c318 --- /dev/null +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/BenchmarkOperationType.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All rights reserved. +//------------------------------------------------------------ + +namespace CosmosBenchmark +{ + /// + /// Benchmark operation type. + /// + public enum BenchmarkOperationType + { + Read, + Insert, + Query + } +} diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/CosmosDiagnosticsLogger.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/CosmosDiagnosticsLogger.cs index 9a399c5dc8..e08b2dd6da 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/CosmosDiagnosticsLogger.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/Fx/CosmosDiagnosticsLogger.cs @@ -6,11 +6,8 @@ namespace CosmosBenchmark { using System; using System.Collections.Concurrent; - using System.Collections.Generic; using System.Diagnostics; using System.Linq; - using System.Runtime.CompilerServices; - using System.Text; using Microsoft.Azure.Cosmos; using Newtonsoft.Json.Linq; diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/IBenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/IBenchmarkOperation.cs index d6933fcce5..3580a8a6fc 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/IBenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/IBenchmarkOperation.cs @@ -6,10 +6,26 @@ namespace CosmosBenchmark { using System.Threading.Tasks; + /// + /// Represents the Benchmark operation. + /// internal interface IBenchmarkOperation { - Task PrepareAsync(); + /// + /// Benchmark operation type. + /// + BenchmarkOperationType OperationType { get; } + /// + /// Executes Benchmark operation once asynchronously. + /// + /// The operation result wrapped by task. Task ExecuteOnceAsync(); + + /// + /// Prepares Benchmark operation asynchronously. + /// + /// The task related to method's work. + Task PrepareAsync(); } } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/InsertV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/InsertV2BenchmarkOperation.cs index 744bb9f577..124c841085 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/InsertV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/InsertV2BenchmarkOperation.cs @@ -38,6 +38,8 @@ public InsertV2BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Insert; + public async Task ExecuteOnceAsync() { ResourceResponse itemResponse = await this.documentClient.CreateDocumentAsync( diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryStreamSinglePkV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryStreamSinglePkV2BenchmarkOperation.cs index 1bf3bf245e..b0f071f6de 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryStreamSinglePkV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryStreamSinglePkV2BenchmarkOperation.cs @@ -47,6 +47,8 @@ public QueryStreamSinglePkV2BenchmarkOperation( this.containerUri = UriFactory.CreateDocumentCollectionUri(this.databsaeName, this.containerName); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Query; + public async Task ExecuteOnceAsync() { IDocumentQuery query = this.documentClient.CreateDocumentQuery( diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryTSinglePkV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryTSinglePkV2BenchmarkOperation.cs index 7d58447859..cd50a789b8 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryTSinglePkV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/QueryTSinglePkV2BenchmarkOperation.cs @@ -46,6 +46,8 @@ public QueryTSinglePkV2BenchmarkOperation( this.sampleJObject[this.partitionKeyPath] = this.executionItemPartitionKey; } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Query; + public async Task ExecuteOnceAsync() { IDocumentQuery> query = this.documentClient.CreateDocumentQuery>( @@ -107,7 +109,7 @@ public async Task PrepareAsync() new RequestOptions() { PartitionKey = new PartitionKey(this.executionItemPartitionKey) }); if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } this.initialized = true; diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadFeedStreamV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadFeedStreamV2BenchmarkOperation.cs index 379cd363e6..0a9b9e3d7f 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadFeedStreamV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadFeedStreamV2BenchmarkOperation.cs @@ -40,6 +40,8 @@ public ReadFeedStreamV2BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public async Task ExecuteOnceAsync() { Uri containerUri = UriFactory.CreateDocumentCollectionUri(this.databsaeName, this.containerName); @@ -75,7 +77,7 @@ public async Task PrepareAsync() new RequestOptions() { PartitionKey = new PartitionKey(this.nextExecutionItemPartitionKey) }); if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } } } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadNotExistsV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadNotExistsV2BenchmarkOperation.cs index f5e8f94c68..1d8b99449e 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadNotExistsV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadNotExistsV2BenchmarkOperation.cs @@ -22,6 +22,8 @@ internal class ReadNotExistsV2BenchmarkOperation : IBenchmarkOperation private readonly DocumentClient documentClient; + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public ReadNotExistsV2BenchmarkOperation( DocumentClient documentClient, string dbName, @@ -52,7 +54,7 @@ public async Task ExecuteOnceAsync() { if (dce.StatusCode != HttpStatusCode.NotFound) { - throw new Exception($"ReadItem failed wth {dce?.StatusCode} {dce?.ToString()}"); + throw new Exception($"ReadItem failed with {dce?.StatusCode} {dce?.ToString()}"); } return new OperationResult() diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadStreamExistsV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadStreamExistsV2BenchmarkOperation.cs index 7afd4cdf71..c7419db811 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadStreamExistsV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadStreamExistsV2BenchmarkOperation.cs @@ -25,6 +25,8 @@ internal class ReadStreamExistsV2BenchmarkOperation : IBenchmarkOperation private readonly DocumentClient documentClient; + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public ReadStreamExistsV2BenchmarkOperation( DocumentClient documentClient, string dbName, @@ -84,7 +86,7 @@ public async Task PrepareAsync() if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } } } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadTExistsV2BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadTExistsV2BenchmarkOperation.cs index 061183c575..7e161f8ffc 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadTExistsV2BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v2/ReadTExistsV2BenchmarkOperation.cs @@ -26,6 +26,8 @@ internal class ReadTExistsV2BenchmarkOperation : IBenchmarkOperation private readonly DocumentClient documentClient; + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public ReadTExistsV2BenchmarkOperation( DocumentClient documentClient, string dbName, @@ -85,7 +87,7 @@ public async Task PrepareAsync() if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } } } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/InsertV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/InsertV3BenchmarkOperation.cs index 1ab5861242..504148bfda 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/InsertV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/InsertV3BenchmarkOperation.cs @@ -37,6 +37,8 @@ public InsertV3BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Insert; + public async Task ExecuteOnceAsync() { using (MemoryStream input = JsonHelper.ToStream(this.sampleJObject)) diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/QueryTV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/QueryTV3BenchmarkOperation.cs index bdb0b38cf8..f78153034b 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/QueryTV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/QueryTV3BenchmarkOperation.cs @@ -31,6 +31,8 @@ internal abstract class QueryTV3BenchmarkOperation : IBenchmarkOperation public abstract bool IsPaginationEnabled { get; } public abstract bool IsQueryStream { get; } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Query; + protected string executionItemId = null; protected string executionPartitionKey = null; @@ -291,7 +293,7 @@ public virtual async Task PrepareAsync() if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } } } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadFeedStreamV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadFeedStreamV3BenchmarkOperation.cs index 99789040b0..3b9c5cd800 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadFeedStreamV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadFeedStreamV3BenchmarkOperation.cs @@ -39,6 +39,8 @@ public ReadFeedStreamV3BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public async Task ExecuteOnceAsync() { FeedIterator feedIterator = this.container @@ -50,7 +52,7 @@ public async Task ExecuteOnceAsync() ResponseMessage feedResponse = await feedIterator.ReadNextAsync(); if (feedResponse.StatusCode != HttpStatusCode.OK) { - throw new Exception($"ReadItem failed wth {feedResponse.StatusCode}"); + throw new Exception($"ReadItem failed with {feedResponse.StatusCode}"); } return new OperationResult() @@ -84,7 +86,7 @@ public async Task PrepareAsync() if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } } } diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadNotExistsV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadNotExistsV3BenchmarkOperation.cs index c97d1af4b7..1804ea9852 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadNotExistsV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadNotExistsV3BenchmarkOperation.cs @@ -32,6 +32,8 @@ public ReadNotExistsV3BenchmarkOperation( this.container = cosmosClient.GetContainer(this.databsaeName, this.containerName); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public async Task ExecuteOnceAsync() { using (ResponseMessage itemResponse = await this.container.ReadItemStreamAsync( @@ -40,7 +42,7 @@ public async Task ExecuteOnceAsync() { if (itemResponse.StatusCode != HttpStatusCode.NotFound) { - throw new Exception($"ReadItem failed wth {itemResponse.StatusCode}"); + throw new Exception($"ReadItem failed with {itemResponse.StatusCode}"); } return new OperationResult() diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsV3BenchmarkOperation.cs index aba0a4ea7a..fabe8f20bd 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsV3BenchmarkOperation.cs @@ -39,6 +39,8 @@ public ReadStreamExistsV3BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public async Task ExecuteOnceAsync() { using (ResponseMessage itemResponse = await this.container.ReadItemStreamAsync( diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsWithDiagnosticsV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsWithDiagnosticsV3BenchmarkOperation.cs index ebdc14924b..74f2ac67f7 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsWithDiagnosticsV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadStreamExistsWithDiagnosticsV3BenchmarkOperation.cs @@ -39,6 +39,8 @@ public ReadStreamExistsWithDiagnosticsV3BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public async Task ExecuteOnceAsync() { using (ResponseMessage itemResponse = await this.container.ReadItemStreamAsync( @@ -47,7 +49,7 @@ public async Task ExecuteOnceAsync() { if (itemResponse.StatusCode != HttpStatusCode.OK) { - throw new Exception($"ReadItem failed wth {itemResponse.StatusCode}"); + throw new Exception($"ReadItem failed with {itemResponse.StatusCode}"); } string diagnostics = itemResponse.Diagnostics.ToString(); diff --git a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadTExistsV3BenchmarkOperation.cs b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadTExistsV3BenchmarkOperation.cs index 7fd40397be..bb6295356e 100644 --- a/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadTExistsV3BenchmarkOperation.cs +++ b/Microsoft.Azure.Cosmos.Samples/Tools/Benchmark/v3/ReadTExistsV3BenchmarkOperation.cs @@ -10,7 +10,6 @@ namespace CosmosBenchmark using System.Net; using System.Threading.Tasks; using Microsoft.Azure.Cosmos; - using Newtonsoft.Json.Linq; internal class ReadTExistsV3BenchmarkOperation : IBenchmarkOperation { @@ -40,6 +39,8 @@ public ReadTExistsV3BenchmarkOperation( this.sampleJObject = JsonHelper.Deserialize>(sampleJson); } + public BenchmarkOperationType OperationType => BenchmarkOperationType.Read; + public async Task ExecuteOnceAsync() { ItemResponse> itemResponse = await this.container.ReadItemAsync>( @@ -47,7 +48,7 @@ public async Task ExecuteOnceAsync() new PartitionKey(this.nextExecutionItemPartitionKey)); if (itemResponse.StatusCode != HttpStatusCode.OK) { - throw new Exception($"ReadItem failed wth {itemResponse.StatusCode}"); + throw new Exception($"ReadItem failed with {itemResponse.StatusCode}"); } return new OperationResult() @@ -81,7 +82,7 @@ public async Task PrepareAsync() if (itemResponse.StatusCode != HttpStatusCode.Created) { - throw new Exception($"Create failed with statuscode: {itemResponse.StatusCode}"); + throw new Exception($"Create failed with status code: {itemResponse.StatusCode}"); } } } From 38b556b60ed921c74bb6fdc44361cf5ec6c503d8 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:07:24 -0700 Subject: [PATCH 162/164] 3.35.2: Adds new SDK versions and contract files (#3985) * Updated change log and bumped up the version. * Changing the version to 3.35.2 * Code changes to address review comments. * Code changes to make minor fixes. * Code changes to move some fixes into preview. --- Directory.Build.props | 4 +- .../contracts/API_3.35.2-preview.txt | 1563 +++++++++++++++++ .../contracts/API_3.35.2.txt | 1502 ++++++++++++++++ changelog.md | 18 + 4 files changed, 3085 insertions(+), 2 deletions(-) create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.35.2-preview.txt create mode 100644 Microsoft.Azure.Cosmos/contracts/API_3.35.2.txt diff --git a/Directory.Build.props b/Directory.Build.props index 51d6237854..b9171d6307 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 3.35.1 - 3.35.1 + 3.35.2 + 3.35.2 preview 3.31.3 2.0.2 diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.35.2-preview.txt b/Microsoft.Azure.Cosmos/contracts/API_3.35.2-preview.txt new file mode 100644 index 0000000000..6c989053fd --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.35.2-preview.txt @@ -0,0 +1,1563 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public class ChangeFeedItemChange + { + public ChangeFeedItemChange(); + public T Current { get; set; } + public ChangeFeedMetadata Metadata { get; set; } + public T Previous { get; set; } + } + public class ChangeFeedMetadata + { + public ChangeFeedMetadata(DateTime conflictResolutionTimestamp, long lsn, ChangeFeedOperationType operationType, long previousLsn); + public DateTime ConflictResolutionTimestamp { get; } + public bool IsTimeToLiveExpired { get; } + public long Lsn { get; } + public ChangeFeedOperationType OperationType { get; } + public long PreviousLsn { get; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode AllVersionsAndDeletes { get; } + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public enum ChangeFeedOperationType + { + Create = 0, + Delete = 2, + Replace = 1, + } + public sealed class ChangeFeedPolicy + { + public ChangeFeedPolicy(); + public static TimeSpan FullFidelityNoRetention { get; } + public TimeSpan FullFidelityRetention { get; set; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public sealed class ComputedProperty + { + public ComputedProperty(); + public string Name { get; set; } + public string Query { get; set; } + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteAllItemsByPartitionKeyStreamAsync(PartitionKey partitionKey, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> GetPartitionKeyRangesAsync(FeedRange feedRange, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ChangeFeedPolicy ChangeFeedPolicy { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public Collection ComputedProperties { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool IsDistributedTracingEnabled { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable BypassIntegratedCache { get; set; } + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public enum PriorityLevel + { + High = 1, + Low = 2, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public bool EnableOptimisticDirectExecution { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string IsraelCentral = "Israel Central"; + public const string ItalyNorth = "Italy North"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string MalaysiaSouth = "Malaysia South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public Nullable PriorityLevel { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public class ChangeFeedPolicyDefinition + { + public ContainerBuilder Attach(); + } + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ComputedPropertiesDefinition + { + public T Attach(); + public ComputedPropertiesDefinition WithComputedProperty(string name, string query); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ChangeFeedPolicyDefinition WithChangeFeedPolicy(TimeSpan retention); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public ComputedPropertiesDefinition WithComputedProperties(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithDistributedTracing(bool isEnabled=true); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query, IDictionary namedParameters); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/Microsoft.Azure.Cosmos/contracts/API_3.35.2.txt b/Microsoft.Azure.Cosmos/contracts/API_3.35.2.txt new file mode 100644 index 0000000000..c0dc3e280f --- /dev/null +++ b/Microsoft.Azure.Cosmos/contracts/API_3.35.2.txt @@ -0,0 +1,1502 @@ +namespace Microsoft.Azure.Cosmos +{ + public class AccountConsistency + { + public AccountConsistency(); + public ConsistencyLevel DefaultConsistencyLevel { get; } + public int MaxStalenessIntervalInSeconds { get; } + public int MaxStalenessPrefix { get; } + } + public class AccountProperties + { + public AccountConsistency Consistency { get; } + public string ETag { get; } + public string Id { get; } + public IEnumerable ReadableRegions { get; } + public IEnumerable WritableRegions { get; } + } + public class AccountRegion + { + public AccountRegion(); + public string Endpoint { get; } + public string Name { get; } + } + public sealed class BoundingBoxProperties + { + public BoundingBoxProperties(); + public double Xmax { get; set; } + public double Xmin { get; set; } + public double Ymax { get; set; } + public double Ymin { get; set; } + } + public abstract class ChangeFeedEstimator + { + protected ChangeFeedEstimator(); + public abstract FeedIterator GetCurrentStateIterator(ChangeFeedEstimatorRequestOptions changeFeedEstimatorRequestOptions=null); + } + public sealed class ChangeFeedEstimatorRequestOptions + { + public ChangeFeedEstimatorRequestOptions(); + public Nullable MaxItemCount { get; set; } + } + public abstract class ChangeFeedMode + { + public static ChangeFeedMode Incremental { get; } + public static ChangeFeedMode LatestVersion { get; } + } + public abstract class ChangeFeedProcessor + { + protected ChangeFeedProcessor(); + public abstract Task StartAsync(); + public abstract Task StopAsync(); + } + public class ChangeFeedProcessorBuilder + { + public ChangeFeedProcessor Build(); + public ChangeFeedProcessorBuilder WithErrorNotification(Container.ChangeFeedMonitorErrorDelegate errorDelegate); + public ChangeFeedProcessorBuilder WithInstanceName(string instanceName); + public ChangeFeedProcessorBuilder WithLeaseAcquireNotification(Container.ChangeFeedMonitorLeaseAcquireDelegate acquireDelegate); + public ChangeFeedProcessorBuilder WithLeaseConfiguration(Nullable acquireInterval=default(Nullable), Nullable expirationInterval=default(Nullable), Nullable renewInterval=default(Nullable)); + public ChangeFeedProcessorBuilder WithLeaseContainer(Container leaseContainer); + public ChangeFeedProcessorBuilder WithLeaseReleaseNotification(Container.ChangeFeedMonitorLeaseReleaseDelegate releaseDelegate); + public ChangeFeedProcessorBuilder WithMaxItems(int maxItemCount); + public ChangeFeedProcessorBuilder WithPollInterval(TimeSpan pollInterval); + public ChangeFeedProcessorBuilder WithStartTime(DateTime startTime); + } + public abstract class ChangeFeedProcessorContext + { + protected ChangeFeedProcessorContext(); + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract Headers Headers { get; } + public abstract string LeaseToken { get; } + } + public sealed class ChangeFeedProcessorState + { + public ChangeFeedProcessorState(string leaseToken, long estimatedLag, string instanceName); + public long EstimatedLag { get; } + public string InstanceName { get; } + public string LeaseToken { get; } + } + public class ChangeFeedProcessorUserException : Exception + { + public ChangeFeedProcessorUserException(Exception originalException, ChangeFeedProcessorContext context); + protected ChangeFeedProcessorUserException(SerializationInfo info, StreamingContext context); + public ChangeFeedProcessorContext ChangeFeedProcessorContext { get; } + public override void GetObjectData(SerializationInfo info, StreamingContext context); + } + public sealed class ChangeFeedRequestOptions : RequestOptions + { + public ChangeFeedRequestOptions(); + public new string IfMatchEtag { get; set; } + public new string IfNoneMatchEtag { get; set; } + public Nullable PageSizeHint { get; set; } + } + public abstract class ChangeFeedStartFrom + { + public static ChangeFeedStartFrom Beginning(); + public static ChangeFeedStartFrom Beginning(FeedRange feedRange); + public static ChangeFeedStartFrom ContinuationToken(string continuationToken); + public static ChangeFeedStartFrom Now(); + public static ChangeFeedStartFrom Now(FeedRange feedRange); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc); + public static ChangeFeedStartFrom Time(DateTime dateTimeUtc, FeedRange feedRange); + } + public sealed class ClientEncryptionIncludedPath + { + public ClientEncryptionIncludedPath(); + public string ClientEncryptionKeyId { get; set; } + public string EncryptionAlgorithm { get; set; } + public string EncryptionType { get; set; } + public string Path { get; set; } + } + public abstract class ClientEncryptionKey + { + protected ClientEncryptionKey(); + public abstract string Id { get; } + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class ClientEncryptionKeyProperties : IEquatable + { + protected ClientEncryptionKeyProperties(); + public ClientEncryptionKeyProperties(string id, string encryptionAlgorithm, byte[] wrappedDataEncryptionKey, EncryptionKeyWrapMetadata encryptionKeyWrapMetadata); + public Nullable CreatedTime { get; } + public string EncryptionAlgorithm { get; } + public EncryptionKeyWrapMetadata EncryptionKeyWrapMetadata { get; } + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public virtual string SelfLink { get; } + public byte[] WrappedDataEncryptionKey { get; } + public bool Equals(ClientEncryptionKeyProperties other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public class ClientEncryptionKeyResponse : Response + { + protected ClientEncryptionKeyResponse(); + public override string ActivityId { get; } + public virtual ClientEncryptionKey ClientEncryptionKey { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ClientEncryptionKeyProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ClientEncryptionKey (ClientEncryptionKeyResponse response); + } + public sealed class ClientEncryptionPolicy + { + public ClientEncryptionPolicy(IEnumerable includedPaths); + public ClientEncryptionPolicy(IEnumerable includedPaths, int policyFormatVersion); + public IEnumerable IncludedPaths { get; } + public int PolicyFormatVersion { get; } + } + public sealed class CompositePath + { + public CompositePath(); + public CompositePathSortOrder Order { get; set; } + public string Path { get; set; } + } + public enum CompositePathSortOrder + { + Ascending = 0, + Descending = 1, + } + public class ConflictProperties + { + public ConflictProperties(); + public string Id { get; } + public OperationKind OperationKind { get; } + public string SelfLink { get; } + } + public enum ConflictResolutionMode + { + Custom = 1, + LastWriterWins = 0, + } + public class ConflictResolutionPolicy + { + public ConflictResolutionPolicy(); + public ConflictResolutionMode Mode { get; set; } + public string ResolutionPath { get; set; } + public string ResolutionProcedure { get; set; } + } + public abstract class Conflicts + { + protected Conflicts(); + public abstract Task DeleteAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetConflictQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetConflictQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract T ReadConflictContent(ConflictProperties conflict); + public abstract Task> ReadCurrentAsync(ConflictProperties conflict, PartitionKey partitionKey, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum ConnectionMode + { + Direct = 1, + Gateway = 0, + } + public enum ConsistencyLevel + { + BoundedStaleness = 1, + ConsistentPrefix = 4, + Eventual = 3, + Session = 2, + Strong = 0, + } + public abstract class Container + { + protected Container(); + public abstract Conflicts Conflicts { get; } + public abstract Database Database { get; } + public abstract string Id { get; } + public abstract Scripts Scripts { get; } + public abstract Task> CreateItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch CreateTransactionalBatch(PartitionKey partitionKey); + public abstract Task DeleteContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> DeleteItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ChangeFeedEstimator GetChangeFeedEstimator(string processorName, Container leaseContainer); + public abstract ChangeFeedProcessorBuilder GetChangeFeedEstimatorBuilder(string processorName, Container.ChangesEstimationHandler estimationDelegate, Nullable estimationPeriod=default(Nullable)); + public abstract FeedIterator GetChangeFeedIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedStreamHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedStreamHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilderWithManualCheckpoint(string processorName, Container.ChangeFeedHandlerWithManualCheckpoint onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangeFeedHandler onChangesDelegate); + public abstract ChangeFeedProcessorBuilder GetChangeFeedProcessorBuilder(string processorName, Container.ChangesHandler onChangesDelegate); + public abstract FeedIterator GetChangeFeedStreamIterator(ChangeFeedStartFrom changeFeedStartFrom, ChangeFeedMode changeFeedMode, ChangeFeedRequestOptions changeFeedRequestOptions=null); + public abstract Task> GetFeedRangesAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract IOrderedQueryable GetItemLinqQueryable(bool allowSynchronousQueryExecution=false, string continuationToken=null, QueryRequestOptions requestOptions=null, CosmosLinqSerializerOptions linqSerializerOptions=null); + public abstract FeedIterator GetItemQueryIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(FeedRange feedRange, QueryDefinition queryDefinition, string continuationToken, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetItemQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task> PatchItemAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task PatchItemStreamAsync(string id, PartitionKey partitionKey, IReadOnlyList patchOperations, PatchItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadContainerStreamAsync(ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadItemAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadItemStreamAsync(string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadManyItemsAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadManyItemsStreamAsync(IReadOnlyList> items, ReadManyRequestOptions readManyRequestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceContainerStreamAsync(ContainerProperties containerProperties, ContainerRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReplaceItemAsync(T item, string id, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceItemStreamAsync(Stream streamPayload, string id, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> UpsertItemAsync(T item, Nullable partitionKey=default(Nullable), ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertItemStreamAsync(Stream streamPayload, PartitionKey partitionKey, ItemRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public delegate Task ChangeFeedHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, IReadOnlyCollection changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangeFeedHandler(ChangeFeedProcessorContext context, IReadOnlyCollection changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedMonitorErrorDelegate(string leaseToken, Exception exception); + public delegate Task ChangeFeedMonitorLeaseAcquireDelegate(string leaseToken); + public delegate Task ChangeFeedMonitorLeaseReleaseDelegate(string leaseToken); + public delegate Task ChangeFeedStreamHandler(ChangeFeedProcessorContext context, Stream changes, CancellationToken cancellationToken); + public delegate Task ChangeFeedStreamHandlerWithManualCheckpoint(ChangeFeedProcessorContext context, Stream changes, Func checkpointAsync, CancellationToken cancellationToken); + public delegate Task ChangesEstimationHandler(long estimatedPendingChanges, CancellationToken cancellationToken); + public delegate Task ChangesHandler(IReadOnlyCollection changes, CancellationToken cancellationToken); + } + public class ContainerProperties + { + public ContainerProperties(); + public ContainerProperties(string id, IReadOnlyList partitionKeyPaths); + public ContainerProperties(string id, string partitionKeyPath); + public Nullable AnalyticalStoreTimeToLiveInSeconds { get; set; } + public ClientEncryptionPolicy ClientEncryptionPolicy { get; set; } + public ConflictResolutionPolicy ConflictResolutionPolicy { get; set; } + public Nullable DefaultTimeToLive { get; set; } + public string ETag { get; } + public GeospatialConfig GeospatialConfig { get; set; } + public string Id { get; set; } + public IndexingPolicy IndexingPolicy { get; set; } + public Nullable LastModified { get; } + public Nullable PartitionKeyDefinitionVersion { get; set; } + public string PartitionKeyPath { get; set; } + public IReadOnlyList PartitionKeyPaths { get; set; } + public string SelfLink { get; } + public string TimeToLivePropertyPath { get; set; } + public UniqueKeyPolicy UniqueKeyPolicy { get; set; } + } + public class ContainerRequestOptions : RequestOptions + { + public ContainerRequestOptions(); + public bool PopulateQuotaInfo { get; set; } + } + public class ContainerResponse : Response + { + protected ContainerResponse(); + public override string ActivityId { get; } + public virtual Container Container { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override ContainerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Container (ContainerResponse response); + } + public class CosmosClient : IDisposable + { + protected CosmosClient(); + public CosmosClient(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, TokenCredential tokenCredential, CosmosClientOptions clientOptions=null); + public CosmosClient(string connectionString, CosmosClientOptions clientOptions=null); + public CosmosClient(string accountEndpoint, string authKeyOrResourceToken, CosmosClientOptions clientOptions=null); + public virtual CosmosClientOptions ClientOptions { get; } + public virtual Uri Endpoint { get; } + public virtual CosmosResponseFactory ResponseFactory { get; } + public static Task CreateAndInitializeAsync(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, TokenCredential tokenCredential, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string connectionString, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public static Task CreateAndInitializeAsync(string accountEndpoint, string authKeyOrResourceToken, IReadOnlyList> containers, CosmosClientOptions cosmosClientOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseIfNotExistsAsync(string id, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public virtual Task CreateDatabaseStreamAsync(DatabaseProperties databaseProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual Container GetContainer(string databaseId, string containerId); + public virtual Database GetDatabase(string id); + public virtual FeedIterator GetDatabaseQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual FeedIterator GetDatabaseQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public virtual Task ReadAccountAsync(); + } + public class CosmosClientOptions + { + public CosmosClientOptions(); + public bool AllowBulkExecution { get; set; } + public string ApplicationName { get; set; } + public IReadOnlyList ApplicationPreferredRegions { get; set; } + public string ApplicationRegion { get; set; } + public ConnectionMode ConnectionMode { get; set; } + public Nullable ConsistencyLevel { get; set; } + public Collection CustomHandlers { get; } + public Nullable EnableContentResponseOnWrite { get; set; } + public bool EnableTcpConnectionEndpointRediscovery { get; set; } + public int GatewayModeMaxConnectionLimit { get; set; } + public Func HttpClientFactory { get; set; } + public Nullable IdleTcpConnectionTimeout { get; set; } + public bool LimitToEndpoint { get; set; } + public Nullable MaxRequestsPerTcpConnection { get; set; } + public Nullable MaxRetryAttemptsOnRateLimitedRequests { get; set; } + public Nullable MaxRetryWaitTimeOnRateLimitedRequests { get; set; } + public Nullable MaxTcpConnectionsPerEndpoint { get; set; } + public Nullable OpenTcpConnectionTimeout { get; set; } + public Nullable PortReuseMode { get; set; } + public TimeSpan RequestTimeout { get; set; } + public CosmosSerializer Serializer { get; set; } + public CosmosSerializationOptions SerializerOptions { get; set; } + public Func ServerCertificateCustomValidationCallback { get; set; } + public Nullable TokenCredentialBackgroundRefreshInterval { get; set; } + public IWebProxy WebProxy { get; set; } + } + public abstract class CosmosDiagnostics + { + protected CosmosDiagnostics(); + public virtual TimeSpan GetClientElapsedTime(); + public abstract IReadOnlyList> GetContactedRegions(); + public virtual int GetFailedRequestCount(); + public virtual Nullable GetStartTimeUtc(); + public abstract override string ToString(); + } + public class CosmosException : Exception + { + public CosmosException(string message, HttpStatusCode statusCode, int subStatusCode, string activityId, double requestCharge); + public virtual string ActivityId { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual Headers Headers { get; } + public override string Message { get; } + public virtual double RequestCharge { get; } + public virtual string ResponseBody { get; } + public virtual Nullable RetryAfter { get; } + public override string StackTrace { get; } + public virtual HttpStatusCode StatusCode { get; } + public virtual int SubStatusCode { get; } + public override string ToString(); + public virtual bool TryGetHeader(string headerName, out string value); + } + public sealed class CosmosLinqSerializerOptions + { + public CosmosLinqSerializerOptions(); + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public class CosmosOperationCanceledException : OperationCanceledException + { + public CosmosOperationCanceledException(OperationCanceledException originalException, CosmosDiagnostics diagnostics); + protected CosmosOperationCanceledException(SerializationInfo info, StreamingContext context); + public override IDictionary Data { get; } + public CosmosDiagnostics Diagnostics { get; } + public override string HelpLink { get; set; } + public override string Message { get; } + public override string Source { get; set; } + public override string StackTrace { get; } + public override Exception GetBaseException(); + public override void GetObjectData(SerializationInfo info, StreamingContext context); + public override string ToString(); + } + public enum CosmosPropertyNamingPolicy + { + CamelCase = 1, + Default = 0, + } + public abstract class CosmosResponseFactory + { + protected CosmosResponseFactory(); + public abstract FeedResponse CreateItemFeedResponse(ResponseMessage responseMessage); + public abstract ItemResponse CreateItemResponse(ResponseMessage responseMessage); + public abstract StoredProcedureExecuteResponse CreateStoredProcedureExecuteResponse(ResponseMessage responseMessage); + } + public sealed class CosmosSerializationOptions + { + public CosmosSerializationOptions(); + public bool IgnoreNullValues { get; set; } + public bool Indented { get; set; } + public CosmosPropertyNamingPolicy PropertyNamingPolicy { get; set; } + } + public abstract class CosmosSerializer + { + protected CosmosSerializer(); + public abstract T FromStream(Stream stream); + public abstract Stream ToStream(T input); + } + public abstract class Database + { + protected Database(); + public abstract CosmosClient Client { get; } + public abstract string Id { get; } + public abstract Task CreateClientEncryptionKeyAsync(ClientEncryptionKeyProperties clientEncryptionKeyProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerIfNotExistsAsync(string id, string partitionKeyPath, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateContainerStreamAsync(ContainerProperties containerProperties, Nullable throughput=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ContainerBuilder DefineContainer(string name, string partitionKeyPath); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract ClientEncryptionKey GetClientEncryptionKey(string id); + public abstract FeedIterator GetClientEncryptionKeyQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Container GetContainer(string id); + public abstract FeedIterator GetContainerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetContainerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract User GetUser(string id); + public abstract FeedIterator GetUserQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadStreamAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadThroughputAsync(RequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ReadThroughputAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(ThroughputProperties throughputProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceThroughputAsync(int throughput, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertUserAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class DatabaseProperties + { + public DatabaseProperties(); + public DatabaseProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class DatabaseResponse : Response + { + protected DatabaseResponse(); + public override string ActivityId { get; } + public virtual Database Database { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override DatabaseProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Database (DatabaseResponse response); + } + public enum DataType + { + LineString = 3, + MultiPolygon = 5, + Number = 0, + Point = 2, + Polygon = 4, + String = 1, + } + public class DedicatedGatewayRequestOptions + { + public DedicatedGatewayRequestOptions(); + public Nullable MaxIntegratedCacheStaleness { get; set; } + } + public class EncryptionKeyWrapMetadata : IEquatable + { + public EncryptionKeyWrapMetadata(EncryptionKeyWrapMetadata source); + public EncryptionKeyWrapMetadata(string type, string name, string value, string algorithm); + public string Algorithm { get; } + public string Name { get; } + public string Type { get; } + public string Value { get; } + public bool Equals(EncryptionKeyWrapMetadata other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class ExcludedPath + { + public ExcludedPath(); + public string Path { get; set; } + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedIterator : IDisposable + { + protected FeedIterator(); + public abstract bool HasMoreResults { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public abstract Task> ReadNextAsync(CancellationToken cancellationToken=default(CancellationToken)); + } + public abstract class FeedRange + { + protected FeedRange(); + public static FeedRange FromJsonString(string toStringValue); + public static FeedRange FromPartitionKey(PartitionKey partitionKey); + public abstract string ToJsonString(); + } + public abstract class FeedResponse : IEnumerable, IEnumerable + { + protected FeedResponse(); + public override string ActivityId { get; } + public abstract string ContinuationToken { get; } + public abstract int Count { get; } + public override string ETag { get; } + public abstract string IndexMetrics { get; } + public override double RequestCharge { get; } + public abstract IEnumerator GetEnumerator(); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public sealed class GeospatialConfig + { + public GeospatialConfig(); + public GeospatialConfig(GeospatialType geospatialType); + public GeospatialType GeospatialType { get; set; } + } + public enum GeospatialType + { + Geography = 0, + Geometry = 1, + } + public class Headers : IEnumerable + { + public Headers(); + public virtual string ActivityId { get; } + public virtual string ContentLength { get; set; } + public virtual string ContentType { get; } + public virtual string ContinuationToken { get; } + public virtual string ETag { get; } + public virtual string this[string headerName] { get; set; } + public virtual string Location { get; } + public virtual double RequestCharge { get; } + public virtual string Session { get; } + public virtual void Add(string headerName, IEnumerable values); + public virtual void Add(string headerName, string value); + public virtual string[] AllKeys(); + public virtual string Get(string headerName); + public virtual IEnumerator GetEnumerator(); + public virtual T GetHeaderValue(string headerName); + public virtual string GetValueOrDefault(string headerName); + public virtual void Remove(string headerName); + public virtual void Set(string headerName, string value); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + public virtual bool TryGetValue(string headerName, out string value); + } + public sealed class IncludedPath + { + public IncludedPath(); + public string Path { get; set; } + } + public enum IndexingDirective + { + Default = 0, + Exclude = 2, + Include = 1, + } + public enum IndexingMode + { + Consistent = 0, + Lazy = 1, + None = 2, + } + public sealed class IndexingPolicy + { + public IndexingPolicy(); + public bool Automatic { get; set; } + public Collection> CompositeIndexes { get; } + public Collection ExcludedPaths { get; } + public Collection IncludedPaths { get; } + public IndexingMode IndexingMode { get; set; } + public Collection SpatialIndexes { get; } + } + public enum IndexKind + { + Hash = 0, + Range = 1, + Spatial = 2, + } + public class ItemRequestOptions : RequestOptions + { + public ItemRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + public IEnumerable PostTriggers { get; set; } + public IEnumerable PreTriggers { get; set; } + public string SessionToken { get; set; } + } + public class ItemResponse : Response + { + protected ItemResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public override HttpStatusCode StatusCode { get; } + } + public enum OperationKind + { + Create = 1, + Delete = 3, + Invalid = 0, + Read = 4, + Replace = 2, + } + public struct PartitionKey : IEquatable + { + public static readonly PartitionKey None; + public static readonly PartitionKey Null; + public static readonly string SystemKeyName; + public static readonly string SystemKeyPath; + public PartitionKey(bool partitionKeyValue); + public PartitionKey(double partitionKeyValue); + public PartitionKey(string partitionKeyValue); + public bool Equals(PartitionKey other); + public override bool Equals(object obj); + public override int GetHashCode(); + public static bool operator ==(PartitionKey left, PartitionKey right); + public static bool operator !=(PartitionKey left, PartitionKey right); + public override string ToString(); + } + public sealed class PartitionKeyBuilder + { + public PartitionKeyBuilder(); + public PartitionKeyBuilder Add(bool val); + public PartitionKeyBuilder Add(double val); + public PartitionKeyBuilder Add(string val); + public PartitionKeyBuilder AddNoneType(); + public PartitionKeyBuilder AddNullValue(); + public PartitionKey Build(); + } + public enum PartitionKeyDefinitionVersion + { + V1 = 1, + V2 = 2, + } + public sealed class PatchItemRequestOptions : ItemRequestOptions + { + public PatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public abstract class PatchOperation + { + protected PatchOperation(); + public virtual string From { get; set; } + public abstract PatchOperationType OperationType { get; } + public abstract string Path { get; } + public static PatchOperation Add(string path, T value); + public static PatchOperation Increment(string path, double value); + public static PatchOperation Increment(string path, long value); + public static PatchOperation Move(string from, string path); + public static PatchOperation Remove(string path); + public static PatchOperation Replace(string path, T value); + public static PatchOperation Set(string path, T value); + public virtual bool TrySerializeValueParameter(CosmosSerializer cosmosSerializer, out Stream valueParam); + } + public enum PatchOperationType + { + Add = 0, + Increment = 4, + Move = 5, + Remove = 1, + Replace = 2, + Set = 3, + } + public abstract class PatchOperation : PatchOperation + { + protected PatchOperation(); + public abstract T Value { get; } + } + public abstract class Permission + { + protected Permission(); + public abstract string Id { get; } + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadAsync(Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public enum PermissionMode : byte + { + All = (byte)2, + Read = (byte)1, + } + public class PermissionProperties + { + public PermissionProperties(string id, PermissionMode permissionMode, Container container, PartitionKey resourcePartitionKey, string itemId); + public PermissionProperties(string id, PermissionMode permissionMode, Container container, Nullable resourcePartitionKey=default(Nullable)); + public string ETag { get; } + public string Id { get; } + public Nullable LastModified { get; } + public PermissionMode PermissionMode { get; } + public Nullable ResourcePartitionKey { get; set; } + public string ResourceUri { get; } + public string SelfLink { get; } + public string Token { get; } + } + public class PermissionResponse : Response + { + protected PermissionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public virtual Permission Permission { get; } + public override double RequestCharge { get; } + public override PermissionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator Permission (PermissionResponse response); + } + public enum PortReuseMode + { + PrivatePortPool = 1, + ReuseUnicastPort = 0, + } + public class QueryDefinition + { + public QueryDefinition(string query); + public string QueryText { get; } + public IReadOnlyList> GetQueryParameters(); + public QueryDefinition WithParameter(string name, object value); + public QueryDefinition WithParameterStream(string name, Stream valueStream); + } + public class QueryRequestOptions : RequestOptions + { + public QueryRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public DedicatedGatewayRequestOptions DedicatedGatewayRequestOptions { get; set; } + public Nullable EnableLowPrecisionOrderBy { get; set; } + public Nullable EnableScanInQuery { get; set; } + public Nullable MaxBufferedItemCount { get; set; } + public Nullable MaxConcurrency { get; set; } + public Nullable MaxItemCount { get; set; } + public Nullable PartitionKey { get; set; } + public Nullable PopulateIndexMetrics { get; set; } + public Nullable ResponseContinuationTokenLimitInKb { get; set; } + public string SessionToken { get; set; } + } + public class ReadManyRequestOptions : RequestOptions + { + public ReadManyRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public static class Regions + { + public const string AustraliaCentral = "Australia Central"; + public const string AustraliaCentral2 = "Australia Central 2"; + public const string AustraliaEast = "Australia East"; + public const string AustraliaSoutheast = "Australia Southeast"; + public const string BrazilSouth = "Brazil South"; + public const string BrazilSoutheast = "Brazil Southeast"; + public const string CanadaCentral = "Canada Central"; + public const string CanadaEast = "Canada East"; + public const string CentralIndia = "Central India"; + public const string CentralUS = "Central US"; + public const string CentralUSEUAP = "Central US EUAP"; + public const string ChinaEast = "China East"; + public const string ChinaEast2 = "China East 2"; + public const string ChinaEast3 = "China East 3"; + public const string ChinaNorth = "China North"; + public const string ChinaNorth2 = "China North 2"; + public const string ChinaNorth3 = "China North 3"; + public const string EastAsia = "East Asia"; + public const string EastUS = "East US"; + public const string EastUS2 = "East US 2"; + public const string EastUS2EUAP = "East US 2 EUAP"; + public const string EastUSSLV = "East US SLV"; + public const string FranceCentral = "France Central"; + public const string FranceSouth = "France South"; + public const string GermanyCentral = "Germany Central"; + public const string GermanyNorth = "Germany North"; + public const string GermanyNortheast = "Germany Northeast"; + public const string GermanyWestCentral = "Germany West Central"; + public const string IsraelCentral = "Israel Central"; + public const string ItalyNorth = "Italy North"; + public const string JapanEast = "Japan East"; + public const string JapanWest = "Japan West"; + public const string JioIndiaCentral = "Jio India Central"; + public const string JioIndiaWest = "Jio India West"; + public const string KoreaCentral = "Korea Central"; + public const string KoreaSouth = "Korea South"; + public const string MalaysiaSouth = "Malaysia South"; + public const string NorthCentralUS = "North Central US"; + public const string NorthEurope = "North Europe"; + public const string NorwayEast = "Norway East"; + public const string NorwayWest = "Norway West"; + public const string PolandCentral = "Poland Central"; + public const string QatarCentral = "Qatar Central"; + public const string SouthAfricaNorth = "South Africa North"; + public const string SouthAfricaWest = "South Africa West"; + public const string SouthCentralUS = "South Central US"; + public const string SoutheastAsia = "Southeast Asia"; + public const string SouthIndia = "South India"; + public const string SwedenCentral = "Sweden Central"; + public const string SwedenSouth = "Sweden South"; + public const string SwitzerlandNorth = "Switzerland North"; + public const string SwitzerlandWest = "Switzerland West"; + public const string UAECentral = "UAE Central"; + public const string UAENorth = "UAE North"; + public const string UKSouth = "UK South"; + public const string UKWest = "UK West"; + public const string USDoDCentral = "USDoD Central"; + public const string USDoDEast = "USDoD East"; + public const string USGovArizona = "USGov Arizona"; + public const string USGovTexas = "USGov Texas"; + public const string USGovVirginia = "USGov Virginia"; + public const string USNatEast = "USNat East"; + public const string USNatWest = "USNat West"; + public const string USSecEast = "USSec East"; + public const string USSecWest = "USSec West"; + public const string WestCentralUS = "West Central US"; + public const string WestEurope = "West Europe"; + public const string WestIndia = "West India"; + public const string WestUS = "West US"; + public const string WestUS2 = "West US 2"; + public const string WestUS3 = "West US 3"; + } + public abstract class RequestHandler + { + protected RequestHandler(); + public RequestHandler InnerHandler { get; set; } + public virtual Task SendAsync(RequestMessage request, CancellationToken cancellationToken); + } + public class RequestMessage : IDisposable + { + public RequestMessage(); + public RequestMessage(HttpMethod method, Uri requestUri); + public virtual Stream Content { get; set; } + public virtual Headers Headers { get; } + public virtual HttpMethod Method { get; } + public virtual Dictionary Properties { get; } + public virtual Uri RequestUri { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + } + public class RequestOptions + { + public RequestOptions(); + public Action AddRequestHeaders { get; set; } + public string IfMatchEtag { get; set; } + public string IfNoneMatchEtag { get; set; } + public IReadOnlyDictionary Properties { get; set; } + public RequestOptions ShallowCopy(); + } + public class ResponseMessage : IDisposable + { + public ResponseMessage(); + public ResponseMessage(HttpStatusCode statusCode, RequestMessage requestMessage=null, string errorMessage=null); + public virtual Stream Content { get; set; } + public virtual string ContinuationToken { get; } + public virtual CosmosDiagnostics Diagnostics { get; set; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public string IndexMetrics { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual RequestMessage RequestMessage { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual ResponseMessage EnsureSuccessStatusCode(); + } + public abstract class Response + { + protected Response(); + public abstract string ActivityId { get; } + public abstract CosmosDiagnostics Diagnostics { get; } + public abstract string ETag { get; } + public abstract Headers Headers { get; } + public abstract double RequestCharge { get; } + public abstract T Resource { get; } + public abstract HttpStatusCode StatusCode { get; } + public static implicit operator T (Response response); + } + public sealed class SpatialPath + { + public SpatialPath(); + public BoundingBoxProperties BoundingBox { get; set; } + public string Path { get; set; } + public Collection SpatialTypes { get; } + } + public enum SpatialType + { + LineString = 1, + MultiPolygon = 3, + Point = 0, + Polygon = 2, + } + public class ThroughputProperties + { + public Nullable AutoscaleMaxThroughput { get; } + public string ETag { get; } + public Nullable LastModified { get; } + public string SelfLink { get; } + public Nullable Throughput { get; } + public static ThroughputProperties CreateAutoscaleThroughput(int autoscaleMaxThroughput); + public static ThroughputProperties CreateManualThroughput(int throughput); + } + public class ThroughputResponse : Response + { + protected ThroughputResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public Nullable IsReplacePending { get; } + public Nullable MinThroughput { get; } + public override double RequestCharge { get; } + public override ThroughputProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator ThroughputProperties (ThroughputResponse response); + } + public abstract class TransactionalBatch + { + protected TransactionalBatch(); + public abstract TransactionalBatch CreateItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch CreateItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch DeleteItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract Task ExecuteAsync(TransactionalBatchRequestOptions requestOptions, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteAsync(CancellationToken cancellationToken=default(CancellationToken)); + public abstract TransactionalBatch PatchItem(string id, IReadOnlyList patchOperations, TransactionalBatchPatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReadItem(string id, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItemStream(string id, Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch ReplaceItem(string id, T item, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItemStream(Stream streamPayload, TransactionalBatchItemRequestOptions requestOptions=null); + public abstract TransactionalBatch UpsertItem(T item, TransactionalBatchItemRequestOptions requestOptions=null); + } + public class TransactionalBatchItemRequestOptions : RequestOptions + { + public TransactionalBatchItemRequestOptions(); + public Nullable EnableContentResponseOnWrite { get; set; } + public Nullable IndexingDirective { get; set; } + } + public class TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual string ETag { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual Stream ResourceStream { get; } + public virtual TimeSpan RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + } + public class TransactionalBatchOperationResult : TransactionalBatchOperationResult + { + protected TransactionalBatchOperationResult(); + public virtual T Resource { get; set; } + } + public class TransactionalBatchPatchItemRequestOptions : TransactionalBatchItemRequestOptions + { + public TransactionalBatchPatchItemRequestOptions(); + public string FilterPredicate { get; set; } + } + public class TransactionalBatchRequestOptions : RequestOptions + { + public TransactionalBatchRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public string SessionToken { get; set; } + } + public class TransactionalBatchResponse : IDisposable, IEnumerable, IEnumerable, IReadOnlyCollection, IReadOnlyList + { + protected TransactionalBatchResponse(); + public virtual string ActivityId { get; } + public virtual int Count { get; } + public virtual CosmosDiagnostics Diagnostics { get; } + public virtual string ErrorMessage { get; } + public virtual Headers Headers { get; } + public virtual bool IsSuccessStatusCode { get; } + public virtual TransactionalBatchOperationResult this[int index] { get; } + public virtual double RequestCharge { get; } + public virtual Nullable RetryAfter { get; } + public virtual HttpStatusCode StatusCode { get; } + public void Dispose(); + protected virtual void Dispose(bool disposing); + public virtual IEnumerator GetEnumerator(); + public virtual TransactionalBatchOperationResult GetOperationResultAtIndex(int index); + IEnumerator System.Collections.IEnumerable.GetEnumerator(); + } + public class UniqueKey + { + public UniqueKey(); + public Collection Paths { get; } + } + public sealed class UniqueKeyPolicy + { + public UniqueKeyPolicy(); + public Collection UniqueKeys { get; } + } + public abstract class User + { + protected User(); + public abstract string Id { get; } + public abstract Task CreatePermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Permission GetPermission(string id); + public abstract FeedIterator GetPermissionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetPermissionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadAsync(RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceAsync(UserProperties userProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task UpsertPermissionAsync(PermissionProperties permissionProperties, Nullable tokenExpiryInSeconds=default(Nullable), RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class UserProperties + { + protected UserProperties(); + public UserProperties(string id); + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class UserResponse : Response + { + protected UserResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public virtual User User { get; } + public static implicit operator User (UserResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Fluent +{ + public sealed class ClientEncryptionPolicyDefinition + { + public ContainerBuilder Attach(); + public ClientEncryptionPolicyDefinition WithIncludedPath(ClientEncryptionIncludedPath path); + } + public class CompositeIndexDefinition + { + public T Attach(); + public CompositeIndexDefinition Path(string path); + public CompositeIndexDefinition Path(string path, CompositePathSortOrder sortOrder); + } + public class ConflictResolutionDefinition + { + public ContainerBuilder Attach(); + public ConflictResolutionDefinition WithCustomStoredProcedureResolution(string conflictResolutionProcedure); + public ConflictResolutionDefinition WithLastWriterWinsResolution(string conflictResolutionPath); + } + public class ContainerBuilder : ContainerDefinition + { + protected ContainerBuilder(); + public ContainerBuilder(Database database, string name, string partitionKeyPath); + public new ContainerProperties Build(); + public Task CreateAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(ThroughputProperties throughputProperties, CancellationToken cancellationToken=default(CancellationToken)); + public Task CreateIfNotExistsAsync(Nullable throughput=default(Nullable), CancellationToken cancellationToken=default(CancellationToken)); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(); + public ClientEncryptionPolicyDefinition WithClientEncryptionPolicy(int policyFormatVersion); + public ConflictResolutionDefinition WithConflictResolution(); + public UniqueKeyDefinition WithUniqueKey(); + } + public abstract class ContainerDefinition where T : ContainerDefinition + { + public ContainerDefinition(); + public ContainerProperties Build(); + public T WithDefaultTimeToLive(int defaultTtlInSeconds); + public T WithDefaultTimeToLive(TimeSpan defaultTtlTimeSpan); + public IndexingPolicyDefinition WithIndexingPolicy(); + public T WithPartitionKeyDefinitionVersion(PartitionKeyDefinitionVersion partitionKeyDefinitionVersion); + public T WithTimeToLivePropertyPath(string propertyPath); + } + public class CosmosClientBuilder + { + public CosmosClientBuilder(string connectionString); + public CosmosClientBuilder(string accountEndpoint, AzureKeyCredential authKeyOrResourceTokenCredential); + public CosmosClientBuilder(string accountEndpoint, TokenCredential tokenCredential); + public CosmosClientBuilder(string accountEndpoint, string authKeyOrResourceToken); + public CosmosClientBuilder AddCustomHandlers(params RequestHandler[] customHandlers); + public CosmosClient Build(); + public Task BuildAndInitializeAsync(IReadOnlyList> containers, CancellationToken cancellationToken=default(CancellationToken)); + public CosmosClientBuilder WithApplicationName(string applicationName); + public CosmosClientBuilder WithApplicationPreferredRegions(IReadOnlyList applicationPreferredRegions); + public CosmosClientBuilder WithApplicationRegion(string applicationRegion); + public CosmosClientBuilder WithBulkExecution(bool enabled); + public CosmosClientBuilder WithConnectionModeDirect(); + public CosmosClientBuilder WithConnectionModeDirect(Nullable idleTcpConnectionTimeout=default(Nullable), Nullable openTcpConnectionTimeout=default(Nullable), Nullable maxRequestsPerTcpConnection=default(Nullable), Nullable maxTcpConnectionsPerEndpoint=default(Nullable), Nullable portReuseMode=default(Nullable), Nullable enableTcpConnectionEndpointRediscovery=default(Nullable)); + public CosmosClientBuilder WithConnectionModeGateway(Nullable maxConnectionLimit=default(Nullable), IWebProxy webProxy=null); + public CosmosClientBuilder WithConsistencyLevel(ConsistencyLevel consistencyLevel); + public CosmosClientBuilder WithContentResponseOnWrite(bool contentResponseOnWrite); + public CosmosClientBuilder WithCustomSerializer(CosmosSerializer cosmosJsonSerializer); + public CosmosClientBuilder WithHttpClientFactory(Func httpClientFactory); + public CosmosClientBuilder WithLimitToEndpoint(bool limitToEndpoint); + public CosmosClientBuilder WithRequestTimeout(TimeSpan requestTimeout); + public CosmosClientBuilder WithSerializerOptions(CosmosSerializationOptions cosmosSerializerOptions); + public CosmosClientBuilder WithThrottlingRetryOptions(TimeSpan maxRetryWaitTimeOnThrottledRequests, int maxRetryAttemptsOnThrottledRequests); + } + public class IndexingPolicyDefinition + { + public IndexingPolicyDefinition(); + public T Attach(); + public IndexingPolicyDefinition WithAutomaticIndexing(bool enabled); + public CompositeIndexDefinition> WithCompositeIndex(); + public PathsDefinition> WithExcludedPaths(); + public PathsDefinition> WithIncludedPaths(); + public IndexingPolicyDefinition WithIndexingMode(IndexingMode indexingMode); + public SpatialIndexDefinition> WithSpatialIndex(); + } + public class PathsDefinition + { + public T Attach(); + public PathsDefinition Path(string path); + } + public class SpatialIndexDefinition + { + public T Attach(); + public SpatialIndexDefinition Path(string path); + public SpatialIndexDefinition Path(string path, params SpatialType[] spatialTypes); + } + public class UniqueKeyDefinition + { + public ContainerBuilder Attach(); + public UniqueKeyDefinition Path(string path); + } +} +namespace Microsoft.Azure.Cosmos.Linq +{ + public static class CosmosLinq + { + public static object InvokeUserDefinedFunction(string udfName, params object[] arguments); + } + public static class CosmosLinqExtensions + { + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> AverageAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> AverageAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> CountAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static bool IsArray(this object obj); + public static bool IsBool(this object obj); + public static bool IsDefined(this object obj); + public static bool IsNull(this object obj); + public static bool IsNumber(this object obj); + public static bool IsObject(this object obj); + public static bool IsPrimitive(this object obj); + public static bool IsString(this object obj); + public static Task> MaxAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> MinAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task>> SumAsync(this IQueryable> source, CancellationToken cancellationToken=default(CancellationToken)); + public static Task> SumAsync(this IQueryable source, CancellationToken cancellationToken=default(CancellationToken)); + public static FeedIterator ToFeedIterator(this IQueryable query); + public static QueryDefinition ToQueryDefinition(this IQueryable query); + public static FeedIterator ToStreamIterator(this IQueryable query); + } +} +namespace Microsoft.Azure.Cosmos.Scripts +{ + public abstract class Scripts + { + protected Scripts(); + public abstract Task CreateStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task CreateUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task DeleteUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task> ExecuteStoredProcedureAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, PartitionKey partitionKey, dynamic parameters, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ExecuteStoredProcedureStreamAsync(string storedProcedureId, Stream streamPayload, PartitionKey partitionKey, StoredProcedureRequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract FeedIterator GetStoredProcedureQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetStoredProcedureQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetTriggerQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(QueryDefinition queryDefinition, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract FeedIterator GetUserDefinedFunctionQueryStreamIterator(string queryText=null, string continuationToken=null, QueryRequestOptions requestOptions=null); + public abstract Task ReadStoredProcedureAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadTriggerAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReadUserDefinedFunctionAsync(string id, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceStoredProcedureAsync(StoredProcedureProperties storedProcedureProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceTriggerAsync(TriggerProperties triggerProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + public abstract Task ReplaceUserDefinedFunctionAsync(UserDefinedFunctionProperties userDefinedFunctionProperties, RequestOptions requestOptions=null, CancellationToken cancellationToken=default(CancellationToken)); + } + public class StoredProcedureExecuteResponse : Response + { + protected StoredProcedureExecuteResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override T Resource { get; } + public virtual string ScriptLog { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + } + public class StoredProcedureProperties + { + public StoredProcedureProperties(); + public StoredProcedureProperties(string id, string body); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public Nullable LastModified { get; } + public string SelfLink { get; } + } + public class StoredProcedureRequestOptions : RequestOptions + { + public StoredProcedureRequestOptions(); + public Nullable ConsistencyLevel { get; set; } + public bool EnableScriptLogging { get; set; } + public string SessionToken { get; set; } + } + public class StoredProcedureResponse : Response + { + protected StoredProcedureResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override StoredProcedureProperties Resource { get; } + public virtual string SessionToken { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator StoredProcedureProperties (StoredProcedureResponse response); + } + public enum TriggerOperation : short + { + All = (short)0, + Create = (short)1, + Delete = (short)3, + Replace = (short)4, + Update = (short)2, + } + public class TriggerProperties + { + public TriggerProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + public TriggerOperation TriggerOperation { get; set; } + public TriggerType TriggerType { get; set; } + } + public class TriggerResponse : Response + { + protected TriggerResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override TriggerProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator TriggerProperties (TriggerResponse response); + } + public enum TriggerType : byte + { + Post = (byte)1, + Pre = (byte)0, + } + public class UserDefinedFunctionProperties + { + public UserDefinedFunctionProperties(); + public string Body { get; set; } + public string ETag { get; } + public string Id { get; set; } + public string SelfLink { get; } + } + public class UserDefinedFunctionResponse : Response + { + protected UserDefinedFunctionResponse(); + public override string ActivityId { get; } + public override CosmosDiagnostics Diagnostics { get; } + public override string ETag { get; } + public override Headers Headers { get; } + public override double RequestCharge { get; } + public override UserDefinedFunctionProperties Resource { get; } + public override HttpStatusCode StatusCode { get; } + public static implicit operator UserDefinedFunctionProperties (UserDefinedFunctionResponse response); + } +} +namespace Microsoft.Azure.Cosmos.Spatial +{ + public sealed class BoundingBox : IEquatable + { + public BoundingBox(Position min, Position max); + public Position Max { get; } + public Position Min { get; } + public bool Equals(BoundingBox other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public abstract class Crs + { + protected Crs(CrsType type); + public static Crs Default { get; } + public CrsType Type { get; } + public static Crs Unspecified { get; } + public static LinkedCrs Linked(string href); + public static LinkedCrs Linked(string href, string type); + public static NamedCrs Named(string name); + } + public enum CrsType + { + Linked = 1, + Named = 0, + Unspecified = 2, + } + public abstract class Geometry + { + protected Geometry(GeometryType type, GeometryParams geometryParams); + public IDictionary AdditionalProperties { get; } + public BoundingBox BoundingBox { get; } + public Crs Crs { get; } + public GeometryType Type { get; } + public double Distance(Geometry to); + public override bool Equals(object obj); + public override int GetHashCode(); + public bool Intersects(Geometry geometry2); + public bool IsValid(); + public GeometryValidationResult IsValidDetailed(); + public bool Within(Geometry outer); + } + public class GeometryParams + { + public GeometryParams(); + public IDictionary AdditionalProperties { get; set; } + public BoundingBox BoundingBox { get; set; } + public Crs Crs { get; set; } + } + public enum GeometryShape + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public enum GeometryType + { + GeometryCollection = 6, + LineString = 2, + MultiLineString = 3, + MultiPoint = 1, + MultiPolygon = 5, + Point = 0, + Polygon = 4, + } + public class GeometryValidationResult + { + public GeometryValidationResult(); + public bool IsValid { get; } + public string Reason { get; } + } + public sealed class LinearRing : IEquatable + { + public LinearRing(IList coordinates); + public ReadOnlyCollection Positions { get; } + public bool Equals(LinearRing other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LineString : Geometry, IEquatable + { + public LineString(IList coordinates); + public LineString(IList coordinates, GeometryParams geometryParams); + public ReadOnlyCollection Positions { get; } + public bool Equals(LineString other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class LinkedCrs : Crs, IEquatable + { + public string Href { get; } + public string HrefType { get; } + public bool Equals(LinkedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class MultiPolygon : Geometry, IEquatable + { + public MultiPolygon(IList polygons); + public MultiPolygon(IList polygons, GeometryParams geometryParams); + public ReadOnlyCollection Polygons { get; } + public bool Equals(MultiPolygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class NamedCrs : Crs, IEquatable + { + public string Name { get; } + public bool Equals(NamedCrs other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Point : Geometry, IEquatable + { + public Point(Position position); + public Point(Position position, GeometryParams geometryParams); + public Point(double longitude, double latitude); + public Position Position { get; } + public bool Equals(Point other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Polygon : Geometry, IEquatable + { + public Polygon(IList rings); + public Polygon(IList rings, GeometryParams geometryParams); + public Polygon(IList externalRingPositions); + public ReadOnlyCollection Rings { get; } + public bool Equals(Polygon other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class PolygonCoordinates : IEquatable + { + public PolygonCoordinates(IList rings); + public ReadOnlyCollection Rings { get; } + public bool Equals(PolygonCoordinates other); + public override bool Equals(object obj); + public override int GetHashCode(); + } + public sealed class Position : IEquatable + { + public Position(IList coordinates); + public Position(double longitude, double latitude); + public Position(double longitude, double latitude, Nullable altitude); + public Nullable Altitude { get; } + public ReadOnlyCollection Coordinates { get; } + public double Latitude { get; } + public double Longitude { get; } + public bool Equals(Position other); + public override bool Equals(object obj); + public override int GetHashCode(); + } +} diff --git a/changelog.md b/changelog.md index f72c7fd59f..481cde52db 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,24 @@ Preview features are treated as a separate branch and will not be included in th The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +###
[3.35.2-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.2-preview) - 2023-07-17 + +#### Fixed +- [3973](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3973) Application Insights Integration: Fixes event generation for failed requests + +#### Added +- [3951](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3951) Upgrade Resiliency: Adds Code to Enable Replica Validation Feature By Default for Preview + +### [3.35.2](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.2) - 2023-07-17 + +#### Fixed +- [3917](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3917) Query: Fixes malformed continuation token exception type and message +- [3969](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3969) Diagnostics: Fixes verbose levels for "Operation will NOT be retried" + +#### Added +- [3668](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3668) Query : Adds string comparison alternative when converting LINQ to SQL (Thanks [@ernesto1596](https://github.com/ernesto1596)) +- [3834](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3834) Query : Adds support for newtonsoft member access via ExtensionData (Thanks [@onionhammer](https://github.com/onionhammer)) + ### [3.35.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.1-preview) - 2023-06-27 ### [3.35.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.1) - 2023-06-27 From d71dcb2def59cfd07ad84eadc0a5793f8ae5b5a4 Mon Sep 17 00:00:00 2001 From: Kiran Kumar Kolli Date: Wed, 19 Jul 2023 14:02:05 -0700 Subject: [PATCH 163/164] [INTERNAL] LocalQuorum: Adds documentation for LocalQuorum (#3993) * Draft of local-quorum documentation * Adding experimental to header * Adding cross-region read guarantees * Reads Bounded clarification * Adding account consistency step also * Non-Prod usage note at top * Addressing review comments * Some more refinement --- docs/LocalQuorum.md | 59 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 docs/LocalQuorum.md diff --git a/docs/LocalQuorum.md b/docs/LocalQuorum.md new file mode 100644 index 0000000000..5ca45e9055 --- /dev/null +++ b/docs/LocalQuorum.md @@ -0,0 +1,59 @@ +> # NOT SUPPORTED FOR PRODUCTION USAGE +> # ONLY INTERNAL, DEVELOPMENT OR EXPERIMENTAL USAGE ONLY + + +## Context +Distributed databases that rely on replication for high availability, low latency, or both, must make a fundamental tradeoff between the read consistency, availability, latency, and throughput. + +The linearizability of the strong consistency model is the gold standard of data programmability. But it adds a steep price from higher write latencies due to data having to replicate and commit across large distances. Strong consistency may also suffer from reduced availability (during failures) because data can't replicate and commit in every region. Eventual consistency offers higher availability and better performance, but it's more difficult to program applications because data may not be consistent across all regions (eventual reads are not guaranteed to be monotonic). + + +Please refer to [public documentation](https://learn.microsoft.com/en-us/azure/cosmos-db/consistency-levels) for more details. + + +Many applications can benefit from having a read-write model like below + +| Operation | Write-Region | Replicated-Regions | +|---|---|---| +|Write | Write high availabillity in write region
vs BoundedStaleness: write un-availability when bounds are violated | Eventual replication: Asynchronous non-blocking, possibly unbounded staleness
vs BoundedStaleness: staleness limited by bounds | +|Read |**Single write region**: Read my writes
**Multiple write regions**: read-my-writes from the region of writes, otherwise eventual
Monotonic reads
No sessionToken management| **Single write region**: Eventual read
**Multiple write regions**: read-my-writes from the region of writes, otherwise eventual
Monotonic reads
No sessionToken management | + +> ### NOTE: cross-region reads will violate the monotonic reads guarantee + + +## How-TO +It involves three stages + +#### Create CosmosDB account with Eventual/ConsistentPrefix/Session consistency + +#### Enabling/opt-in ability to upgrade consistency level +SDK version: MA [3.35.1](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md#-3351---2023-06-27) or [minimum recommended version](https://github.com/Azure/azure-cosmos-dotnet-v3/blob/master/changelog.md#-recommended-version) + +```C# +CosmosClientOptions clientOptions = new CosmosClientOptions(); +var upgradeConsistencyProperty = clientOptions.GetType().GetProperty("EnableUpgradeConsistencyToLocalQuorum", BindingFlags.NonPublic | BindingFlags.Instance); +upgradeConsistencyProperty.SetValue(clientOptions, true); + +CosmosClient cosmosClient = new CosmosClient(..., clientOptions); +``` + +#### Per request upgrade consistency to Bounded +> ###### Please note that Bounded here is only used as HINT for SDK to do quorum reads +> ###### It will not impact CosmosDB account or write consistency levels + +```C# +ItemRequestOptions requestOption = new ItemRequestOptions(); +requestOption.ConsistencyLevel = ConsistencyLevel.Bounded; + +T item = await container.ReadItemAsync(docId, new PartitionKey(docPartitionKey), requestOption); +``` + +```C# +QueryRequestOptions requestOption = new QueryRequestOptions(); +requestOption.ConsistencyLevel = ConsistencyLevel.Bounded; + +await container.GetItemQueryIterator(queryText, continuationToken, requestOption); +``` + +> #### Please use Bounded only for per request options as pattern +> #### Single master account possibly Strong == Bounded (**TBD**) \ No newline at end of file From 5ec7b4bcd7e2e0698736cd374f2196682227c913 Mon Sep 17 00:00:00 2001 From: Debdatta Kunda <87335885+kundadebdatta@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:26:04 -0700 Subject: [PATCH 164/164] Code changes to update release note. (#3996) --- changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.md b/changelog.md index 481cde52db..ab733a4137 100644 --- a/changelog.md +++ b/changelog.md @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 #### Added - [3668](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3668) Query : Adds string comparison alternative when converting LINQ to SQL (Thanks [@ernesto1596](https://github.com/ernesto1596)) - [3834](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3834) Query : Adds support for newtonsoft member access via ExtensionData (Thanks [@onionhammer](https://github.com/onionhammer)) +- [3939](https://github.com/Azure/azure-cosmos-dotnet-v3/pull/3939) CreateAndInitializeAsync: Adds Code to Optimize Rntbd Open Connection Logic to Open Connections in Parallel ###
[3.35.1-preview](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.1-preview) - 2023-06-27 ### [3.35.1](https://www.nuget.org/packages/Microsoft.Azure.Cosmos/3.35.1) - 2023-06-27