Skip to content

Commit 0354a0e

Browse files
authored
Merge pull request #113278 from kanshiG/patch-84
Added another query
2 parents 8211603 + faf47a5 commit 0354a0e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

articles/cosmos-db/cosmosdb-monitor-resource-logs.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,20 @@ For detailed information about how to create a diagnostic setting by using the A
151151
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="PartitionKeyStatistics"
152152
| project SubscriptionId, regionName_s, databaseName_s, collectionName_s, partitionKey_s, sizeKb_d, ResourceId
153153
```
154+
155+
1. How to get P99s or P50 for operation latencies, request charge or the length of the respons?
156+
```Kusto
157+
AzureDiagnostics
158+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
159+
| where TimeGenerated >= ago(2d)
160+
| summarize
161+
percentile(todouble(responseLength_s), 50), percentile(todouble(responseLength_s), 99), max(responseLength_s),
162+
percentile(todouble(requestCharge_s), 50), percentile(todouble(requestCharge_s), 99), max(requestCharge_s),
163+
percentile(todouble(duration_s), 50), percentile(todouble(duration_s), 99), max(duration_s),
164+
count()
165+
by OperationName, requestResourceType_s, userAgent_s, collectionRid_s, bin(TimeGenerated, 1h)
166+
```
167+
154168
155169
## Next steps
156170

0 commit comments

Comments
 (0)