const collFindAndRemoveFunc = function()

in src/plugins/MongoDBPlugin.ts [117:128]


    const collFindAndRemoveFunc = function (this: any, operation: string, span: any, args: any[]): boolean {
      // args = [query, sort, options, callback]
      span.tag(
        Tag.dbStatement(
          `${this.s.namespace.collection}.${operation}(${stringify(args[0])}${
            typeof args[1] !== 'function' && args[1] !== undefined ? ', ' + stringify(args[1]) : ''
          })`,
        ),
      );

      return wrapCallbackWithCursorMaybe(span, args, 1);
    };