File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ var validOptionNames = [
106106 'readPreferenceTags' ,
107107 'numberOfRetries' ,
108108 'auto_reconnect' ,
109- 'minSize'
109+ 'minSize' ,
110+ 'enableCommandMonitoring'
110111] ;
111112
112113var ignoreOptionNames = [ 'native_parser' ] ;
@@ -199,6 +200,7 @@ function validOptions(options) {
199200 * @param {array } [options.readPreferenceTags=null] Read preference tags
200201 * @param {number } [options.numberOfRetries=5] The number of retries for a tailable cursor
201202 * @param {boolean } [options.auto_reconnect=true] Enable auto reconnecting for single server instances
203+ * @param {boolean } [options.enableCommandMonitoring=false] Enable command monitoring for this client
202204 * @param {MongoClient~connectCallback } [callback] The command result callback
203205 * @return {MongoClient } a MongoClient instance
204206 */
Original file line number Diff line number Diff line change @@ -58,7 +58,8 @@ var legalOptionNames = [
5858 'promoteLongs' ,
5959 'promoteValues' ,
6060 'promoteBuffers' ,
61- 'promiseLibrary'
61+ 'promiseLibrary' ,
62+ 'enableCommandMonitoring'
6263] ;
6364
6465/**
@@ -149,7 +150,11 @@ class Mongos extends TopologyBase {
149150 cursorFactory : Cursor ,
150151 reconnect : reconnect ,
151152 emitError : typeof options . emitError === 'boolean' ? options . emitError : true ,
152- size : typeof options . poolSize === 'number' ? options . poolSize : 5
153+ size : typeof options . poolSize === 'number' ? options . poolSize : 5 ,
154+ enableCommandMonitoring :
155+ typeof options . enableCommandMonitoring === 'boolean'
156+ ? options . enableCommandMonitoring
157+ : false
153158 }
154159 ) ;
155160
Original file line number Diff line number Diff line change @@ -66,7 +66,8 @@ var legalOptionNames = [
6666 'promoteBuffers' ,
6767 'maxStalenessSeconds' ,
6868 'promiseLibrary' ,
69- 'minSize'
69+ 'minSize' ,
70+ 'enableCommandMonitoring'
7071] ;
7172
7273/**
@@ -156,7 +157,11 @@ class ReplSet extends TopologyBase {
156157 cursorFactory : Cursor ,
157158 reconnect : false ,
158159 emitError : typeof options . emitError === 'boolean' ? options . emitError : true ,
159- size : typeof options . poolSize === 'number' ? options . poolSize : 5
160+ size : typeof options . poolSize === 'number' ? options . poolSize : 5 ,
161+ enableCommandMonitoring :
162+ typeof options . enableCommandMonitoring === 'boolean'
163+ ? options . enableCommandMonitoring
164+ : false
160165 }
161166 ) ;
162167
Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ var legalOptionNames = [
6161 'promoteValues' ,
6262 'promoteBuffers' ,
6363 'compression' ,
64- 'promiseLibrary'
64+ 'promiseLibrary' ,
65+ 'enableCommandMonitoring'
6566] ;
6667
6768/**
@@ -149,7 +150,11 @@ class Server extends TopologyBase {
149150 cursorFactory : Cursor ,
150151 reconnect : reconnect ,
151152 emitError : typeof options . emitError === 'boolean' ? options . emitError : true ,
152- size : typeof options . poolSize === 'number' ? options . poolSize : 5
153+ size : typeof options . poolSize === 'number' ? options . poolSize : 5 ,
154+ enableCommandMonitoring :
155+ typeof options . enableCommandMonitoring === 'boolean'
156+ ? options . enableCommandMonitoring
157+ : false
153158 }
154159 ) ;
155160
You can’t perform that action at this time.
0 commit comments