You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Next.js: Reduce proxy segment noise from prefetch requests #27070
Every proxy run creates its own segment, usually 1 to 3 ms long. The App Router prefetches every visible link, and each prefetch passes through the proxy.
In a production app, a single pageload produced five proxy segments from prefetches. Over a week the proxy accounts for close to 100k segments.
To do
Measure how many proxy segments come from prefetch requests. They carry the next-router-prefetch or next-router-segment-prefetch header.
Decide whether to change the default, for example by not sampling prefetch proxy runs, or to document how users filter them with tracesSampler or ignoreSpans.
Revisit after the proxy and the render share a trace. On next start the proxy then becomes a child span and stops being a segment of its own.
Activity
linear-code commentedon Dec 2, 2026
JS-4211