Skip to content

feat(remix): Server Timing Headers Trace Propagation PoC #18696

@github-actions

Description

@github-actions

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.

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions