You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (response.Diagnostics.GetClientElapsedTime() >ConfigurableSlowRequestTimeSpan||!response.IsSuccessStatusCode)
75
73
{
76
-
// Log the diagnostics and add any additional info necessary to correlate to other logs
77
-
Console.Write(response.Diagnostics.ToString());
74
+
// Log the diagnostics and add any additional info necessary to correlate to other logs with: response.Diagnostics.ToString()
78
75
}
79
76
```
80
77
@@ -202,58 +199,94 @@ Show the time for the different stages of sending and receiving a request in the
202
199
**Transit time is large*, which leads to a networking problem. Compare this number to the `BELatencyInMs`. If `BELatencyInMs` is small, then the time was spent on the network, and not on the Azure Cosmos DB service.
203
200
**Received time is large* might be caused by a thread starvation problem. This is the time between having the response and returning the result.
Information about a particular backend server. The SDK can open multiple connections to a single backend server depending upon the number of pending requests and the MaxConcurrentRequestsPerConnection.
204
+
205
+
*`inflightRequests` The number of pending requests to a backend server (maybe from different partitions). A high number may to lead to more traffic and higher latencies.
206
+
*`openConnections` is the total Number of connections open to a single backend server. This can be useful to show SNAT port exhausion if this number is very high.
Information about the particular connection (new or old) the request get's assigned to.
210
+
211
+
*`waitforConnectionInit`: The current request was waiting for new connection initialization to complete. This will lead to higher latencies.
212
+
*`callsPendingReceive`: Number of calls that was pending receive before this call was sent. A high number can show us that there were a lot of calls before this call and it may lead to higher latencies. If this number is high it points to a head of line blocking issue possibly caused by another request like query or feed operation that is taking a long time to process. Try lowering the CosmosClientOptions.MaxRequestsPerTcpConnection to increase the number of channels.
213
+
*`LastSentTime`: Time of last request that was sent to this server. This along with LastReceivedTime can be used to see connectivity or endpoint issues. For example if there are a lot of receive timeouts, Sent time will be much larger than the Receive time.
214
+
*`lastReceive`: Time of last request that was received from this server
215
+
*`lastSendAttempt`: Time of the last send attempt
216
+
217
+
### <aname="Request and response sizes"></a>Request and response sizes
218
+
*`requestSizeInBytes`: The total size of the request sent to Cosmos DB
219
+
*`responseMetadataSizeInBytes`: The size of headers returned from Cosmos DB
220
+
*`responseBodySizeInBytes`: The size of content returned from Cosmos DB
0 commit comments