Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-4299

comment of an operation should be sent in the change stream of that operation

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Change Streams
    • Not Needed

      How are you using Mongo? What version of the server and driver are you using?

      I'm currently using master branch at this commit in order to have available this feature.

      What is the feature/improvement you would like?

      If user executes an operation with a comment, that comment should be available in the change stream generated by that operation.

      For example:

      const ok = await collection.deleteOne({ name: 'foobar' }, {  comment: 'my comment' }) 

      the comment "my comment" should be available in the change stream.

      What use case would this feature/improvement enable?

      If you have a service performing delete operation when an API is called, you may want to use the change stream to made audit log. In order to audit who made that request you could use "comment" field to store the userId that performed the delete request.

            Assignee:
            durran.jordan@mongodb.com Durran Jordan
            Reporter:
            riccardo.dibenedetto@mia-platform.eu Riccardo Di Benedetto
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: