Skip to content

Commit 4f394c4

Browse files
committed
Return module
1 parent 5aade8a commit 4f394c4

File tree

1 file changed

+7
-3
lines changed
  • packages/node/src/integrations/tracing

1 file changed

+7
-3
lines changed

packages/node/src/integrations/tracing/nest.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,16 +68,18 @@ export class SentryNestInstrumentation extends InstrumentationBase {
6868
/**
6969
*
7070
*/
71-
public init(): void {
71+
public init(): any {
7272
logger.log('init!');
73-
const module = new InstrumentationNodeModuleDefinition(
73+
const nodeModuleDefinition = new InstrumentationNodeModuleDefinition(
7474
SentryNestInstrumentation.COMPONENT,
7575
supportedVersions
7676
)
7777

78-
module.files.push(
78+
nodeModuleDefinition.files.push(
7979
this._getInjectableFileInstrumentation(supportedVersions)
8080
)
81+
82+
return nodeModuleDefinition;
8183
}
8284

8385
/**
@@ -89,6 +91,7 @@ export class SentryNestInstrumentation extends InstrumentationBase {
8991
'@nestjs/common/decorators/core/injectable.decorator.js',
9092
versions,
9193
(moduleExports: any) => {
94+
console.log(moduleExports);
9295
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
9396
if (isWrapped(moduleExports.Injectable)) {
9497
this._unwrap(moduleExports, 'Injectable');
@@ -130,6 +133,7 @@ const instrumentNestCore = generateInstrumentOnce('Nest-Core', () => {
130133

131134
const instrumentMiddleware = generateInstrumentOnce('Nest-Middleware', () => {
132135
logger.log('init nest middleware instrumentation');
136+
console.log('init nest middleware instrumentation');
133137
return new SentryNestInstrumentation();
134138
});
135139

0 commit comments

Comments
 (0)