I am trying to get information about consumption of RU/second on the collection level, unfortunately when I query for collection information with node.js documentdb module, with code like
var client = new DocumentDBClient(host, { masterKey: masterKey });
client.readCollection(collection._self, function(err, item) {
if (err) {
console.log(err);
} else {
console.log(item);
}
});
I get only basic information like below
{ id: 'myCollection',
indexingPolicy:
{ indexingMode: 'consistent',
automatic: true,
includedPaths: [ [Object] ],
excludedPaths: [] },
_rid: 'ku8SANRCfwA=',
_ts: 1505295711,
_self: 'dbs/ku8SAA==/colls/ku8SANRCfwA=/',
_etag: '"00008b00-0000-0000-0000-59b8fd5f0000"',
_docs: 'docs/',
_sprocs: 'sprocs/',
_triggers: 'triggers/',
_udfs: 'udfs/',
_conflicts: 'conflicts/' }
Is there any other way to get RU consumption information per collection? This data is available in the portal in Metrics -> Throughput blade, but how to get it through API is a mystery to me. Azure Monitor provides only a metric averaged on the whole database level, so using Azure Monitor API also isn't a way to go.