Skip to content

Conversation

@Verolop
Copy link

@Verolop Verolop commented Oct 18, 2025

Description

this pr updates responsemeta.RequestID to use the same standard header name, eliminating the asymmetry between request and response metadata keys.

This removes the need for custom header translation in HTTP gateways (like SpiceDB's).

References

Closes #361

@Verolop Verolop requested a review from a team as a code owner October 18, 2025 04:10
@Verolop Verolop changed the title feat: align response RequestID to standard x-request-id header fix: align response RequestID to standard x-request-id header Oct 18, 2025
Completes alignment started in commit 34b8159. Response metadata now uses
x-request-id for consistency with request-side header.

Breaking change: code hardcoding "io.spicedb.respmeta.requestid"
must use responsemeta.RequestID constant or update to "x-request-id".
…ility

this adds x-request-id support in both headers and trailers:

- RequestIDHeader: new header constant for HTTP/1.1 clients that can't
  easily read trailers through the gateway

- RequestID: stays as a trailer to maintain gRPC retry policy
  compatibility (see cefe49ab for why trailers matter)

- RequestIDLegacy: keeps the old io.spicedb.respmeta.requestid key
  around so existing clients don't break during transition
@Verolop Verolop requested review from a team and removed request for a team October 21, 2025 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

x-request-id header not echoed in HTTP Gateway responses

2 participants