File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
plugins/node/opentelemetry-instrumentation-fastify/src Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -198,13 +198,13 @@ export class FastifyInstrumentation extends InstrumentationBase {
198
198
}
199
199
200
200
private _patchConstructor (
201
- original : ( ) => FastifyInstance
202
- ) : ( ) => FastifyInstance {
201
+ moduleExports : { fastify : ( ) => FastifyInstance } ,
202
+ ) : ( ) => FastifyInstance {
203
203
const instrumentation = this ;
204
204
this . _diag . debug ( 'Patching fastify constructor function' ) ;
205
205
206
206
function fastify ( this : FastifyInstance , ...args : any ) {
207
- const app : FastifyInstance = original . apply ( this , args ) ;
207
+ const app : FastifyInstance = moduleExports . fastify . apply ( this , args ) ;
208
208
app . addHook ( 'onRequest' , instrumentation . _hookOnRequest ( ) ) ;
209
209
app . addHook ( 'preHandler' , instrumentation . _hookPreHandler ( ) ) ;
210
210
You can’t perform that action at this time.
0 commit comments