Skip to content

ref(node): Make RequestData integration default #5980

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions packages/nextjs/src/index.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ function addServerIntegrations(options: NextjsOptions): void {
});
integrations = addOrUpdateIntegration(defaultRewriteFramesIntegration, integrations);

const defaultRequestDataIntegration = new Integrations.RequestData();
integrations = addOrUpdateIntegration(defaultRequestDataIntegration, integrations);

if (hasTracingEnabled(options)) {
const defaultHttpTracingIntegration = new Integrations.Http({ tracing: true });
integrations = addOrUpdateIntegration(defaultHttpTracingIntegration, integrations, {
Expand Down
2 changes: 0 additions & 2 deletions packages/nextjs/test/index.server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,8 @@ describe('Server init()', () => {

const nodeInitOptions = nodeInit.mock.calls[0][0] as ModifiedInitOptions;
const rewriteFramesIntegration = findIntegrationByName(nodeInitOptions.integrations, 'RewriteFrames');
const requestDataIntegration = findIntegrationByName(nodeInitOptions.integrations, 'RequestData');

expect(rewriteFramesIntegration).toBeDefined();
expect(requestDataIntegration).toBeDefined();
});

it('supports passing unrelated integrations through options', () => {
Expand Down
2 changes: 2 additions & 0 deletions packages/node/src/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
Modules,
OnUncaughtException,
OnUnhandledRejection,
RequestData,
} from './integrations';
import { getModule } from './module';
import { makeNodeTransport } from './transports';
Expand All @@ -46,6 +47,7 @@ export const defaultIntegrations = [
new ContextLines(),
new Context(),
new Modules(),
new RequestData(),
// Misc
new LinkedErrors(),
];
Expand Down