From https://github.com/mongodb/mongoid/discussions/6055, it would be useful to be able to print caller details to the mongod logs to facilitate diagnostics and troubleshooting.
Ideally this could be toggled on/off using actions such as:
class ApplicationController around_action do Mongoid.default_comment = request.path yield Mongoid.default_comment = nil end end # or Mongoid.with_default_comment { ... }