Skip to content

Latest commit

 

History

History
65 lines (50 loc) · 2.77 KB

File metadata and controls

65 lines (50 loc) · 2.77 KB
title Server diagnostics for Azure Cosmos DB for Apache Cassandra
description This article explains some common error codes in Azure Cosmos DB's API for Cassandra and how to troubleshoot using Log Analytics
author IriaOsara
ms.author IriaOsara
ms.service azure-cosmos-db
ms.subservice apache-cassandra
ms.topic troubleshooting
ms.date 10/12/2021
ms.custom template-how-to

Server diagnostics for Azure Cosmos DB for Apache Cassandra

[!INCLUDECassandra]

[!INCLUDENote - Recommended services]

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