Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach a unique request ID in a header such as X-Request-Id and pass to subgraphs #722

Open
rickpasetto opened this issue Apr 10, 2024 · 1 comment
Labels
enhancement New feature or request internally-reviewed The issue has been reviewed internally.

Comments

@rickpasetto
Copy link
Contributor

Component(s)

No response

Is your feature request related to a problem? Please describe.

We have a need to be able to associate federated subgraph requests in a common place -- in shared logs, in particular. When subgraph services all log to a common place, it would be very helpful to associate them with a single client-server operation for debugging and other purposes.

Describe the solution you'd like

To achieve this, the proposal is to add a request ID that is unique per GraphQL operation on the supergraph, and passed along to each of the subgraphs in the form of an HTTP header such as X-Request-Id. (I'm not strongly opinionated about this specific header, so if you have a more standard name that'd be fine, as long as it is documented.). This request ID needs to be unique and maintained across the entire client -> server response. (It might be a good idea to pass this ID back in the response as well, although that's optional with respect to our specific need.)

Describe alternatives you've considered

It has been suggested that we use the Traceparent header which contains a trace ID and other information. I think that X-Request-Id is a simpler alternative.

Additional context

No response

@rickpasetto rickpasetto added the enhancement New feature or request label Apr 10, 2024
Copy link

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible.
The roadmap is driven by our customers and we have to prioritize issues that are important to them.
You can influence the priority by becoming a customer. Please contact us here.

@jensneuse jensneuse added the internally-reviewed The issue has been reviewed internally. label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internally-reviewed The issue has been reviewed internally.
Projects
None yet
Development

No branches or pull requests

2 participants