@@ -5,13 +5,13 @@ var stream = require('stream');
55var getNamespace = require ( 'continuation-local-storage' ) . getNamespace ;
66var Shimmer = require ( './shimmer' ) ;
77
8- function instrument ( collector ) {
8+ function instrument ( collector , config ) {
99 Shimmer . wrap ( http . Server . prototype , 'http.Server.prototype' , [ 'on' , 'addListener' ] ,
1010 function ( addListener ) {
1111 return function ( type , listener ) {
1212 if ( type === 'request' && typeof listener === 'function' ) {
1313 return addListener . call ( this , type ,
14- require ( './http.Server.prototype.js' ) ( listener , collector ) ) ;
14+ require ( './http.Server.prototype.js' ) ( listener , collector , config ) ) ;
1515 } else {
1616 return addListener . apply ( this , arguments ) ;
1717 }
@@ -23,23 +23,23 @@ function instrument (collector) {
2323 return function ( type , listener ) {
2424 if ( type === 'request' && typeof listener === 'function' ) {
2525 return addListener . call ( this , type ,
26- require ( './http.Server.prototype.js' ) ( listener , collector ) ) ;
26+ require ( './http.Server.prototype.js' ) ( listener , collector , config ) ) ;
2727 } else {
2828 return addListener . apply ( this , arguments ) ;
2929 }
3030 } ;
3131 } ) ;
3232
3333 Shimmer . wrap ( http , 'http' , 'request' , function ( original ) {
34- return require ( './http.request' ) ( original , collector ) ;
34+ return require ( './http.request' ) ( original , collector , config ) ;
3535 } ) ;
3636
3737 Shimmer . wrap ( https , 'https' , 'request' , function ( original ) {
38- return require ( './http.request' ) ( original , collector ) ;
38+ return require ( './http.request' ) ( original , collector , config ) ;
3939 } ) ;
4040
4141 Shimmer . wrap ( process , 'process' , '_fatalException' , function ( original ) {
42- return require ( './process._fatalException' ) ( original , collector ) ;
42+ return require ( './process._fatalException' ) ( original , collector , config ) ;
4343 } ) ;
4444
4545 getNamespace ( 'trace' ) . bindEmitter ( stream . prototype ) ;
0 commit comments