Open Telemetry: Fixes Operation name to follow Otel convention (#4643)

* Changed Operation name according to open telemetry convention

* fix tests

* updated baseline

* fix tests

* renamed ops name

* fixed operatio name

* reverted few files

* append prefix

* fix tests

* remove commented code

* fix activity name

* code refatot for different operation name for diagnostics

* baseline files

* fix tests

* refcator code

* fix test

* remove stream

* feediterator changes

* fix bugs

* further fixes

* typo fix

* fix test
This commit is contained in:
Sourabh Jain 2024-09-18 07:01:37 +05:30 коммит произвёл GitHub
Родитель 9aafc77ffa
Коммит 6623de9434
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
50 изменённых файлов: 808 добавлений и 636 удалений

Просмотреть файл

@ -10,6 +10,7 @@ namespace Microsoft.Azure.Cosmos
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Documents;
internal class BatchCore : TransactionalBatchInternal
@ -18,6 +19,11 @@ namespace Microsoft.Azure.Cosmos
private readonly ContainerInternal container;
/// <summary>
/// The list of operations in the batch.
/// </summary>
protected List<ItemBatchOperation> operations;
/// <summary>
/// Initializes a new instance of the <see cref="BatchCore"/> class.
/// </summary>
@ -29,6 +35,8 @@ namespace Microsoft.Azure.Cosmos
{
this.container = container;
this.partitionKey = partitionKey;
this.operations = new List<ItemBatchOperation>();
}
public override TransactionalBatch CreateItem<T>(
@ -40,7 +48,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(item));
}
this.AddOperation(new ItemBatchOperation<T>(
this.operations.Add(new ItemBatchOperation<T>(
operationType: OperationType.Create,
operationIndex: this.operations.Count,
resource: item,
@ -59,7 +67,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(streamPayload));
}
this.AddOperation(new ItemBatchOperation(
this.operations.Add(new ItemBatchOperation(
operationType: OperationType.Create,
operationIndex: this.operations.Count,
resourceStream: streamPayload,
@ -78,7 +86,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(id));
}
this.AddOperation(new ItemBatchOperation(
this.operations.Add(new ItemBatchOperation(
operationType: OperationType.Read,
operationIndex: this.operations.Count,
id: id,
@ -97,7 +105,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(item));
}
this.AddOperation(new ItemBatchOperation<T>(
this.operations.Add(new ItemBatchOperation<T>(
operationType: OperationType.Upsert,
operationIndex: this.operations.Count,
resource: item,
@ -116,7 +124,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(streamPayload));
}
this.AddOperation(new ItemBatchOperation(
this.operations.Add(new ItemBatchOperation(
operationType: OperationType.Upsert,
operationIndex: this.operations.Count,
resourceStream: streamPayload,
@ -141,7 +149,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(item));
}
this.AddOperation(new ItemBatchOperation<T>(
this.operations.Add(new ItemBatchOperation<T>(
operationType: OperationType.Replace,
operationIndex: this.operations.Count,
id: id,
@ -167,7 +175,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(streamPayload));
}
this.AddOperation(new ItemBatchOperation(
this.operations.Add(new ItemBatchOperation(
operationType: OperationType.Replace,
operationIndex: this.operations.Count,
id: id,
@ -187,7 +195,7 @@ namespace Microsoft.Azure.Cosmos
throw new ArgumentNullException(nameof(id));
}
this.AddOperation(new ItemBatchOperation(
this.operations.Add(new ItemBatchOperation(
operationType: OperationType.Delete,
operationIndex: this.operations.Count,
id: id,
@ -232,10 +240,7 @@ namespace Microsoft.Azure.Cosmos
this.operations = new List<ItemBatchOperation>();
return executor.ExecuteAsync(trace, cancellationToken);
},
openTelemetry: (response) => new OpenTelemetryResponse(
responseMessage: response,
isHomogenousOperations: this.isHomogenousOperations,
batchOperation: this.homogenousOperation));
openTelemetry: new (OpenTelemetryConstants.Operations.ExecuteBatch, (response) => new OpenTelemetryResponse(responseMessage: response)));
}
/// <summary>
@ -250,7 +255,7 @@ namespace Microsoft.Azure.Cosmos
Stream patchStream,
TransactionalBatchPatchItemRequestOptions requestOptions = null)
{
this.AddOperation(new ItemBatchOperation(
this.operations.Add(new ItemBatchOperation(
operationType: OperationType.Patch,
operationIndex: this.operations.Count,
id: id,
@ -286,7 +291,7 @@ namespace Microsoft.Azure.Cosmos
PatchSpec patchSpec = new PatchSpec(patchOperations, requestOptions);
this.AddOperation(new ItemBatchOperation<PatchSpec>(
this.operations.Add(new ItemBatchOperation<PatchSpec>(
operationType: OperationType.Patch,
operationIndex: this.operations.Count,
id: id,

Просмотреть файл

@ -5,8 +5,6 @@
namespace Microsoft.Azure.Cosmos
{
using System.Collections.Generic;
using System.Linq;
using Microsoft.Azure.Documents;
/// <summary>
/// Represents an internal abstract class for handling transactional batches of operations.
@ -15,47 +13,5 @@ namespace Microsoft.Azure.Cosmos
/// </summary>
internal abstract class TransactionalBatchInternal : TransactionalBatch
{
/// <summary>
/// The list of operations in the batch.
/// </summary>
protected List<ItemBatchOperation> operations;
/// <summary>
/// Initializes a new instance of the <see cref="TransactionalBatchInternal"/> class.
/// </summary>
public TransactionalBatchInternal()
{
this.operations = new List<ItemBatchOperation>();
}
/// <summary>
/// Indicates whether all operations in the batch are of the same type.
/// </summary>
internal bool isHomogenousOperations = true;
/// <summary>
/// Stores the operation type if all operations in the batch are of the same type; otherwise, null.
/// </summary>
internal OperationType? homogenousOperation = null;
/// <summary>
/// Adds an operation to the batch.
/// </summary>
/// <param name="itemBatchOperation">The operation to add to the batch.</param>
/// <remarks>
/// This method performs the following actions:
/// 1. Checks if the batch is homogeneous (all operations of the same type) and if the new operation's type matches the type of the existing operations.
/// 2. Updates the <see cref="isHomogenousOperations"/> flag and the <see cref="homogenousOperation"/> property based on the check.
/// 3. Adds the operation to the list of operations.
/// </remarks>
protected void AddOperation(ItemBatchOperation itemBatchOperation)
{
if (this.isHomogenousOperations && this.operations.Count > 0)
{
this.isHomogenousOperations = this.operations.First().OperationType == itemBatchOperation.OperationType;
this.homogenousOperation = this.isHomogenousOperations ? itemBatchOperation.OperationType : null;
}
this.operations.Add(itemBatchOperation);
}
}
}

Просмотреть файл

@ -13,6 +13,7 @@ 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.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
@ -50,6 +51,8 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
this.changeFeedRequestOptions = changeFeedRequestOptions ?? new ChangeFeedRequestOptions();
this.changeFeedQuerySpec = changeFeedQuerySpec;
this.operationName = OpenTelemetryConstants.Operations.QueryChangeFeed;
this.lazyMonadicEnumerator = new AsyncLazy<TryCatch<CrossPartitionChangeFeedAsyncEnumerator>>(
valueFactory: async (trace, cancellationToken) =>
{
@ -226,7 +229,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
operationType: OperationType.ReadFeed,
requestOptions: this.changeFeedRequestOptions,
task: (trace) => this.ReadNextInternalAsync(trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response),
openTelemetry: new (OpenTelemetryConstants.Operations.QueryChangeFeed, (response) => new OpenTelemetryResponse(responseMessage: response)),
traceComponent: TraceComponent.ChangeFeed,
traceLevel: TraceLevel.Info);
}

Просмотреть файл

@ -9,7 +9,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.ChangeFeed.LeaseManagement;
using Microsoft.Azure.Cosmos.CosmosElements;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
@ -81,6 +81,8 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
this.changeFeedStartFrom = changeFeedStartFrom ?? throw new ArgumentNullException(nameof(changeFeedStartFrom));
this.clientContext = this.container.ClientContext;
this.changeFeedOptions = options;
this.operationName = OpenTelemetryConstants.Operations.QueryChangeFeed;
}
public override bool HasMoreResults => this.hasMoreResultsInternal;
@ -99,8 +101,6 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
operationType: Documents.OperationType.ReadFeed,
requestOptions: this.changeFeedOptions,
task: (trace) => this.ReadNextAsync(trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(
responseMessage: response),
traceComponent: TraceComponent.ChangeFeed,
traceLevel: TraceLevel.Info);
}

Просмотреть файл

@ -11,6 +11,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.CosmosElements;
using Microsoft.Azure.Cosmos.Routing;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
@ -45,6 +46,8 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
this.changeFeedOptions = options;
this.maxItemCount = maxItemCount;
this.continuationToken = continuationToken;
this.operationName = OpenTelemetryConstants.Operations.QueryChangeFeed;
}
/// <summary>

Просмотреть файл

@ -18,6 +18,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
using Microsoft.Azure.Cosmos.Diagnostics;
using Microsoft.Azure.Cosmos.Query.Core;
using Microsoft.Azure.Cosmos.Query.Core.Monads;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Newtonsoft.Json.Linq;
@ -106,6 +107,8 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
this.monitoredContainerFeedCreator = monitoredContainerFeedCreator;
this.documentServiceLeaseContainer = documentServiceLeaseContainer;
this.operationName = OpenTelemetryConstants.Operations.QueryChangeFeedEstimator;
}
public override bool HasMoreResults => this.hasMoreResults;
@ -119,7 +122,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed
operationType: Documents.OperationType.ReadFeed,
requestOptions: null,
task: (trace) => this.ReadNextAsync(trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ChangeFeedProcessorState>(responseMessage: response),
openTelemetry: new (OpenTelemetryConstants.Operations.QueryChangeFeedEstimator, (response) => new OpenTelemetryResponse<ChangeFeedProcessorState>(responseMessage: response)),
traceComponent: TraceComponent.ChangeFeed,
traceLevel: TraceLevel.Info);
}

Просмотреть файл

@ -18,6 +18,8 @@ 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.Telemetry;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Cosmos.Tracing.TraceData;
using Microsoft.Azure.Documents;
@ -756,7 +758,7 @@ namespace Microsoft.Azure.Cosmos
trace: trace,
cancellationToken: cancellationToken);
},
openTelemetry: (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateDatabase, (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response)));
}
/// <summary>
@ -804,7 +806,7 @@ namespace Microsoft.Azure.Cosmos
trace: trace,
cancellationToken: cancellationToken);
},
openTelemetry: (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateDatabase, (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response)));
}
/// <summary>
@ -900,8 +902,7 @@ namespace Microsoft.Azure.Cosmos
return this.ClientContext.ResponseFactory.CreateDatabaseResponse(this.GetDatabase(databaseProperties.Id), readResponseAfterConflict);
}
},
openTelemetry: (response) => new OpenTelemetryResponse<DatabaseProperties>(
responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateDatabaseIfNotExists, (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response)));
}
/// <summary>
@ -1205,7 +1206,7 @@ namespace Microsoft.Azure.Cosmos
trace,
cancellationToken);
},
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateDatabase, (response) => new OpenTelemetryResponse(response)));
}
/// <summary>
@ -1288,7 +1289,7 @@ namespace Microsoft.Azure.Cosmos
}
return this.ClientContext.OperationHelperAsync(
operationName: nameof(CreateDatabaseIfNotExistsAsync),
operationName: nameof(CreateDatabaseStreamAsync),
containerName: null,
databaseName: databaseProperties.Id,
operationType: OperationType.Create,
@ -1303,7 +1304,7 @@ namespace Microsoft.Azure.Cosmos
trace,
cancellationToken);
},
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateDatabase, (response) => new OpenTelemetryResponse(response)));
}
private async Task<DatabaseResponse> CreateDatabaseInternalAsync(

Просмотреть файл

@ -19,6 +19,7 @@ namespace Microsoft.Azure.Cosmos.Query
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.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
internal sealed class QueryIterator : FeedIteratorInternal
@ -53,6 +54,8 @@ namespace Microsoft.Azure.Cosmos.Query
this.correlatedActivityId = correlatedActivityId;
this.container = container;
this.operationName = OpenTelemetryConstants.Operations.QueryItems;
this.operationType = Documents.OperationType.Query;
}
public static QueryIterator Create(

Просмотреть файл

@ -17,6 +17,7 @@ namespace Microsoft.Azure.Cosmos.ReadFeed
using Microsoft.Azure.Cosmos.ReadFeed.Pagination;
using Microsoft.Azure.Cosmos.Resource.CosmosExceptions;
using Microsoft.Azure.Cosmos.Routing;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
@ -38,6 +39,7 @@ namespace Microsoft.Azure.Cosmos.ReadFeed
CancellationToken cancellationToken)
{
this.container = container;
this.operationName = OpenTelemetryConstants.Operations.ReadFeedRanges;
this.queryRequestOptions = queryRequestOptions;
readFeedPaginationOptions ??= ReadFeedExecutionOptions.Default;

Просмотреть файл

@ -17,6 +17,7 @@ namespace Microsoft.Azure.Cosmos
using Microsoft.Azure.Cosmos.Resource.CosmosExceptions;
using Microsoft.Azure.Cosmos.Routing;
using Microsoft.Azure.Cosmos.Telemetry;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
@ -210,7 +211,8 @@ namespace Microsoft.Azure.Cosmos
OperationType operationType,
RequestOptions requestOptions,
Func<ITrace, Task<TResult>> task,
Func<TResult, OpenTelemetryAttributes> openTelemetry,
Tuple<string, Func<TResult, OpenTelemetryAttributes>> openTelemetry,
ResourceType? resourceType = null,
TraceComponent traceComponent = TraceComponent.Transport,
Tracing.TraceLevel traceLevel = Tracing.TraceLevel.Info)
{
@ -223,7 +225,8 @@ namespace Microsoft.Azure.Cosmos
task,
openTelemetry,
traceComponent,
traceLevel) :
traceLevel,
resourceType) :
this.OperationHelperWithRootTraceWithSynchronizationContextAsync(
operationName,
containerName,
@ -233,7 +236,8 @@ namespace Microsoft.Azure.Cosmos
task,
openTelemetry,
traceComponent,
traceLevel);
traceLevel,
resourceType);
}
private async Task<TResult> OperationHelperWithRootTraceAsync<TResult>(
@ -243,9 +247,10 @@ namespace Microsoft.Azure.Cosmos
OperationType operationType,
RequestOptions requestOptions,
Func<ITrace, Task<TResult>> task,
Func<TResult, OpenTelemetryAttributes> openTelemetry,
Tuple<string, Func<TResult, OpenTelemetryAttributes>> openTelemetry,
TraceComponent traceComponent,
Tracing.TraceLevel traceLevel)
Tracing.TraceLevel traceLevel,
ResourceType? resourceType)
{
bool disableDiagnostics = requestOptions != null && requestOptions.DisablePointOperationDiagnostics;
@ -260,8 +265,8 @@ namespace Microsoft.Azure.Cosmos
trace,
task,
openTelemetry,
operationName,
requestOptions);
requestOptions,
resourceType);
}
}
@ -272,9 +277,10 @@ namespace Microsoft.Azure.Cosmos
OperationType operationType,
RequestOptions requestOptions,
Func<ITrace, Task<TResult>> task,
Func<TResult, OpenTelemetryAttributes> openTelemetry,
Tuple<string, Func<TResult, OpenTelemetryAttributes>> openTelemetry,
TraceComponent traceComponent,
Tracing.TraceLevel traceLevel)
Tracing.TraceLevel traceLevel,
ResourceType? resourceType)
{
Debug.Assert(SynchronizationContext.Current != null, "This should only be used when a SynchronizationContext is specified");
@ -297,8 +303,8 @@ namespace Microsoft.Azure.Cosmos
trace,
task,
openTelemetry,
operationName,
requestOptions);
requestOptions,
resourceType);
}
});
}
@ -488,13 +494,26 @@ namespace Microsoft.Azure.Cosmos
OperationType operationType,
ITrace trace,
Func<ITrace, Task<TResult>> task,
Func<TResult, OpenTelemetryAttributes> openTelemetry,
string operationName,
RequestOptions requestOptions)
Tuple<string, Func<TResult, OpenTelemetryAttributes>> openTelemetry,
RequestOptions requestOptions,
ResourceType? resourceType = null)
{
using (OpenTelemetryCoreRecorder recorder =
OpenTelemetryRecorderFactory.CreateRecorder(
operationName: operationName,
getOperationName: () =>
{
// If opentelemetry is not enabled then return null operation name, so that no activity is created.
if (openTelemetry == null)
{
return null;
}
if (resourceType is not null && this.IsBulkOperationSupported(resourceType.Value, operationType))
{
return OpenTelemetryConstants.Operations.ExecuteBulkPrefix + openTelemetry.Item1;
}
return openTelemetry.Item1;
},
containerName: containerName,
databaseName: databaseName,
operationType: operationType,
@ -509,7 +528,7 @@ namespace Microsoft.Azure.Cosmos
if (openTelemetry != null && recorder.IsEnabled)
{
// Record request response information
OpenTelemetryAttributes response = openTelemetry(result);
OpenTelemetryAttributes response = openTelemetry?.Item2(result);
recorder.Record(response);
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos
{
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
/// <summary>
/// This class acts as a wrapper over <see cref="ClientEncryptionKeyCore"/> for environments that use SynchronizationContext.
@ -35,7 +36,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadAsync(requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ClientEncryptionKeyProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadClientEncryptionKey, (response) => new OpenTelemetryResponse<ClientEncryptionKeyProperties>(response)));
}
public override Task<ClientEncryptionKeyResponse> ReplaceAsync(
@ -50,7 +51,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceAsync(clientEncryptionKeyProperties, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ClientEncryptionKeyProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceClientEncryptionKey, (response) => new OpenTelemetryResponse<ClientEncryptionKeyProperties>(response)));
}
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos
{
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
// This class acts as a wrapper for environments that use SynchronizationContext.
internal sealed class ConflictsInlineCore : ConflictsCore
@ -31,7 +32,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: null,
task: (trace) => base.DeleteAsync(conflict, partitionKey, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteConflict, (response) => new OpenTelemetryResponse(response)));
}
public override FeedIterator GetConflictQueryStreamIterator(
@ -94,7 +95,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: null,
task: (trace) => base.ReadCurrentAsync<T>(cosmosConflict, partitionKey, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadConflict, (response) => new OpenTelemetryResponse<T>(response)));
}
public override T ReadConflictContent<T>(ConflictProperties cosmosConflict)

Просмотреть файл

@ -14,6 +14,7 @@ namespace Microsoft.Azure.Cosmos
using Microsoft.Azure.Cosmos.Query.Core.Monads;
using Microsoft.Azure.Cosmos.Query.Core.QueryClient;
using Microsoft.Azure.Cosmos.ReadFeed;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
// This class acts as a wrapper for environments that use SynchronizationContext.
@ -42,7 +43,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadContainerAsync(trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadContainer, (response) => new OpenTelemetryResponse<ContainerProperties>(response)));
}
public override Task<ResponseMessage> ReadContainerStreamAsync(
@ -56,7 +57,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadContainerStreamAsync(trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadContainer, (response) => new OpenTelemetryResponse(response)));
}
public override Task<ContainerResponse> ReplaceContainerAsync(
@ -71,7 +72,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceContainerAsync(containerProperties, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceContainer, (response) => new OpenTelemetryResponse<ContainerProperties>(response)));
}
public override Task<ResponseMessage> ReplaceContainerStreamAsync(
@ -86,7 +87,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceContainerStreamAsync(containerProperties, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceContainer, (response) => new OpenTelemetryResponse(response)));
}
public override Task<ContainerResponse> DeleteContainerAsync(
@ -100,7 +101,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteContainerAsync(trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteContainer, (response) => new OpenTelemetryResponse<ContainerProperties>(response)));
}
public override Task<ResponseMessage> DeleteContainerStreamAsync(
@ -114,7 +115,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteContainerStreamAsync(trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteContainer, (response) => new OpenTelemetryResponse(response)));
}
public override Task<int?> ReadThroughputAsync(CancellationToken cancellationToken = default)
@ -139,7 +140,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadThroughputAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadThroughput, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ThroughputResponse> ReplaceThroughputAsync(
@ -154,7 +155,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceThroughputAsync(throughput, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceThroughput, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ThroughputResponse> ReplaceThroughputAsync(
@ -169,7 +170,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceThroughputAsync(throughputProperties, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceThroughput, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ThroughputResponse> ReadThroughputIfExistsAsync(RequestOptions requestOptions, CancellationToken cancellationToken)
@ -181,7 +182,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadThroughputIfExistsAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadThroughputIfExists, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ThroughputResponse> ReplaceThroughputIfExistsAsync(ThroughputProperties throughput, RequestOptions requestOptions, CancellationToken cancellationToken)
@ -193,7 +194,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceThroughputIfExistsAsync(throughput, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceThroughputIfExists, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ResponseMessage> CreateItemStreamAsync(
@ -219,7 +220,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: func,
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ItemResponse<T>> CreateItemAsync<T>(T item,
@ -234,7 +236,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateItemAsync<T>(item, trace, partitionKey, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateItem, (response) => new OpenTelemetryResponse<T>(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> ReadItemStreamAsync(
@ -250,7 +253,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadItemStreamAsync(id, partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ItemResponse<T>> ReadItemAsync<T>(
@ -260,13 +264,14 @@ namespace Microsoft.Azure.Cosmos
CancellationToken cancellationToken = default)
{
return this.ClientContext.OperationHelperAsync(
nameof(ReadItemAsync),
operationName: nameof(ReadItemAsync),
containerName: this.Id,
databaseName: this.Database.Id,
operationType: Documents.OperationType.Read,
requestOptions,
(trace) => base.ReadItemAsync<T>(id, partitionKey, trace, requestOptions, cancellationToken),
(response) => new OpenTelemetryResponse<T>(response));
requestOptions: requestOptions,
task: (trace) => base.ReadItemAsync<T>(id, partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: new (OpenTelemetryConstants.Operations.ReadItem, (response) => new OpenTelemetryResponse<T>(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> UpsertItemStreamAsync(
@ -282,7 +287,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Upsert,
requestOptions: requestOptions,
task: (trace) => base.UpsertItemStreamAsync(streamPayload, partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.UpsertItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ItemResponse<T>> UpsertItemAsync<T>(
@ -298,7 +304,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Upsert,
requestOptions: requestOptions,
task: (trace) => base.UpsertItemAsync<T>(item, trace, partitionKey, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.UpsertItem, (response) => new OpenTelemetryResponse<T>(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> ReplaceItemStreamAsync(
@ -315,7 +322,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceItemStreamAsync(streamPayload, id, partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ItemResponse<T>> ReplaceItemAsync<T>(
@ -332,7 +340,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceItemAsync<T>(item, id, trace, partitionKey, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceItem, (response) => new OpenTelemetryResponse<T>(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> DeleteItemStreamAsync(
@ -348,7 +357,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteItemStreamAsync(id, partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ItemResponse<T>> DeleteItemAsync<T>(
@ -364,7 +374,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteItemAsync<T>(id, partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteItem, (response) => new OpenTelemetryResponse<T>(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> PatchItemStreamAsync(
@ -381,7 +392,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Patch,
requestOptions: requestOptions,
task: (trace) => base.PatchItemStreamAsync(id, partitionKey, patchOperations, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.PatchItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> PatchItemStreamAsync(
@ -398,7 +410,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Patch,
requestOptions: requestOptions,
task: (trace) => base.PatchItemStreamAsync(id, partitionKey, streamPayload, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.PatchItem, (response) => new OpenTelemetryResponse(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ItemResponse<T>> PatchItemAsync<T>(
@ -415,7 +428,8 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Patch,
requestOptions: requestOptions,
task: (trace) => base.PatchItemAsync<T>(id, partitionKey, patchOperations, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.PatchItem, (response) => new OpenTelemetryResponse<T>(response)),
resourceType: Documents.ResourceType.Document);
}
public override Task<ResponseMessage> ReadManyItemsStreamAsync(
@ -430,7 +444,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: null,
task: (trace) => base.ReadManyItemsStreamAsync(items, trace, readManyRequestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadManyItems, (response) => new OpenTelemetryResponse(responseMessage: response)));
}
public override Task<FeedResponse<T>> ReadManyItemsAsync<T>(
@ -439,13 +453,13 @@ namespace Microsoft.Azure.Cosmos
CancellationToken cancellationToken = default)
{
return this.ClientContext.OperationHelperAsync(
nameof(ReadManyItemsAsync),
operationName: nameof(ReadManyItemsAsync),
containerName: this.Id,
databaseName: this.Database.Id,
operationType: Documents.OperationType.Read,
requestOptions: null,
task: (trace) => base.ReadManyItemsAsync<T>(items, trace, readManyRequestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadManyItems, (response) => new OpenTelemetryResponse<T>(responseMessage: response)));
}
public override FeedIterator GetItemQueryStreamIterator(
@ -658,7 +672,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteAllItemsByPartitionKeyStreamAsync(partitionKey, trace, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteAllItemsByPartitionKey, (response) => new OpenTelemetryResponse(response)));
}
}
}

Просмотреть файл

@ -65,7 +65,8 @@ namespace Microsoft.Azure.Cosmos
OperationType operationType,
RequestOptions requestOptions,
Func<ITrace, Task<TResult>> task,
Func<TResult, OpenTelemetryAttributes> openTelemetry = null,
Tuple<string, Func<TResult, OpenTelemetryAttributes>> openTelemetry = null,
ResourceType? resourceType = null,
TraceComponent traceComponent = TraceComponent.Transport,
TraceLevel traceLevel = TraceLevel.Info);

Просмотреть файл

@ -6,7 +6,9 @@ namespace Microsoft.Azure.Cosmos
{
using System.Threading;
using System.Threading.Tasks;
using global::Azure;
using Microsoft.Azure.Cosmos.Fluent;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
// This class acts as a wrapper for environments that use SynchronizationContext.
internal sealed class DatabaseInlineCore : DatabaseCore
@ -33,7 +35,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerAsync(containerProperties, throughput, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainer, (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response)));
}
public override Task<ContainerResponse> CreateContainerAsync(string id,
@ -49,7 +51,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerAsync(id, partitionKeyPath, throughput, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainer, (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response)));
}
public override Task<ContainerResponse> CreateContainerIfNotExistsAsync(
@ -65,7 +67,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerIfNotExistsAsync(containerProperties, throughput, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainerIfNotExists, (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response)));
}
public override Task<ContainerResponse> CreateContainerIfNotExistsAsync(
@ -82,7 +84,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerIfNotExistsAsync(id, partitionKeyPath, throughput, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainerIfNotExists, (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response)));
}
public override Task<ResponseMessage> CreateContainerStreamAsync(
@ -98,7 +100,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerStreamAsync(containerProperties, throughput, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainer, (response) => new OpenTelemetryResponse(response)));
}
public override Task<UserResponse> CreateUserAsync(string id,
@ -112,7 +114,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateUserAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateUser, (response) => new OpenTelemetryResponse<UserProperties>(response)));
}
public override ContainerBuilder DefineContainer(
@ -133,7 +135,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteDatabase, (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response)));
}
public override Task<ResponseMessage> DeleteStreamAsync(
@ -147,7 +149,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteStreamAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteDatabase, (response) => new OpenTelemetryResponse(response)));
}
public override Container GetContainer(string id)
@ -241,7 +243,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadDatabase, (response) => new OpenTelemetryResponse<DatabaseProperties>(responseMessage: response)));
}
public override Task<ResponseMessage> ReadStreamAsync(
@ -255,7 +257,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadStreamAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadDatabase, (response) => new OpenTelemetryResponse(response)));
}
public override Task<int?> ReadThroughputAsync(CancellationToken cancellationToken = default)
@ -280,7 +282,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadThroughputAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadThroughput, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ThroughputResponse> ReplaceThroughputAsync(
@ -295,7 +297,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceThroughputAsync(throughput, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceThroughput, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ThroughputResponse> ReplaceThroughputAsync(
@ -310,7 +312,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceThroughputAsync(throughputProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ThroughputProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceThroughput, (response) => new OpenTelemetryResponse<ThroughputProperties>(response)));
}
public override Task<ContainerResponse> CreateContainerAsync(
@ -326,7 +328,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainer, (response) => new OpenTelemetryResponse<ContainerProperties>(responseMessage: response)));
}
public override Task<ContainerResponse> CreateContainerIfNotExistsAsync(
@ -342,7 +344,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerIfNotExistsAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ContainerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainerIfNotExists, (response) => new OpenTelemetryResponse<ContainerProperties>(response)));
}
public override Task<ResponseMessage> CreateContainerStreamAsync(
@ -358,7 +360,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateContainerStreamAsync(containerProperties, throughputProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateContainer, (response) => new OpenTelemetryResponse(response)));
}
public override Task<UserResponse> UpsertUserAsync(
@ -373,7 +375,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Upsert,
requestOptions: requestOptions,
task: (trace) => base.UpsertUserAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.UpsertUser, (response) => new OpenTelemetryResponse<UserProperties>(response)));
}
public override ClientEncryptionKey GetClientEncryptionKey(string id)
@ -401,7 +403,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateClientEncryptionKeyAsync(trace, clientEncryptionKeyProperties, requestOptions, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<ClientEncryptionKeyProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateClientEncryptionKey, (response) => new OpenTelemetryResponse<ClientEncryptionKeyProperties>(response)));
}
}
}

Просмотреть файл

@ -135,5 +135,15 @@ namespace Microsoft.Azure.Cosmos
/// Collect database name if container information not available in open telemetry attributes
/// </summary>
internal string databaseName;
/// <summary>
/// Operation Name used for open telemetry traces
/// </summary>
internal string operationName;
/// <summary>
/// Operation Type used for open telemetry traces, it will set optionally, otherwise default operation type will be used in traces
/// </summary>
internal Documents.OperationType? operationType;
}
}

Просмотреть файл

@ -14,6 +14,7 @@ namespace Microsoft.Azure.Cosmos
using Microsoft.Azure.Cosmos.Json;
using Microsoft.Azure.Cosmos.Query.Core;
using Microsoft.Azure.Cosmos.Serializer;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
using static Microsoft.Azure.Documents.RuntimeConstants;
@ -49,6 +50,9 @@ namespace Microsoft.Azure.Cosmos
this.databaseName = databaseId;
this.container = container;
this.operationName = OpenTelemetryConstants.Operations.QueryItems;
this.operationType = OperationType.Query;
}
public override bool HasMoreResults => this.hasMoreResultsInternal;
@ -212,6 +216,9 @@ namespace Microsoft.Azure.Cosmos
this.databaseName = feedIterator.databaseName;
this.container = feedIterator.container;
this.operationName = feedIterator.operationName;
this.operationType = feedIterator.operationType;
}
public override bool HasMoreResults => this.feedIterator.HasMoreResults;

Просмотреть файл

@ -8,6 +8,7 @@ namespace Microsoft.Azure.Cosmos
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.CosmosElements;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
internal sealed class FeedIteratorInlineCore : FeedIteratorInternal
@ -29,6 +30,9 @@ namespace Microsoft.Azure.Cosmos
this.container = feedIteratorInternal.container;
this.databaseName = feedIteratorInternal.databaseName;
this.operationName = feedIteratorInternal.operationName;
this.operationType = feedIteratorInternal.operationType;
}
internal FeedIteratorInlineCore(
@ -40,6 +44,9 @@ namespace Microsoft.Azure.Cosmos
this.container = feedIteratorInternal.container;
this.databaseName = feedIteratorInternal.databaseName;
this.operationName = feedIteratorInternal.operationName;
this.operationType = feedIteratorInternal.operationType;
}
public override bool HasMoreResults => this.feedIteratorInternal.HasMoreResults;
@ -53,7 +60,16 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.ReadFeed,
requestOptions: null,
task: (trace) => this.feedIteratorInternal.ReadNextAsync(trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(responseMessage: response));
openTelemetry: new (this.operationName, (response) =>
{
OpenTelemetryResponse openTelemetryResponse = new OpenTelemetryResponse(responseMessage: response);
if (this.operationType.HasValue)
{
openTelemetryResponse.OperationType = this.operationType.Value;
}
return openTelemetryResponse;
}));
}
public override Task<ResponseMessage> ReadNextAsync(ITrace trace, CancellationToken cancellationToken = default)

Просмотреть файл

@ -8,6 +8,7 @@ namespace Microsoft.Azure.Cosmos
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.CosmosElements;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
internal sealed class FeedIteratorInlineCore<T> : FeedIteratorInternal<T>
@ -29,6 +30,9 @@ namespace Microsoft.Azure.Cosmos
this.container = feedIteratorInternal.container;
this.databaseName = feedIteratorInternal.databaseName;
this.operationName = feedIteratorInternal.operationName;
this.operationType = feedIteratorInternal.operationType;
}
internal FeedIteratorInlineCore(
@ -40,6 +44,9 @@ namespace Microsoft.Azure.Cosmos
this.container = feedIteratorInternal.container;
this.databaseName = feedIteratorInternal.databaseName;
this.operationName = feedIteratorInternal.operationName;
this.operationType = feedIteratorInternal.operationType;
}
public override bool HasMoreResults => this.feedIteratorInternal.HasMoreResults;
@ -53,7 +60,16 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.ReadFeed,
requestOptions: null,
task: trace => this.feedIteratorInternal.ReadNextAsync(trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<T>(responseMessage: response));
openTelemetry: new (this.feedIteratorInternal.operationName, (response) =>
{
OpenTelemetryResponse<T> openTelemetryResponse = new OpenTelemetryResponse<T>(responseMessage: response);
if (this.operationType.HasValue)
{
openTelemetryResponse.OperationType = this.operationType.Value;
}
return openTelemetryResponse;
}));
}
public override Task<FeedResponse<T>> ReadNextAsync(ITrace trace, CancellationToken cancellationToken)

Просмотреть файл

@ -123,5 +123,15 @@ namespace Microsoft.Azure.Cosmos
/// Collect database name if container information not available in open telemetry attributes
/// </summary>
internal string databaseName;
/// <summary>
/// Operation Name used for open telemetry traces
/// </summary>
internal string operationName;
/// <summary>
/// Operation Type used for open telemetry traces
/// </summary>
internal Documents.OperationType? operationType;
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos
{
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
// This class acts as a wrapper for environments that use SynchronizationContext.
internal sealed class PermissionInlineCore : PermissionCore
@ -33,7 +34,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadAsync(tokenExpiryInSeconds, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<PermissionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadPermission, (response) => new OpenTelemetryResponse<PermissionProperties>(response)));
}
public override Task<PermissionResponse> ReplaceAsync(
@ -49,7 +50,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<PermissionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplacePermission, (response) => new OpenTelemetryResponse<PermissionProperties>(response)));
}
public override Task<PermissionResponse> DeleteAsync(
@ -63,7 +64,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions,
task: (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<PermissionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeletePermission, (response) => new OpenTelemetryResponse<PermissionProperties>(response)));
}
}
}

Просмотреть файл

@ -7,6 +7,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tracing;
// This class acts as a wrapper for environments that use SynchronizationContext.
@ -33,7 +34,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateStoredProcedureAsync(storedProcedureProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateStoredProcedure, (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response)));
}
public override FeedIterator<T> GetStoredProcedureQueryIterator<T>(
@ -96,7 +97,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadStoredProcedureAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadStoredProcedure, (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response)));
}
public override Task<StoredProcedureResponse> ReplaceStoredProcedureAsync(
@ -111,7 +112,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Replace,
requestOptions,
task: (trace) => base.ReplaceStoredProcedureAsync(storedProcedureProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceStoredProcedure, (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response)));
}
public override Task<StoredProcedureResponse> DeleteStoredProcedureAsync(
@ -126,7 +127,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteStoredProcedureAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteStoreProcedure, (response) => new OpenTelemetryResponse<StoredProcedureProperties>(response)));
}
public override Task<StoredProcedureExecuteResponse<TOutput>> ExecuteStoredProcedureAsync<TOutput>(
@ -143,7 +144,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Execute,
requestOptions: requestOptions,
task: (trace) => base.ExecuteStoredProcedureAsync<TOutput>(storedProcedureId, partitionKey, parameters, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<TOutput>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ExecuteStoredProcedure, (response) => new OpenTelemetryResponse<TOutput>(response)));
}
public override Task<ResponseMessage> ExecuteStoredProcedureStreamAsync(
@ -160,7 +161,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Execute,
requestOptions: requestOptions,
task: (trace) => base.ExecuteStoredProcedureStreamAsync(storedProcedureId, partitionKey, parameters, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ExecuteStoredProcedure, (response) => new OpenTelemetryResponse(response)));
}
public override Task<ResponseMessage> ExecuteStoredProcedureStreamAsync(
@ -177,7 +178,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Execute,
requestOptions: requestOptions,
task: (trace) => base.ExecuteStoredProcedureStreamAsync(storedProcedureId, streamPayload, partitionKey, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ExecuteStoredProcedure, (response) => new OpenTelemetryResponse(response)));
}
public override Task<TriggerResponse> CreateTriggerAsync(
@ -192,7 +193,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateTriggerAsync(triggerProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<TriggerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateTrigger, (response) => new OpenTelemetryResponse<TriggerProperties>(response)));
}
public override FeedIterator<T> GetTriggerQueryIterator<T>(
@ -255,7 +256,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadTriggerAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<TriggerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadTrigger, (response) => new OpenTelemetryResponse<TriggerProperties>(response)));
}
public override Task<TriggerResponse> ReplaceTriggerAsync(
@ -270,7 +271,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceTriggerAsync(triggerProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<TriggerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceTrigger, (response) => new OpenTelemetryResponse<TriggerProperties>(response)));
}
public override Task<TriggerResponse> DeleteTriggerAsync(
@ -285,7 +286,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteTriggerAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<TriggerProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteTrigger, (response) => new OpenTelemetryResponse<TriggerProperties>(response)));
}
public override Task<UserDefinedFunctionResponse> CreateUserDefinedFunctionAsync(
@ -300,7 +301,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreateUserDefinedFunctionAsync(userDefinedFunctionProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreateUserDefinedFunction, (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response)));
}
public override FeedIterator<T> GetUserDefinedFunctionQueryIterator<T>(
@ -363,7 +364,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadUserDefinedFunctionAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadUserDefinedFunction, (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response)));
}
public override Task<UserDefinedFunctionResponse> ReplaceUserDefinedFunctionAsync(
@ -378,7 +379,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceUserDefinedFunctionAsync(userDefinedFunctionProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceUserDefinedFunctions, (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response)));
}
public override Task<UserDefinedFunctionResponse> DeleteUserDefinedFunctionAsync(
@ -393,7 +394,7 @@ namespace Microsoft.Azure.Cosmos.Scripts
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteUserDefinedFunctionAsync(id, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteUserDefinedFunctions, (response) => new OpenTelemetryResponse<UserDefinedFunctionProperties>(response)));
}
}
}

Просмотреть файл

@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos
{
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
// This class acts as a wrapper for environments that use SynchronizationContext.
internal sealed class UserInlineCore : UserCore
@ -32,7 +33,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Read,
requestOptions: requestOptions,
task: (trace) => base.ReadAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReadUser, (response) => new OpenTelemetryResponse<UserProperties>(response)));
}
public override Task<UserResponse> ReplaceAsync(
@ -47,7 +48,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Replace,
requestOptions: requestOptions,
task: (trace) => base.ReplaceAsync(userProperties, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.ReplaceUser, (response) => new OpenTelemetryResponse<UserProperties>(response)));
}
public override Task<UserResponse> DeleteAsync(
@ -61,7 +62,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Delete,
requestOptions: requestOptions,
task: (trace) => base.DeleteAsync(requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<UserProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.DeleteUser, (response) => new OpenTelemetryResponse<UserProperties>(response)));
}
public override Permission GetPermission(string id)
@ -82,7 +83,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Create,
requestOptions: requestOptions,
task: (trace) => base.CreatePermissionAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<PermissionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.CreatePermission, (response) => new OpenTelemetryResponse<PermissionProperties>(response)));
}
public override Task<PermissionResponse> UpsertPermissionAsync(
@ -98,7 +99,7 @@ namespace Microsoft.Azure.Cosmos
operationType: Documents.OperationType.Upsert,
requestOptions: requestOptions,
task: (trace) => base.UpsertPermissionAsync(permissionProperties, tokenExpiryInSeconds, requestOptions, trace, cancellationToken),
openTelemetry: (response) => new OpenTelemetryResponse<PermissionProperties>(response));
openTelemetry: new (OpenTelemetryConstants.Operations.UpsertPermission, (response) => new OpenTelemetryResponse<PermissionProperties>(response)));
}
public override FeedIterator<T> GetPermissionQueryIterator<T>(

Просмотреть файл

@ -140,7 +140,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry
/// <summary>
/// Represents the size of the batch operation.
/// </summary>
public const string BatchSize = "db.operation.batch.size";
public const string BatchSize = "db.operation.batch_size";
// Exceptions

Просмотреть файл

@ -4,7 +4,9 @@
namespace Microsoft.Azure.Cosmos.Telemetry
{
using System;
using System.Net;
using System.Security.AccessControl;
internal class OpenTelemetryAttributes
{
@ -18,6 +20,15 @@ namespace Microsoft.Azure.Cosmos.Telemetry
internal OpenTelemetryAttributes(RequestMessage requestMessage)
{
this.RequestContentLength = requestMessage?.Headers?.ContentLength;
if (requestMessage != null)
{
this.OperationType = requestMessage.OperationType;
this.ResourceType = requestMessage.ResourceType;
}
else
{
this.OperationType = Documents.OperationType.Invalid;
}
}
/// <summary>
@ -70,32 +81,14 @@ namespace Microsoft.Azure.Cosmos.Telemetry
/// </summary>
internal Documents.OperationType OperationType { get; set; }
/// <summary>
/// ResourceType
/// </summary>
internal Documents.ResourceType? ResourceType { get; set; }
/// <summary>
/// Batch Size
/// </summary>
internal int? BatchSize { get; set; }
/// <summary>
/// Gets or sets the operation type for batch operations.
/// Will have a value for homogeneous batch operations and will be null for heterogeneous batch operations.
///
/// Operation name should be prepended with BATCH for homogeneous operations, or be just BATCH for heterogeneous operations.
/// </summary>
/// <example>
/// For example, if you have a batch of homogeneous operations like Read:
/// <code>
/// var recorder = new OpenTelemetryCoreRecorder();
/// recorder.BatchOperationName = Documents.OperationType.Read; // Homogeneous batch
/// string operationName = "BATCH." + recorder.BatchOperationName; // Results in "BATCH.Read"
/// </code>
///
/// For a batch of heterogeneous operations:
/// <code>
/// var recorder = new OpenTelemetryCoreRecorder();
/// recorder.BatchOperationName = null; // Heterogeneous batch
/// string operationName = "BATCH"; // No specific operation type
/// </code>
/// </example>
internal Documents.OperationType? BatchOperationName { get; set; }
}
}

Просмотреть файл

@ -0,0 +1,99 @@
// ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ------------------------------------------------------------
namespace Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry
{
internal class OpenTelemetryConstants
{
public static class Operations
{
// Batch/Bulk Operations
public const string ExecuteBatch = "execute_batch";
public const string ExecuteBulkPrefix = "bulk_";
// Change feed operations
public const string QueryChangeFeed = "query_change_feed";
public const string QueryChangeFeedEstimator = "get_change_feed_processor_estimate";
// Account Operations
public const string ReadAccount = "read_account";
// Conflict Operations
public const string DeleteConflict = "delete_conflict";
public const string QueryConflicts = "query_conflicts";
public const string ReadConflict = "read_conflict";
//Container Operations
public const string CreateContainer = "create_container";
public const string CreateContainerIfNotExists = "create_container_if_not_exists";
public const string DeleteContainer = "delete_container";
public const string ReadContainer = "read_container";
public const string ReplaceContainer = "replace_container";
public const string ReadFeedRanges = "read_feed_ranges";
public const string ReadPartitionKeyRanges = "read_partition_key_ranges";
// Database Operations
public const string CreateDatabase = "create_database";
public const string CreateDatabaseIfNotExists = "create_database_if_not_exists";
public const string DeleteDatabase = "delete_database";
public const string ReadDatabase = "read_database";
// Item Operations
public const string CreateItem = "create_item";
public const string DeleteAllItemsByPartitionKey = "delete_all_items_by_partition_key";
public const string DeleteItem = "delete_item";
public const string PatchItem = "patch_item";
public const string QueryItems = "query_items";
public const string ReadManyItems = "read_many_items";
public const string ReadItem = "read_item";
public const string ReplaceItem = "replace_item";
public const string UpsertItem = "upsert_item";
// Permission operations
public const string CreatePermission = "create_permission";
public const string DeletePermission = "delete_permission";
public const string ReadPermission = "read_permission";
public const string ReplacePermission = "replace_permission";
public const string UpsertPermission = "upsert_permission";
// Stored procedure operations
public const string CreateStoredProcedure = "create_stored_procedure";
public const string DeleteStoreProcedure = "delete_stored_procedure";
public const string ExecuteStoredProcedure = "execute_stored_procedure";
public const string ReadStoredProcedure = "read_stored_procedure";
public const string ReplaceStoredProcedure = "replace_stored_procedure";
// Throughput operations
public const string ReadThroughput = "read_throughput";
public const string ReadThroughputIfExists = "read_throughput_if_exists";
public const string ReplaceThroughput = "replace_throughput";
public const string ReplaceThroughputIfExists = "replace_throughput_if_exists";
// Trigger operations
public const string CreateTrigger = "create_trigger";
public const string DeleteTrigger = "delete_trigger";
public const string ReadTrigger = "read_trigger";
public const string ReplaceTrigger = "replace_trigger";
// User operations
public const string CreateUser = "create_user";
public const string DeleteUser = "delete_user";
public const string ReadUser = "read_user";
public const string ReplaceUser = "replace_user";
public const string UpsertUser = "upsert_user";
// User-defined function operations
public const string CreateUserDefinedFunction = "create_user_defined_function";
public const string DeleteUserDefinedFunctions = "delete_user_defined_function";
public const string ReplaceUserDefinedFunctions = "replace_user_defined_function";
public const string ReadAllUserDefinedFunctions = "read_all_user_defined_functions";
public const string ReadUserDefinedFunction = "read_user_defined_function";
// Encryption Key operations
public const string CreateClientEncryptionKey = "create_client_encryption_key";
public const string ReadClientEncryptionKey = "read_client_encryption_key";
public const string ReplaceClientEncryptionKey = "replace_client_encryption_key";
}
}
}

Просмотреть файл

@ -232,13 +232,6 @@ namespace Microsoft.Azure.Cosmos.Telemetry
if (this.response != null)
{
if (this.response.BatchOperationName != null)
{
string batchOpsName = Enum.GetName(typeof(OperationType), this.response.BatchOperationName);
operationName = $"{operationName}.{batchOpsName}";
}
this.scope.AddAttribute(OpenTelemetryAttributeKeys.OperationType, operationName);
if (this.response.BatchSize is not null)
{
this.scope.AddIntegerAttribute(OpenTelemetryAttributeKeys.BatchSize, (int)this.response.BatchSize);

Просмотреть файл

@ -26,7 +26,7 @@ namespace Microsoft.Azure.Cosmos.Telemetry
isStable: false),
isThreadSafe: true);
public static OpenTelemetryCoreRecorder CreateRecorder(string operationName,
public static OpenTelemetryCoreRecorder CreateRecorder(Func<string> getOperationName,
string containerName,
string databaseName,
Documents.OperationType operationType,
@ -37,6 +37,14 @@ namespace Microsoft.Azure.Cosmos.Telemetry
OpenTelemetryCoreRecorder openTelemetryRecorder = default;
if (clientContext is { ClientOptions.CosmosClientTelemetryOptions.DisableDistributedTracing: false })
{
string operationName = getOperationName();
// Trace without operation name is not valid trace to create
if (string.IsNullOrEmpty(operationName))
{
return openTelemetryRecorder;
}
// If there is no source then it will return default otherwise a valid diagnostic scope
DiagnosticScope scope = LazyScopeFactory.Value.CreateScope(name: $"{OpenTelemetryAttributeKeys.OperationPrefix}.{operationName}",
kind: clientContext.ClientOptions.ConnectionMode == ConnectionMode.Gateway ? ActivityKind.Internal : ActivityKind.Client);

Просмотреть файл

@ -8,12 +8,11 @@ namespace Microsoft.Azure.Cosmos
using System.IO;
using System.Net;
using Microsoft.Azure.Cosmos.Core.Trace;
using Microsoft.Azure.Documents;
using Telemetry;
internal sealed class OpenTelemetryResponse : OpenTelemetryAttributes
{
internal OpenTelemetryResponse(TransactionalBatchResponse responseMessage, bool isHomogenousOperations, OperationType? batchOperation)
internal OpenTelemetryResponse(TransactionalBatchResponse responseMessage)
: this(
statusCode: responseMessage.StatusCode,
requestCharge: OpenTelemetryResponse.GetHeader(responseMessage)?.RequestCharge,
@ -24,8 +23,7 @@ namespace Microsoft.Azure.Cosmos
subStatusCode: OpenTelemetryResponse.GetHeader(responseMessage)?.SubStatusCode,
activityId: OpenTelemetryResponse.GetHeader(responseMessage)?.ActivityId,
correlationId: OpenTelemetryResponse.GetHeader(responseMessage)?.CorrelatedActivityId,
batchSize: responseMessage.GetBatchSize(),
batchOperationName: isHomogenousOperations ? batchOperation : null )
batchSize: responseMessage.GetBatchSize())
{
}
@ -39,9 +37,7 @@ namespace Microsoft.Azure.Cosmos
requestMessage: responseMessage.RequestMessage,
subStatusCode: OpenTelemetryResponse.GetHeader(responseMessage)?.SubStatusCode,
activityId: OpenTelemetryResponse.GetHeader(responseMessage)?.ActivityId,
correlationId: OpenTelemetryResponse.GetHeader(responseMessage)?.CorrelatedActivityId,
operationType: responseMessage is QueryResponse ? Documents.OperationType.Query : Documents.OperationType.Invalid
)
correlationId: OpenTelemetryResponse.GetHeader(responseMessage)?.CorrelatedActivityId)
{
}
@ -55,9 +51,7 @@ namespace Microsoft.Azure.Cosmos
Documents.SubStatusCodes? subStatusCode,
string activityId,
string correlationId,
Documents.OperationType operationType = Documents.OperationType.Invalid,
int? batchSize = null,
Documents.OperationType? batchOperationName = null)
int? batchSize = null)
: base(requestMessage)
{
this.StatusCode = statusCode;
@ -68,9 +62,7 @@ namespace Microsoft.Azure.Cosmos
this.SubStatusCode = (int)(subStatusCode ?? Documents.SubStatusCodes.Unknown);
this.ActivityId = activityId;
this.CorrelatedActivityId = correlationId;
this.OperationType = operationType;
this.BatchSize = batchSize;
this.BatchOperationName = batchOperationName;
}
private static string GetPayloadSize(ResponseMessage response)

Просмотреть файл

@ -7,6 +7,7 @@ namespace Microsoft.Azure.Cosmos
using System;
using System.Net;
using Microsoft.Azure.Cosmos.Core.Trace;
using Microsoft.Azure.Documents;
using Telemetry;
internal sealed class OpenTelemetryResponse<T> : OpenTelemetryAttributes
@ -21,8 +22,7 @@ namespace Microsoft.Azure.Cosmos
requestMessage: responseMessage.RequestMessage,
subStatusCode: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.SubStatusCode,
activityId: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.ActivityId,
correlatedActivityId: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.CorrelatedActivityId,
operationType: responseMessage is QueryResponse<T> ? Documents.OperationType.Query : Documents.OperationType.Invalid)
correlatedActivityId: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.CorrelatedActivityId)
{
}
@ -36,8 +36,7 @@ namespace Microsoft.Azure.Cosmos
requestMessage: responseMessage.RequestMessage,
subStatusCode: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.SubStatusCode,
activityId: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.ActivityId,
correlatedActivityId: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.CorrelatedActivityId,
operationType: responseMessage is QueryResponse ? Documents.OperationType.Query : Documents.OperationType.Invalid)
correlatedActivityId: OpenTelemetryResponse<T>.GetHeader(responseMessage)?.CorrelatedActivityId)
{
}
@ -50,8 +49,7 @@ namespace Microsoft.Azure.Cosmos
RequestMessage requestMessage,
Documents.SubStatusCodes? subStatusCode,
string activityId,
string correlatedActivityId,
Documents.OperationType operationType)
string correlatedActivityId)
: base(requestMessage)
{
this.StatusCode = statusCode;
@ -62,7 +60,6 @@ namespace Microsoft.Azure.Cosmos
this.SubStatusCode = (int)(subStatusCode ?? Documents.SubStatusCodes.Unknown);
this.ActivityId = activityId;
this.CorrelatedActivityId = correlatedActivityId;
this.OperationType = operationType;
}
private static Headers GetHeader(FeedResponse<T> responseMessage)

Просмотреть файл

@ -139,10 +139,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ExecuteAsync" displayName="ExecuteAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.execute_batch" displayName="execute_batch containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ExecuteAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">execute_batch</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -152,7 +152,7 @@
<ATTRIBUTE key="user_agent.original">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.connection_mode">Direct</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.operation_type">Batch</ATTRIBUTE>
<ATTRIBUTE key="db.operation.batch.size">90</ATTRIBUTE>
<ATTRIBUTE key="db.operation.batch_size">90</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.status_code">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.sub_status_code">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.request_charge">Some Value</ATTRIBUTE>
@ -292,10 +292,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ExecuteAsync" displayName="ExecuteAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.execute_batch" displayName="execute_batch containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ExecuteAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">execute_batch</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -304,8 +304,8 @@
<ATTRIBUTE key="db.cosmosdb.client_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="user_agent.original">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.connection_mode">Direct</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.operation_type">Batch.Create</ATTRIBUTE>
<ATTRIBUTE key="db.operation.batch.size">50</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.operation_type">Batch</ATTRIBUTE>
<ATTRIBUTE key="db.operation.batch_size">50</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.status_code">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.sub_status_code">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.request_charge">Some Value</ATTRIBUTE>

Просмотреть файл

@ -1023,10 +1023,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1042,10 +1042,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1061,10 +1061,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1080,10 +1080,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1099,10 +1099,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1769,10 +1769,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1788,10 +1788,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1807,10 +1807,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1826,10 +1826,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1845,10 +1845,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2496,10 +2496,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2515,10 +2515,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2534,10 +2534,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2553,10 +2553,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2572,10 +2572,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Iterator Read Next Async" displayName="Change Feed Iterator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Iterator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3243,10 +3243,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3262,10 +3262,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3281,10 +3281,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3300,10 +3300,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3319,10 +3319,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_change_feed" displayName="query_change_feed containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_change_feed</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3644,10 +3644,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Change Feed Estimator Read Next Async" displayName="Change Feed Estimator Read Next Async containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.get_change_feed_processor_estimate" displayName="get_change_feed_processor_estimate containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Change Feed Estimator Read Next Async</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">get_change_feed_processor_estimate</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -117,10 +117,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.DeleteAsync" displayName="DeleteAsync ">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.delete_database" displayName="delete_database ">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">DeleteAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">delete_database</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">miscdbcustonhandler</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.machine_id">Some Value</ATTRIBUTE>
@ -134,10 +134,10 @@
<ATTRIBUTE key="db.cosmosdb.request_charge">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateDatabaseAsync" displayName="CreateDatabaseAsync ">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_database" displayName="create_database ">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateDatabaseAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_database</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">miscdbcustonhandler</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.machine_id">Some Value</ATTRIBUTE>
@ -258,10 +258,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.DeleteAsync" displayName="DeleteAsync ">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.delete_database" displayName="delete_database ">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">DeleteAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">delete_database</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">miscdbdataplane</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.machine_id">Some Value</ATTRIBUTE>
@ -275,10 +275,10 @@
<ATTRIBUTE key="db.cosmosdb.request_charge">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateDatabaseAsync" displayName="CreateDatabaseAsync ">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_database" displayName="create_database ">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateDatabaseAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_database</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">miscdbdataplane</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.machine_id">Some Value</ATTRIBUTE>

Просмотреть файл

@ -158,10 +158,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -435,10 +435,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -690,10 +690,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -977,10 +977,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1328,10 +1328,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1512,10 +1512,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -610,10 +610,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -631,10 +631,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -652,10 +652,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -673,10 +673,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1331,10 +1331,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1352,10 +1352,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1373,10 +1373,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1394,10 +1394,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2033,10 +2033,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2054,10 +2054,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2075,10 +2075,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2096,10 +2096,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2755,10 +2755,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2776,10 +2776,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2797,10 +2797,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2818,10 +2818,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3551,10 +3551,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3572,10 +3572,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3593,10 +3593,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -3614,10 +3614,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -4262,10 +4262,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -4283,10 +4283,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -4304,10 +4304,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -4325,10 +4325,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -4993,10 +4993,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -5014,10 +5014,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -5035,10 +5035,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -5056,10 +5056,10 @@
<ATTRIBUTE key="db.cosmosdb.correlated_activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.query_items" displayName="query_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">query_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -576,10 +576,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -596,10 +596,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -616,10 +616,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -636,10 +636,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1259,10 +1259,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1279,10 +1279,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1299,10 +1299,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1319,10 +1319,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1923,10 +1923,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1943,10 +1943,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1963,10 +1963,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1983,10 +1983,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.FeedIterator ReadNextAsync" displayName="FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2607,10 +2607,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2627,10 +2627,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2647,10 +2647,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -2667,10 +2667,10 @@
<ATTRIBUTE key="db.cosmosdb.activity_id">Some Value</ATTRIBUTE>
<ATTRIBUTE key="db.cosmosdb.regions_contacted">South Central US</ATTRIBUTE>
</ACTIVITY>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.Typed FeedIterator ReadNextAsync" displayName="Typed FeedIterator ReadNextAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_feed_ranges" displayName="read_feed_ranges containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">Typed FeedIterator ReadNextAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_feed_ranges</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -551,10 +551,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ReadManyItemsStreamAsync" displayName="ReadManyItemsStreamAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_many_items" displayName="read_many_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ReadManyItemsStreamAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_many_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -1136,10 +1136,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ReadManyItemsAsync" displayName="ReadManyItemsAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_many_items" displayName="read_many_items containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ReadManyItemsAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_many_items</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -99,10 +99,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemStreamAsync" displayName="CreateItemStreamAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemStreamAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -215,10 +215,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ReadItemStreamAsync" displayName="ReadItemStreamAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_item" displayName="read_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ReadItemStreamAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -339,10 +339,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ReplaceItemStreamAsync" displayName="ReplaceItemStreamAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.replace_item" displayName="replace_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ReplaceItemStreamAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">replace_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -458,10 +458,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.DeleteItemStreamAsync" displayName="DeleteItemStreamAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.delete_item" displayName="delete_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">DeleteItemStreamAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">delete_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -119,10 +119,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.CreateItemAsync" displayName="CreateItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.create_item" displayName="create_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">CreateItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">create_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -240,10 +240,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ReadItemAsync" displayName="ReadItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.read_item" displayName="read_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ReadItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">read_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -374,10 +374,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.ReplaceItemAsync" displayName="ReplaceItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.replace_item" displayName="replace_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">ReplaceItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">replace_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>
@ -497,10 +497,10 @@
}
]
}]]></Json><OTelActivities>
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.DeleteItemAsync" displayName="DeleteItemAsync containerName">
<ACTIVITY source="Azure.Cosmos.Operation" operationName="Operation.delete_item" displayName="delete_item containerName">
<ATTRIBUTE key="az.namespace">Microsoft.DocumentDB</ATTRIBUTE>
<ATTRIBUTE key="az.schema_url">https://opentelemetry.io/schemas/1.23.0</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">DeleteItemAsync</ATTRIBUTE>
<ATTRIBUTE key="db.operation.name">delete_item</ATTRIBUTE>
<ATTRIBUTE key="db.namespace">databaseName</ATTRIBUTE>
<ATTRIBUTE key="db.collection.name">containerName</ATTRIBUTE>
<ATTRIBUTE key="db.system">cosmosdb</ATTRIBUTE>

Просмотреть файл

@ -54,7 +54,7 @@ namespace Microsoft.Azure.Cosmos.Tracing
"db.cosmosdb.request_charge",
"db.cosmosdb.regions_contacted",
"db.cosmosdb.item_count",
"db.operation.batch.size",
"db.operation.batch_size",
"db.cosmosdb.activity_id",
"db.cosmosdb.correlated_activity_id",
"exception.type",

Просмотреть файл

@ -40,7 +40,7 @@ namespace Microsoft.Azure.Cosmos.Tests
"db.cosmosdb.connection_mode",
"db.cosmosdb.operation_type",
"db.cosmosdb.regions_contacted",
"db.operation.batch.size",
"db.operation.batch_size",
"error.type"
};

Просмотреть файл

@ -762,11 +762,12 @@ namespace Microsoft.Azure.Cosmos.Tests
It.IsAny<OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<object>>>(),
It.IsAny<Func<object, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<object, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.IsAny<TraceComponent>(),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<object>>, Func<object, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType,requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton));
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<object>>, Tuple<string, Func<object, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType,requestOptions, func, oTelFunc, resourceType, comp, level) => func(NoOpTrace.Singleton));
return mockContext.Object;
}

Просмотреть файл

@ -350,11 +350,12 @@ namespace Microsoft.Azure.Cosmos.Tests
It.IsAny<OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<object>>>(),
It.IsAny<Func<object, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<object, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.IsAny<TraceComponent>(),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<object>>, Func<object, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName,containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton));
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<object>>, Tuple<string, Func<object, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName,containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) => func(NoOpTrace.Singleton));
mockContext.Setup(x => x.Client).Returns(MockCosmosUtil.CreateMockCosmosClient());

Просмотреть файл

@ -206,11 +206,12 @@ namespace Microsoft.Azure.Cosmos.Tests
It.IsAny<OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<object>>>(),
It.IsAny<Func<object, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<object, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.IsAny<TraceComponent>(),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<object>>, Func<object, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton));
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<object>>, Tuple<string, Func<object, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) => func(NoOpTrace.Singleton));
return mockContext.Object;
}

Просмотреть файл

@ -12,6 +12,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.ChangeFeed.LeaseManagement;
using Microsoft.Azure.Cosmos.Telemetry;
using Microsoft.Azure.Cosmos.Telemetry.OpenTelemetry;
using Microsoft.Azure.Cosmos.Tests;
using Microsoft.Azure.Cosmos.Tracing;
using Microsoft.Azure.Documents;
@ -390,11 +391,12 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
It.IsAny<Documents.OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<FeedResponse<ChangeFeedProcessorState>>>>(),
It.IsAny<Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.Is<TraceComponent>(tc => tc == TraceComponent.ChangeFeed),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<FeedResponse<ChangeFeedProcessorState>>>, Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) =>
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<FeedResponse<ChangeFeedProcessorState>>>, Tuple<string, Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) =>
{
using (ITrace trace = Trace.GetRootTrace(operationName, comp, level))
{
@ -501,11 +503,12 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
It.IsAny<Documents.OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<FeedResponse<ChangeFeedProcessorState>>>>(),
It.IsAny<Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.Is<TraceComponent>(tc => tc == TraceComponent.ChangeFeed),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<FeedResponse<ChangeFeedProcessorState>>>, Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) =>
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<FeedResponse<ChangeFeedProcessorState>>>, Tuple<string, Func<FeedResponse<ChangeFeedProcessorState>, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) =>
{
using (ITrace trace = Trace.GetRootTrace(operationName, comp, level))
{

Просмотреть файл

@ -6,6 +6,7 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
{
using System;
using System.IO;
using System.Security.AccessControl;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Azure.Cosmos.ChangeFeed.LeaseManagement;
@ -46,11 +47,12 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
It.IsAny<Documents.OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ResponseMessage>>>(),
It.IsAny<Func<ResponseMessage, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>>(),
It.IsAny<Documents.ResourceType?>(),
It.Is<TraceComponent>(tc => tc == TraceComponent.ChangeFeed),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>,Func<ResponseMessage, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) =>
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>,Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) =>
{
using (ITrace trace = Trace.GetRootTrace(operationName, comp, level))
{
@ -126,11 +128,12 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
It.IsAny<Documents.OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ResponseMessage>>>(),
It.IsAny<Func<ResponseMessage, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>>(),
It.IsAny<Documents.ResourceType?>(),
It.Is<TraceComponent>(tc => tc == TraceComponent.ChangeFeed),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Func<ResponseMessage, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) =>
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) =>
{
using (ITrace trace = Trace.GetRootTrace(operationName, comp, level))
{
@ -196,11 +199,12 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
It.IsAny<Documents.OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ResponseMessage>>>(),
It.IsAny<Func<ResponseMessage, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>>(),
It.IsAny<Documents.ResourceType?>(),
It.Is<TraceComponent>(tc => tc == TraceComponent.ChangeFeed),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Func<ResponseMessage, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) =>
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) =>
{
using (ITrace trace = Trace.GetRootTrace(operationName, comp, level))
{
@ -278,11 +282,12 @@ namespace Microsoft.Azure.Cosmos.ChangeFeed.Tests
It.IsAny<Documents.OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ResponseMessage>>>(),
It.IsAny<Func<ResponseMessage, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>>(),
It.IsAny<Documents.ResourceType?>(),
It.Is<TraceComponent>(tc => tc == TraceComponent.ChangeFeed),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Func<ResponseMessage, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) =>
.Returns<string, string, string, Documents.OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>, Documents.ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) =>
{
using (ITrace trace = Trace.GetRootTrace(operationName, comp, level))
{

Просмотреть файл

@ -716,11 +716,12 @@ namespace Microsoft.Azure.Cosmos.Tests
It.IsAny<OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ResponseMessage>>>(),
It.IsAny<Func<ResponseMessage, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.IsAny<TraceComponent>(),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Func<ResponseMessage, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton));
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) => func(NoOpTrace.Singleton));
mockContext.Setup(x => x.OperationHelperAsync<ItemResponse<dynamic>>(
It.IsAny<string>(),
@ -729,11 +730,12 @@ namespace Microsoft.Azure.Cosmos.Tests
It.IsAny<OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ItemResponse<dynamic>>>>(),
It.IsAny<Func<ItemResponse<dynamic>, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ItemResponse<dynamic>, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.IsAny<TraceComponent>(),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<ItemResponse<dynamic>>>, Func<ItemResponse<dynamic>, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton));
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<ItemResponse<dynamic>>>, Tuple<string, Func<ItemResponse<dynamic>, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) => func(NoOpTrace.Singleton));
mockContext.Setup(x => x.ProcessResourceOperationStreamAsync(
It.IsAny<string>(),

Просмотреть файл

@ -482,11 +482,12 @@ namespace Microsoft.Azure.Cosmos.Tests.FeedRange
It.IsAny<OperationType>(),
It.IsAny<RequestOptions>(),
It.IsAny<Func<ITrace, Task<ResponseMessage>>>(),
It.IsAny<Func<ResponseMessage, OpenTelemetryAttributes>>(),
It.IsAny<Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>>(),
It.IsAny<ResourceType?>(),
It.IsAny<TraceComponent>(),
It.IsAny<TraceLevel>()))
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Func<ResponseMessage, OpenTelemetryAttributes>, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, comp, level) => func(NoOpTrace.Singleton));
.Returns<string, string, string, OperationType, RequestOptions, Func<ITrace, Task<ResponseMessage>>, Tuple<string, Func<ResponseMessage, OpenTelemetryAttributes>>, ResourceType?, TraceComponent, TraceLevel>(
(operationName, containerName, databaseName, operationType, requestOptions, func, oTelFunc, resourceType, comp, level) => func(NoOpTrace.Singleton));
return mockContext.Object;
}

Просмотреть файл

@ -108,7 +108,7 @@ namespace Microsoft.Azure.Cosmos.Tests.Telemetry
if (instance is TransactionalBatchResponse transactionInstance)
{
_ = new OpenTelemetryResponse(transactionInstance, false, null);
_ = new OpenTelemetryResponse(transactionInstance);
}
else if (instance is ResponseMessage responseMessageInstance)
{