Skip to content

Commit b39043d

Browse files
committed
format fixes
1 parent 0354a0e commit b39043d

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

articles/cosmos-db/audit-control-plane-logs.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,17 @@ For API-specific operations, the operation is named with the following format:
149149

150150
The *ResourceDetails* property contains the entire resource body as a request payload and it contains all the properties requested to update
151151

152-
## Diagnostic log query for Control plane
152+
## Diagnostic log queries for control plane operations
153153

154-
```
154+
The following are some examples to get diagnostic logs for control plane operations:
155+
156+
```kusto
155157
AzureDiagnostics 
156158
| where Category =="ControlPlaneRequests"
157159
| where  OperationName startswith "SqlContainersUpdateStart"
160+
```
158161

162+
```kusto
159163
AzureDiagnostics 
160164
| where Category =="ControlPlaneRequests"
161165
| where  OperationName startswith "SqlContainersThroughputUpdateStart"

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

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -146,25 +146,25 @@ For detailed information about how to create a diagnostic setting by using the A
146146

147147
1. How to get partition Key statistics to evaluate skew across top three partitions for database account?
148148

149-
```Kusto
150-
AzureDiagnostics
151-
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="PartitionKeyStatistics"
152-
| project SubscriptionId, regionName_s, databaseName_s, collectionName_s, partitionKey_s, sizeKb_d, ResourceId
153-
```
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-
149+
```Kusto
150+
AzureDiagnostics
151+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="PartitionKeyStatistics"
152+
| project SubscriptionId, regionName_s, databaseName_s, collectionName_s, partitionKey_s, sizeKb_d, ResourceId
153+
```
154+
155+
1. How to get P99 or P50 replication latencies for operations, request charge or the length of the response?
156+
157+
```Kusto
158+
AzureDiagnostics
159+
| where ResourceProvider=="MICROSOFT.DOCUMENTDB" and Category=="DataPlaneRequests"
160+
| where TimeGenerated >= ago(2d)
161+
| summarize
162+
percentile(todouble(responseLength_s), 50), percentile(todouble(responseLength_s), 99), max(responseLength_s),
163+
percentile(todouble(requestCharge_s), 50), percentile(todouble(requestCharge_s), 99), max(requestCharge_s),
164+
percentile(todouble(duration_s), 50), percentile(todouble(duration_s), 99), max(duration_s),
165+
count()
166+
by OperationName, requestResourceType_s, userAgent_s, collectionRid_s, bin(TimeGenerated, 1h)
167+
```
168168

169169
## Next steps
170170

0 commit comments

Comments
 (0)