Logging and monitoring cost of CosmosDB queries by using Application Insights

Each time when creating an application that is using document databases like CosmosDB we are facing a challenge of estimation of its costs and later optimisation. Both tasks are not so easy to do. To solve the first one we can use cost calculator. We just need to provide main characteristics of our solution (like a number of documents, information about actions per seconds, …) and also we need to provide sample documents that will be stored in our database. After doing that we will be able to read the estimated cost of our solution: […]