@@ -32,24 +32,22 @@ export class HonoInstrumentation extends InstrumentationBase {
3232 // eslint-disable-next-line @typescript-eslint/no-this-alias
3333 const instrumentation = this ;
3434
35- // eslint-disable-next-line @typescript-eslint/no-explicit-any
36- function Hono ( this : HonoInstance , ...args : any ) : HonoInstance {
37- const app : HonoInstance = moduleExports . Hono . apply ( this , args ) ;
38-
39- instrumentation . _wrap ( app , 'get' , instrumentation . _patchHandler ( ) ) ;
40- instrumentation . _wrap ( app , 'post' , instrumentation . _patchHandler ( ) ) ;
41- instrumentation . _wrap ( app , 'put' , instrumentation . _patchHandler ( ) ) ;
42- instrumentation . _wrap ( app , 'delete' , instrumentation . _patchHandler ( ) ) ;
43- instrumentation . _wrap ( app , 'options' , instrumentation . _patchHandler ( ) ) ;
44- instrumentation . _wrap ( app , 'patch' , instrumentation . _patchHandler ( ) ) ;
45- instrumentation . _wrap ( app , 'all' , instrumentation . _patchHandler ( ) ) ;
46- instrumentation . _wrap ( app , 'on' , instrumentation . _patchOnHandler ( ) ) ;
47- instrumentation . _wrap ( app , 'use' , instrumentation . _patchMiddlewareHandler ( ) ) ;
48-
49- return app ;
50- }
35+ moduleExports . Hono = class HonoWrapper extends moduleExports . Hono {
36+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
37+ public constructor ( ...args : any [ ] ) {
38+ super ( ...args ) ;
5139
52- moduleExports . Hono = Hono ;
40+ instrumentation . _wrap ( this , 'get' , instrumentation . _patchHandler ( ) ) ;
41+ instrumentation . _wrap ( this , 'post' , instrumentation . _patchHandler ( ) ) ;
42+ instrumentation . _wrap ( this , 'put' , instrumentation . _patchHandler ( ) ) ;
43+ instrumentation . _wrap ( this , 'delete' , instrumentation . _patchHandler ( ) ) ;
44+ instrumentation . _wrap ( this , 'options' , instrumentation . _patchHandler ( ) ) ;
45+ instrumentation . _wrap ( this , 'patch' , instrumentation . _patchHandler ( ) ) ;
46+ instrumentation . _wrap ( this , 'all' , instrumentation . _patchHandler ( ) ) ;
47+ instrumentation . _wrap ( this , 'on' , instrumentation . _patchOnHandler ( ) ) ;
48+ instrumentation . _wrap ( this , 'use' , instrumentation . _patchMiddlewareHandler ( ) ) ;
49+ }
50+ } ;
5351 return moduleExports ;
5452 }
5553
0 commit comments