-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Sentry headers from browser fetch request change after being proxied through NextJS Server using middleware and rewrite. #15435
Comments
Few things I have already verified:
|
Hi @zeeshan-at-extra-year thanks for writing in and for the detailed report! I've forwarded this in the team to people better versed in NextJS than me. We'll get back to you. |
Hey @zeeshan-at-extra-year ! |
Yes that is correct. The headers from the browser fetch request never make it to the NestJS server.
I did try this out. I added a global middleware to log all request headers. The |
And your request flow is from Browser -> NextJS Backend -> NestJS Backend? Could you maybe provide a minimal repro for this? |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nextjs
SDK Version
9.1.0
Framework Version
Next 14.2.4
Link to Sentry event
https://extrayear.sentry.io/traces/trace/e496329273177d9dc22c4caba543e428/?node=txn-892cf59a8ba7458fa0128d556bcf6853&pageEnd&pageStart&project=4508092950183936&query=trace%3Ae496329273177d9dc22c4caba543e428&source=traces&statsPeriod=2h×tamp=1739840031.143
Reproduction Example/SDK Setup
sentry.client.config.ts
sentry.edge.config.ts
sentry.server.config.ts
Steps to Reproduce
Expected Result
Sentry trace propagation expectations
When a fetch request is made with proper sentry headers, the trace should continue on the nextjs server and on the backend. While the trace does continue on the nextjs server, the sentry headers get overwritten with some other trace before being sent to the external URL.
Actual Result
Fetch request in browser
The text was updated successfully, but these errors were encountered: