in src/plugins/MongoDBPlugin.ts [130:145]
const collFindAndModifyFunc = function (this: any, operation: string, span: any, args: any[]): boolean {
// args = [query, sort, doc, options, callback]
let params = stringify(args[0]);
if (typeof args[1] !== 'function' && args[1] !== undefined) {
params += ', ' + stringify(args[1]);
if (typeof args[2] !== 'function' && args[2] !== undefined) {
if (agentConfig.mongoTraceParameters) span.tag(Tag.dbMongoParameters(stringify(args[2])));
}
}
span.tag(Tag.dbStatement(`${this.s.namespace.collection}.${operation}(${params})`));
return wrapCallbackWithCursorMaybe(span, args, 1);
};