Elfocrash / Cosmonaut

🌐 A supercharged Azure CosmosDB .NET SDK with ORM support
https://cosmonaut.readthedocs.io
MIT License
342 stars 44 forks source link

How can I measure the request units on a request? #98

Closed crhistianramirez closed 4 years ago

crhistianramirez commented 4 years ago

I'd like to see what the linq generated sql call is costing me. In the cosmos sdk there is a RequestCharge property you can inspect. Does cosmonaut offer something similar?

If that's not an option is there a way to see the generated SQL so I can use the portal to determine the costs manually?

Elfocrash commented 4 years ago

When it comes to querying Cosmonaut is all about the entities, not the metadata. That part is abstracted out to the logging department. If you plug the CosmosEventStore to log it's telemetry in something like ApplicationInsights you will be able to get those numbers. They are however redacted from the ToListAsync() response.

More info on that can be found here: https://github.com/Elfocrash/Cosmonaut#logging

crhistianramirez commented 4 years ago

@Elfocrash Thank you for the speedy reply!