Skip to content

Commit 5d76ba5

Browse files
authored
feat(node): Add Modules integration to default integrations (#5706)
Start adding module information to NodeJS events. This is important so we can start understanding what kind of packages people use, and better inform strategies around future integration development + opentelemetry.
1 parent cf2f205 commit 5d76ba5

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

packages/node/src/integrations/modules.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ export class Modules implements Integration {
8787
}
8888
return {
8989
...event,
90-
modules: this._getModules(),
90+
modules: {
91+
...event.modules,
92+
...this._getModules(),
93+
},
9194
};
9295
});
9396
}

packages/node/src/sdk.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
ContextLines,
2525
Http,
2626
LinkedErrors,
27+
Modules,
2728
OnUncaughtException,
2829
OnUnhandledRejection,
2930
} from './integrations';
@@ -35,16 +36,18 @@ export const defaultIntegrations = [
3536
// Common
3637
new CoreIntegrations.InboundFilters(),
3738
new CoreIntegrations.FunctionToString(),
38-
new ContextLines(),
3939
// Native Wrappers
4040
new Console(),
4141
new Http(),
4242
// Global Handlers
4343
new OnUncaughtException(),
4444
new OnUnhandledRejection(),
45+
// Event Info
46+
new ContextLines(),
47+
new Context(),
48+
new Modules(),
4549
// Misc
4650
new LinkedErrors(),
47-
new Context(),
4851
];
4952

5053
/**

0 commit comments

Comments
 (0)