@@ -32,24 +32,21 @@ export class HonoInstrumentation extends InstrumentationBase {
32
32
// eslint-disable-next-line @typescript-eslint/no-this-alias
33
33
const instrumentation = this ;
34
34
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 ) ;
35
+ moduleExports . Hono = class HonoWrapper extends moduleExports . Hono {
36
+ public constructor ( ) {
37
+ super ( ) ;
38
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
- }
51
-
52
- moduleExports . Hono = Hono ;
39
+ instrumentation . _wrap ( this , 'get' , instrumentation . _patchHandler ( ) ) ;
40
+ instrumentation . _wrap ( this , 'post' , instrumentation . _patchHandler ( ) ) ;
41
+ instrumentation . _wrap ( this , 'put' , instrumentation . _patchHandler ( ) ) ;
42
+ instrumentation . _wrap ( this , 'delete' , instrumentation . _patchHandler ( ) ) ;
43
+ instrumentation . _wrap ( this , 'options' , instrumentation . _patchHandler ( ) ) ;
44
+ instrumentation . _wrap ( this , 'patch' , instrumentation . _patchHandler ( ) ) ;
45
+ instrumentation . _wrap ( this , 'all' , instrumentation . _patchHandler ( ) ) ;
46
+ instrumentation . _wrap ( this , 'on' , instrumentation . _patchOnHandler ( ) ) ;
47
+ instrumentation . _wrap ( this , 'use' , instrumentation . _patchMiddlewareHandler ( ) ) ;
48
+ }
49
+ } ;
53
50
return moduleExports ;
54
51
}
55
52
0 commit comments