Skip to content

Commit 78c0890

Browse files
authored
Merge pull request #110483 from SnehaGunda/breadcrumb
Adding monitor server side latency doc
2 parents 02cd083 + c2191f9 commit 78c0890

File tree

8 files changed

+57
-5
lines changed

8 files changed

+57
-5
lines changed

articles/cosmos-db/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,8 @@
10331033
items:
10341034
- name: Monitor Cosmos DB
10351035
href: monitor-cosmos-db.md
1036+
- name: Monitor server-side latency
1037+
href: monitor-server-side-latency.md
10361038
- name: Monitor with diagnostic logs
10371039
href: cosmosdb-monitor-resource-logs.md
10381040
- name: Audit control plane logs
Binary file not shown.
119 KB
Loading
104 KB
Loading
201 KB
Loading
64.9 KB
Loading

articles/cosmos-db/monitor-cosmos-db.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The following sections build on this article by describing the specific data gat
4343

4444
![Choose a Cosmos DB account to view metrics](./media/monitor-cosmos-db/select-cosmosdb-account.png)
4545

46-
1. Next you can select a metric from the list of available metrics. You can select metrics specific to request units, storage, latency, availability, Cassandra, and others. To learn in detail about all the available metrics in this list, see the [Metrics by category](monitor-cosmos-db-reference.md) article. In this example, lets select **Request units** and **Avg** as the aggregation value.
46+
1. Next you can select a metric from the list of available metrics. You can select metrics specific to request units, storage, latency, availability, Cassandra, and others. To learn in detail about all the available metrics in this list, see the [Metrics by category](monitor-cosmos-db-reference.md) article. In this example, let's select **Request units** and **Avg** as the aggregation value.
4747

4848
In addition to these details, you can also select the **Time range** and **Time granularity** of the metrics. At max, you can view metrics for the past 30 days. After you apply the filter, a chart is displayed based on your filter. You can see the average number of request units consumed per minute for the selected period.
4949

@@ -59,10 +59,6 @@ You can group metrics by using the **Apply splitting** option. For example, you
5959

6060
![Add apply splitting filter](./media/monitor-cosmos-db/apply-metrics-splitting.png)
6161

62-
Here is another example to view the server-side latency metrics for a specific database, container, or an operation:
63-
64-
![Server-side latency metrics](./media/monitor-cosmos-db/serverside-latency-metric.png)
65-
6662
## Monitoring data collected from Azure Cosmos DB
6763

6864
Azure Cosmos DB collects the same kinds of monitoring data as other Azure resources which are described in [Monitoring data from Azure resources](../azure-monitor/insights/monitor-azure-resource.md#monitoring-data). See [Azure Cosmos DB monitoring data reference](monitor-cosmos-db-reference.md) for a detailed reference of the logs and metrics created by Azure Cosmos DB.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
title: How to monitor the server-side latency for operations in Azure Cosmos DB
3+
description: Learn how to monitor server latency for operations in Azure Cosmos DB account or a container. Owners of an Azure Cosmos DB account can understand the server-side latency issues with your Azure Cosmos accounts.
4+
ms.service: cosmos-db
5+
ms.topic: conceptual
6+
author: kanshiG
7+
ms.author: govindk
8+
ms.date: 04/07/2020
9+
---
10+
11+
# How to monitor the server-side latency for operations in an Azure Cosmos DB container or account
12+
13+
Azure Monitor for Azure Cosmos DB provides a metrics view to monitor your account and create dashboards. The Azure Cosmos DB metrics are collected by default, this feature does not require you to enable or configure anything explicitly. The server-side latency metric is used to view the server-side latency of an operation. Azure Cosmos DB provides SLA of less than 10 ms for point read/write operations with direct connectivity. For point read and write operations, the SLAs are calculated as detailed in the [SLA document](https://azure.microsoft.com/support/legal/sla/cosmos-db/v1_3/).
14+
15+
If you see unusually large latency for point operations such as:
16+
17+
* A get or set operation with partition key and ID in direct mode
18+
* A read or write operation or
19+
* A query
20+
21+
You can look up the diagnostic log to see the size of data returned. If you see a sustained high latency for query operations, you can look up the diagnostic log for size of data returned, [throughput or RU/s](cosmosdb-monitor-resource-logs.md#diagnostic-queries) used, or the number of such operations in a given period. This way, you can debug the server-side latency issues.
22+
23+
## View server-side latency metric
24+
25+
1. Sign in to the [Azure portal](https://portal.azure.com/).
26+
27+
1. Select **Monitor** from the left-hand navigation bar and select **Metrics**.
28+
29+
![Metrics pane in Azure Monitor](./media/monitor-server-side-latency/monitor-metrics-blade.png)
30+
31+
1. From the **Metrics** pane > **Select a resource** > choose the required **subscription**, and **resource group**. For the **Resource type**, select **Azure Cosmos DB accounts**, choose one of your existing Azure Cosmos accounts, and select **Apply**.
32+
33+
![Choose a Cosmos DB account to view metrics](./media/monitor-server-side-latency/select-cosmosdb-account.png)
34+
35+
1. Next select the **Server Side Latency** metric from the list of available metrics. To learn in detail about all the available metrics in this list, see the [Metrics by category](monitor-cosmos-db-reference.md) article. In this example, let's select **Server Side Latency** and **Avg** as the aggregation value. In addition to these details, you can also select the **Time range** and **Time granularity** of the metrics. At max, you can view metrics for the past 30 days. After you apply the filter, a chart is displayed based on your filter. You can see the average number of request units consumed per minute for the selected period.
36+
37+
![Choose the Server-Side Latency metric from the Azure portal](./media/monitor-server-side-latency/serverside-latency-metric.png)
38+
39+
## Filters for server-side latency
40+
41+
You can also filter metrics and the chart displayed by a specific **CollectionName**, **ConnectionMode**, **DatabaseName**, **OperationType**, **Region**, and **PublicAPIType**.
42+
43+
To filter the metrics, select **Add filter** and choose the required property such as **PublicAPIType** and select the value **sql**. Add another filter for **OperationType**. The graph then displays the server-side latency for different operations during the selected period. The operations executed via Stored procedure are not logged so they are not available under the OperationType metric.
44+
45+
The **Server Side Latency** metrics for each operation are displayed as shown in the following image:
46+
47+
![Filters for server-side latency metrics](./media/monitor-server-side-latency/serverside-latency-filters.png)
48+
49+
You can also group the metrics by using the **Apply splitting** option.
50+
51+
## Next steps
52+
53+
* Monitor Azure Cosmos DB data by using [diagnostic settings](cosmosdb-monitor-resource-logs.md) in Azure
54+
* [Audit Azure Cosmos DB control plane operations](audit-control-plane-logs.md)

0 commit comments

Comments
 (0)