Is it possible to run currentOp() from a realm function?

Hi,
Running currentOp() is fine in the shell but I want my realm app to be able to access this information. Is it possible? If so, how? I have tried the obvious (below) but i’m getting “currentOp() is not a function”.

const collection = context.services.get(‘mongodb-atlas’).db(‘database’).collection(‘coll’);
const ops = await collection.currentOp();

Realm Functions are limited in their access to MongoDB Actions, that include collection.bulkWrite() that has apparently been skipped in that page (but is present in the list at the side). currentOp() is unfortunately not among those.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.