@@ -140,22 +140,38 @@ export class GrpcInstrumentation extends InstrumentationBase<GrpcInstrumentation
140140 this . _wrap (
141141 moduleExports . Client . prototype ,
142142 'makeUnaryRequest' ,
143- this . _patchClientRequestMethod ( moduleExports , false )
143+ this . _patchClientRequestMethod (
144+ moduleExports ,
145+ false ,
146+ 'makeUnaryRequest'
147+ )
144148 ) ;
145149 this . _wrap (
146150 moduleExports . Client . prototype ,
147151 'makeClientStreamRequest' ,
148- this . _patchClientRequestMethod ( moduleExports , false )
152+ this . _patchClientRequestMethod (
153+ moduleExports ,
154+ false ,
155+ 'makeClientStreamRequest'
156+ )
149157 ) ;
150158 this . _wrap (
151159 moduleExports . Client . prototype ,
152160 'makeServerStreamRequest' ,
153- this . _patchClientRequestMethod ( moduleExports , true )
161+ this . _patchClientRequestMethod (
162+ moduleExports ,
163+ true ,
164+ 'makeServerStreamRequest'
165+ )
154166 ) ;
155167 this . _wrap (
156168 moduleExports . Client . prototype ,
157169 'makeBidiStreamRequest' ,
158- this . _patchClientRequestMethod ( moduleExports , true )
170+ this . _patchClientRequestMethod (
171+ moduleExports ,
172+ true ,
173+ 'makeBidiStreamRequest'
174+ )
159175 ) ;
160176 return moduleExports ;
161177 } ,
@@ -304,15 +320,14 @@ export class GrpcInstrumentation extends InstrumentationBase<GrpcInstrumentation
304320 */
305321 private _patchClientRequestMethod < ReturnType extends EventEmitter > (
306322 grpcLib : typeof grpcJs ,
307- hasResponseStream : boolean
323+ hasResponseStream : boolean ,
324+ name : string
308325 ) : (
309326 original : ClientRequestFunction < ReturnType >
310327 ) => ClientRequestFunction < ReturnType > {
311328 const instrumentation = this ;
312329 return ( original : ClientRequestFunction < ReturnType > ) => {
313- instrumentation . _diag . debug (
314- 'patched makeClientStreamRequest on grpc client'
315- ) ;
330+ instrumentation . _diag . debug ( `patched ${ name } on grpc client` ) ;
316331
317332 return function makeClientStreamRequest ( this : grpcJs . Client ) {
318333 // method must always be at first position
0 commit comments