Server diagnostics for Azure Cosmos DB for Apache Cassandra

APPLIES TO: Cassandra

Log Analytics is a tool in the Azure portal that helps you run server diagnostics on your API for Cassandra account.

Prerequisites

Use Log Analytics

After you've completed the log analytics setup, you can begin to explore your logs to gain more insights.

Explore Data Plane Operations

Use the CDBCassandraRequests table to see data plane operations specifically for your API for Cassandra account. A sample query to see the topN(10) consuming request and get detailed information on each request made.

CDBCassandraRequests
| where RequestCharge  > 0
| project DatabaseName, CollectionName, DurationMs, OperationName, ActivityId, ErrorCode, RequestCharge, PIICommandText 
| order by RequestCharge
| take 10

For a list of error codes and their possible solutions, see Error codes.

Troubleshoot Query Consumption

The CDBPartitionKeyRUConsumption table contains details on request unit (RU) consumption for logical keys in each region within each of their physical partitions.

CDBPartitionKeyRUConsumption 
| summarize sum(todouble(RequestCharge)) by PartitionKey, PartitionKeyRangeId
| render columnchart

Explore Control Plane Operations

The CBDControlPlaneRequests table contains details on control plane operations, specifically for API for Cassandra accounts.

CDBControlPlaneRequests
| where TimeGenerated > now(-6h)
| where  ApiKind == "Cassandra"
| where OperationName in ("Create", "Upsert", "Delete", "Execute")
| summarize by OperationName

Next steps