I am trying to fetch the normalized RU(Request Units) Metric of azure cosmos DB programmatically in a dot net application using Azure Monitor REST APIs but unable to proceed.
I found this API from official docs but not sure what parameters to give so as to get the desired results.
Can anyone point me in the right direction(Any videos/blogs/docs)?
We can use .NET Cosmos DB SDK with the DocumentClient class, or using existing MongoDB SDKs or just leveraging the Azure Cosmos DB REST API directly - all of them provide the opportunity to receive the consumed Request Units:
// https://docs.microsoft.com/en-us/azure/cosmos-db/performance-tips#throughput
var client = new DocumentClient(new Uri(accountEndpoint), accountKey);
ResourceResponse<Document> response = await client.CreateDocumentAsync(collectionSelfLink, myDocument);
var requestCharge = response.RequestCharge;
Refer this Github link to calculate the Request Units in Azure Cosmos DB.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.