[!NOTE]
The pull request "feat(remix): Server Timing Headers Trace Propagation PoC" was created by @onurtemizkan but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.
The pull request "feat(remix): Server Timing Headers Trace Propagation PoC" was created by @onurtemizkan but did not reference an issue. Therefore this issue was created for better visibility in external tools like Linear.
Adds automatic trace propagation from server to client via the Server-Timing HTTP header for Remix applications.
This provides an alternative to meta tag injection for linking server and client traces. The server automatically injects sentry-trace and baggage into the Server-Timing response header, and the client SDK reads it via the Performance API during pageload.
Server-side:
generateSentryServerTimingHeader() - generates the header value
addSentryServerTimingHeader(response) - adds header to a Response
- Automatic injection in document request handler
- Cloudflare apps require manual response wrapping in
entry.server.tsx using addSentryServerTimingHeader
Client-side:
- Reads
Server-Timing from navigation timing entries
- Falls back to meta tags if Server-Timing unavailable
- Async retry mechanism for slow header processing
Works on both Node.js and Cloudflare Workers environments.
Adds automatic trace propagation from server to client via the
Server-TimingHTTP header for Remix applications.This provides an alternative to meta tag injection for linking server and client traces. The server automatically injects
sentry-traceandbaggageinto theServer-Timingresponse header, and the client SDK reads it via the Performance API during pageload.Server-side:
generateSentryServerTimingHeader()- generates the header valueaddSentryServerTimingHeader(response)- adds header to a Responseentry.server.tsxusingaddSentryServerTimingHeaderClient-side:
Server-Timingfrom navigation timing entriesWorks on both Node.js and Cloudflare Workers environments.