Skip to content

Commit ddcc4a1

Browse files
committed
fix logic
1 parent 42f7380 commit ddcc4a1

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • packages/node/src/integrations/http

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ export const httpIntegration = defineIntegration((options: HttpOptions = {}) =>
157157
// On Vercel, we want to patch the response to flush on Vercel Lambda freeze
158158
// This is usually done in the OTEL Http Instrumentation, but if that is not added,
159159
// we do it here instead
160-
patchResponseForServerless: !instrumentSpans && !!process.env.VERCEL && !options.disableIncomingRequestSpans,
160+
// We also patch here if incoming request spans are disabled, as that means the relevant code is not run in the OTEL instrumentation
161+
patchResponseForServerless: !!process.env.VERCEL && (!instrumentSpans || options.disableIncomingRequestSpans),
161162
});
162163

163164
// This is the "regular" OTEL instrumentation that emits spans

0 commit comments

Comments
 (0)