Skip to content

Conversation

chargome
Copy link
Member

@chargome chargome commented Sep 30, 2025

Replaces the way we attach headers to root spans so this also works for both turbopack and webpack.

The data flow is now as follows:

  1. Request comes in
  2. http integration attaches the full normalized request on sdkProcessingMetadata on the scope
  3. Nextjs creates the span
  4. node client hook attaches the headers on the root span if sendDefaultPii is set

All of this still does not work for edge atm

closes #17568
closes #17802
closes #17803

@chargome chargome self-assigned this Sep 30, 2025
@chargome chargome marked this pull request as ready for review September 30, 2025 19:24
@chargome chargome changed the title feat(nextjs): Attach headers using event processor feat(nextjs): Attach headers using client hook Sep 30, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

github-actions bot commented Oct 1, 2025

node-overhead report 🧳

Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.

Scenario Requests/s % of Baseline Prev. Requests/s Change %
GET Baseline 8,752 - 9,636 -9%
GET With Sentry 1,342 15% 1,444 -7%
GET With Sentry (error only) 6,207 71% 6,177 +0%
POST Baseline 1,200 - 1,179 +2%
POST With Sentry 520 43% 496 +5%
POST With Sentry (error only) 1,065 89% 1,022 +4%
MYSQL Baseline 3,331 - 3,310 +1%
MYSQL With Sentry 421 13% 375 +12%
MYSQL With Sentry (error only) 2,712 81% 2,658 +2%

View base workflow run

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@chargome chargome enabled auto-merge (squash) October 1, 2025 15:04
@chargome chargome merged commit 743c4eb into develop Oct 2, 2025
365 of 371 checks passed
@chargome chargome deleted the cg-next-http-request-on-event branch October 2, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nextjs-app-dir (canary) Test Failed nextjs-15 (canary) Test Failed Incoming HTTP request headers are not added as attributes in Turbopack
2 participants