Azure Cosmos DB monitoring data reference

This article contains all the monitoring reference information for this service.

See Monitor Azure Cosmos DB for details on the data you can collect for Azure Cosmos DB and how to use it.

Metrics

This section lists all the automatically collected platform metrics for this service. These metrics are also part of the global list of all platform metrics supported in Azure Monitor.

For information on metric retention, see Azure Monitor Metrics overview. For a list of all Azure Monitor supported metrics, including Azure Cosmos DB, see Azure Monitor supported metrics.

Metrics by category

The following tables list Azure Cosmos DB metrics categorized by metric type.

Request metrics

  • TotalRequests (Total Requests)
  • MetadataRequests (Metadata Requests)
  • MongoRequests (Mongo Requests)

Request Unit metrics

  • MongoRequestCharge (Mongo Request Charge)
  • TotalRequestUnits (Total Request Units)
  • ProvisionedThroughput (Provisioned Throughput)
  • AutoscaleMaxThroughput (Autoscale Max Throughput)
  • PhysicalPartitionThroughputInfo (Physical Partition Throughput Info)

Storage metrics

  • AvailableStorage (Available Storage)
  • DataUsage (Data Usage)
  • IndexUsage (Index Usage)
  • DocumentQuota (Document Quota)
  • DocumentCount (Document Count)
  • PhysicalPartitionSizeInfo (Physical Partition Size Info)

Latency metrics

  • ReplicationLatency (Replication Latency)
  • Server Side Latency

Availability metrics

  • ServiceAvailability (Service Availability)

API for Cassandra metrics

  • CassandraRequests (Cassandra Requests)
  • CassandraRequestCharges (Cassandra Request Charges)
  • CassandraConnectionClosures (Cassandra Connection Closures)

Metric dimensions

For information about what metric dimensions are, see Multi-dimensional metrics. This service has the following dimensions associated with its metrics.

Microsoft.DocumentDB/DatabaseAccounts

  • ApiKindResourceType
  • APIType
  • ApplicationType
  • BuildType
  • CacheEntryType
  • CacheExercised
  • CacheHit
  • CapacityType
  • ChildResourceName
  • ClosureReason
  • CommandName
  • ConnectionMode
  • DiagnosticSettingsName
  • Error
  • ErrorCode
  • IsExternal
  • IsSharedThroughputOffer
  • IsThroughputRequest
  • KeyType
  • MetricType
  • NotStarted
  • OfferOwnerRid
  • PartitionKeyRangeId
  • PhysicalPartitionId
  • PhysicalPartitionId
  • PriorityLevel
  • PublicAPIType
  • ReplicationInProgress
  • ResourceGroupName
  • ResourceName
  • Role
  • SourceRegion
  • TargetContainerName
  • TargetRegion

Microsoft.DocumentDB/cassandraClusters

  • cassandra_datacenter
  • cassandra_node
  • cache_name

Microsoft.DocumentDB/mongoClusters

  • ServerName

Resource logs

This section lists the types of resource logs you can collect for this service. The section pulls from the list of all resource logs category types supported in Azure Monitor.

Azure Cosmos DB resource logs properties

The following table lists properties of resource logs in Azure Cosmos DB. The resource logs are collected into Azure Monitor Logs or Azure Storage.

Azure Storage field or property Azure Monitor Logs property Description
time TimeGenerated The date and time (UTC) when the operation occurred.
resourceId Resource The Azure Cosmos DB account for which logs are enabled.
category Category For Azure Cosmos DB, DataPlaneRequests, MongoRequests, QueryRuntimeStatistics, PartitionKeyStatistics, PartitionKeyRUConsumption, ControlPlaneRequests, CassandraRequests, GremlinRequests are the available log types.
operationName OperationName Name of the operation. The operation name can be Create, Update, Read, ReadFeed, Delete, Replace, Execute, SqlQuery, Query, JSQuery, Head, HeadFeed, or Upsert.
properties n/a The contents of this field are described in the rows that follow.
activityId activityId_g The unique GUID for the logged operation.
userAgent userAgent_s A string that specifies the client user agent from which, the request was sent. The format of user agent is {user agent name}/{version}.
requestResourceType requestResourceType_s The type of the resource accessed. This value can be database, container, document, attachment, user, permission, stored procedure, trigger, user-defined function, or an offer.
statusCode statusCode_s The response status of the operation.
requestResourceId ResourceId The resourceId that pertains to the request. Depending on the operation performed, this value may point to databaseRid, collectionRid, or documentRid.
clientIpAddress clientIpAddress_s The client's IP address.
requestCharge requestCharge_s The number of RUs that are used by the operation
collectionRid collectionId_s The unique ID for the collection.
duration duration_d The duration of the operation, in milliseconds.
requestLength requestLength_s The length of the request, in bytes.
responseLength responseLength_s The length of the response, in bytes.
resourceTokenPermissionId resourceTokenPermissionId_s This property indicates the resource token permission ID that you have specified. To learn more about permissions, see the Secure access to your data article.
resourceTokenPermissionMode resourceTokenPermissionMode_s This property indicates the permission mode that you have set when creating the resource token. The permission mode can have values such as "all" or "read". To learn more about permissions, see the Secure access to your data article.
resourceTokenUserRid resourceTokenUserRid_s This value is non-empty when resource tokens are used for authentication. The value points to the resource ID of the user.
responseLength responseLength_s The length of the response, in bytes.

Activity log

The linked table lists the operations that may be recorded in the activity log for this service. This is a subset of all the possible resource provider operations in the activity log.

For more information on the schema of activity log entries, see Activity Log schema.