Skip to content

Commit edabe21

Browse files
authored
ref(node): Remove vercel flushing code that does nothing (#16217)
We could never get this to apply properly on vercel in production, so we're removing this for now and may revisit this later. Replaces #16178
1 parent 7bad3c0 commit edabe21

File tree

5 files changed

+0
-233
lines changed

5 files changed

+0
-233
lines changed

dev-packages/node-integration-tests/suites/vercel/instrument.mjs

Lines changed: 0 additions & 13 deletions
This file was deleted.

dev-packages/node-integration-tests/suites/vercel/scenario.mjs

Lines changed: 0 additions & 13 deletions
This file was deleted.

dev-packages/node-integration-tests/suites/vercel/test.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

packages/node/src/integrations/http/SentryHttpInstrumentationBeforeOtel.ts

Lines changed: 0 additions & 136 deletions
This file was deleted.

packages/node/src/integrations/http/index.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { addOriginToSpan } from '../../utils/addOriginToSpan';
1212
import { getRequestUrl } from '../../utils/getRequestUrl';
1313
import type { SentryHttpInstrumentationOptions } from './SentryHttpInstrumentation';
1414
import { SentryHttpInstrumentation } from './SentryHttpInstrumentation';
15-
import { SentryHttpInstrumentationBeforeOtel } from './SentryHttpInstrumentationBeforeOtel';
1615

1716
const INTEGRATION_NAME = 'Http';
1817

@@ -117,10 +116,6 @@ interface HttpOptions {
117116
};
118117
}
119118

120-
const instrumentSentryHttpBeforeOtel = generateInstrumentOnce(`${INTEGRATION_NAME}.sentry-before-otel`, () => {
121-
return new SentryHttpInstrumentationBeforeOtel();
122-
});
123-
124119
const instrumentSentryHttp = generateInstrumentOnce<SentryHttpInstrumentationOptions>(
125120
`${INTEGRATION_NAME}.sentry`,
126121
options => {
@@ -162,19 +157,6 @@ export const httpIntegration = defineIntegration((options: HttpOptions = {}) =>
162157
return {
163158
name: INTEGRATION_NAME,
164159
setupOnce() {
165-
// TODO: get rid of this too
166-
// Below, we instrument the Node.js HTTP API three times. 2 times Sentry-specific, 1 time OTEL specific.
167-
// Due to timing reasons, we sometimes need to apply Sentry instrumentation _before_ we apply the OTEL
168-
// instrumentation (e.g. to flush on serverless platforms), and sometimes we need to apply Sentry instrumentation
169-
// _after_ we apply OTEL instrumentation (e.g. for isolation scope handling and breadcrumbs).
170-
171-
// This is Sentry-specific instrumentation that is applied _before_ any OTEL instrumentation.
172-
if (process.env.VERCEL) {
173-
// Currently this instrumentation only does something when deployed on Vercel, so to save some overhead, we short circuit adding it here only for Vercel.
174-
// If it's functionality is extended in the future, feel free to remove the if statement and this comment.
175-
instrumentSentryHttpBeforeOtel();
176-
}
177-
178160
const instrumentSpans = _shouldInstrumentSpans(options, getClient<NodeClient>()?.getOptions());
179161

180162
// This is Sentry-specific instrumentation for request isolation and breadcrumbs

0 commit comments

Comments
 (0)