Skip to content

Commit

Permalink
feat(node): Add Modules integration to default integrations (#5706)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AbhiPrasad committed Sep 7, 2022
1 parent cf2f205 commit 5d76ba5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/node/src/integrations/modules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ export class Modules implements Integration {
}
return {
...event,
modules: this._getModules(),
modules: {
...event.modules,
...this._getModules(),
},
};
});
}
Expand Down
7 changes: 5 additions & 2 deletions packages/node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
ContextLines,
Http,
LinkedErrors,
Modules,
OnUncaughtException,
OnUnhandledRejection,
} from './integrations';
Expand All @@ -35,16 +36,18 @@ export const defaultIntegrations = [
// Common
new CoreIntegrations.InboundFilters(),
new CoreIntegrations.FunctionToString(),
new ContextLines(),
// Native Wrappers
new Console(),
new Http(),
// Global Handlers
new OnUncaughtException(),
new OnUnhandledRejection(),
// Event Info
new ContextLines(),
new Context(),
new Modules(),
// Misc
new LinkedErrors(),
new Context(),
];

/**
Expand Down

0 comments on commit 5d76ba5

Please sign in to comment.