Created
January 26, 2021 20:27
-
-
Save rmaziarka/764ed0b37e62c34f14299d41b53ae92b to your computer and use it in GitHub Desktop.
CosmosDB logs query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let queryRUChargeData = AzureDiagnostics | |
| where Category == "DataPlaneRequests" | |
| where OperationName == "Query" | |
| project requestCharge_s, operationType_s, activityId_g, databaseName_s, collectionName_s, requestResourceType_s, requestResourceId_s, OperationName, TimeGenerated, callerId_s, clientIpAddress_s, userAgent_s; | |
AzureDiagnostics | |
| where Category == "QueryRuntimeStatistics" | |
| join queryRUChargeData on $left.activityId_g == $right.activityId_g | |
| summarize SumRU = sum(todouble(requestCharge_s1)), Count = count(requestCharge_s1) by collectionname_s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment