Skip to content

Commit

Permalink
Merge branch 'master' into users/sakulk/checkKeyVaultUri
Browse files Browse the repository at this point in the history
  • Loading branch information
kr-santosh committed Jan 19, 2023
2 parents 2c1c6d1 + 4b77519 commit 5a73efb
Show file tree
Hide file tree
Showing 18 changed files with 272 additions and 266 deletions.
3 changes: 1 addition & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ClientOfficialVersion>3.31.2</ClientOfficialVersion>
<ClientPreviewVersion>3.31.2</ClientPreviewVersion>
<ClientPreviewSuffixVersion>preview</ClientPreviewSuffixVersion>
<DirectVersion>3.30.0</DirectVersion>
<DirectVersion>3.30.1</DirectVersion>
<EncryptionOfficialVersion>2.0.1</EncryptionOfficialVersion>
<EncryptionPreviewVersion>2.0.1</EncryptionPreviewVersion>
<EncryptionPreviewSuffixVersion>preview</EncryptionPreviewSuffixVersion>
Expand Down
2 changes: 1 addition & 1 deletion Microsoft.Azure.Cosmos/src/DocumentClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ private void InitializeClientTelemetry()
this.clientTelemetry = ClientTelemetry.CreateAndStartBackgroundTelemetry(
clientId: this.clientId,
httpClient: this.httpClient,
userAgent: this.ConnectionPolicy.UserAgentContainer.UserAgent,
userAgent: this.ConnectionPolicy.UserAgentContainer.BaseUserAgent,
connectionMode: this.ConnectionPolicy.ConnectionMode,
authorizationTokenProvider: this.cosmosAuthorization,
diagnosticsHelper: DiagnosticsHandlerHelper.Instance,
Expand Down
5 changes: 5 additions & 0 deletions Microsoft.Azure.Cosmos/src/Regions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,5 +344,10 @@ public static class Regions
/// Name of the Azure China East 3 region in the Azure Cosmos DB service.
/// </summary>
public const string ChinaEast3 = "China East 3";

/// <summary>
/// Name of the Azure Poland Central region in the Azure Cosmos DB service.
/// </summary>
public const string PolandCentral = "Poland Central";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void RecordDiagnosticsForRequests(
operationType: operationType,
response: response) && CosmosDbEventSource.IsEnabled(EventLevel.Warning))
{
CosmosDbEventSource.Singleton.WriteWarningEvent(response.Diagnostics.ToString());
CosmosDbEventSource.Singleton.LatencyOverThreshold(response.Diagnostics.ToString());
}
}

Expand All @@ -49,26 +49,20 @@ public static void RecordDiagnosticsForExceptions(CosmosDiagnostics diagnostics)
{
if (CosmosDbEventSource.IsEnabled(EventLevel.Error))
{
CosmosDbEventSource.Singleton.WriteErrorEvent(diagnostics.ToString());
CosmosDbEventSource.Singleton.Exception(diagnostics.ToString());
}
}

[Event(1, Level = EventLevel.Error)]
private void WriteErrorEvent(string message)
private void Exception(string message)
{
this.WriteEvent(1, message);
}

[Event(2, Level = EventLevel.Warning)]
private void WriteWarningEvent(string message)
private void LatencyOverThreshold(string message)
{
this.WriteEvent(2, message);
}

[Event(3, Level = EventLevel.Informational)]
private void WriteInfoEvent(string message)
{
this.WriteEvent(3, message);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
]
}]]></Json>
<OTelActivities><ACTIVITY><OPERATION>Operation.ExecuteAsync</OPERATION><ATTRIBUTE-KEY>kind</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>client</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>az.namespace</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>Microsoft.DocumentDB</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>db.operation</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>ExecuteAsync</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>db.name</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.container</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.system</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>cosmosdb</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>db.cosmosdb.machine_id</ATTRIBUTE-KEY><ATTRIBUTE-KEY>net.peer.name</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>127.0.0.1</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>db.cosmosdb.client_id</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.user_agent</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.connection_mode</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>Direct</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>db.cosmosdb.operation_type</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>Replace</ATTRIBUTE-VALUE><ATTRIBUTE-KEY>db.cosmosdb.request_content_length_bytes</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.response_content_length_bytes</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.status_code</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.sub_status_code</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.request_charge</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.item_count</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.activity_id</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.correlated_activity_id</ATTRIBUTE-KEY><ATTRIBUTE-KEY>db.cosmosdb.regions_contacted</ATTRIBUTE-KEY><ATTRIBUTE-VALUE>South Central US</ATTRIBUTE-VALUE></ACTIVITY>
<EVENT>Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test.</EVENT>
<EVENT><EVENT-NAME>LatencyOverThreshold</EVENT-NAME><EVENT-TEXT>Ideally, this should contain request diagnostics but request diagnostics is subject to change with each request as it contains few unique id. So just putting this tag with this static text to make sure event is getting generated for each test.</EVENT-TEXT></EVENT>
</OTelActivities>
</Output>
</Result>
Expand Down
Loading

0 comments on commit 5a73efb

Please sign in to comment.