in src/plugins/MongoDBPlugin.ts [191:202]
const dbEvalFunc = function (this: any, operation: string, span: any, args: any[]): boolean {
// args = [code, parameters, options, callback]
span.tag(
Tag.dbStatement(
`${operation}(${stringify(args[0])}${
typeof args[1] !== 'function' && args[1] !== undefined ? ', ' + stringify(args[1]) : ''
})`,
),
);
return wrapCallbackWithCursorMaybe(span, args, 1);
};