Next.js Discord

Discord Forum

Vercel deployments suppressing Server-Timing response http header?

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
I'm setting up Grafana Faro for frontend observability. As part of that, their docs say to set a server timing header in middleware/proxy with OTel trace ids to correlate the browser spans with server-side https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/get-started/instrument-nextjs/#connect-frontend-rum-and-backend-apm-insights

I've done this, and locally that server-timing header appears in the response headers. But, once I've deployed to Vercel, that header is no longer there (other appended headers from middleware do appear, so the middleware is running)

Is Vercel deliberately supressing this? And if so why? The only reference I can find is a super old github discussion that seemed to go nowhere, but there wasn't much of an answer in there https://github.com/vercel/next.js/discussions/62353#discussioncomment-9855537

1 Reply

This seems to be Vercel blocking the header from being sent based on the GitHub discussion, ig Vercel employees are active on vercel community and might be able to help