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

Question: add an ability to attach req_id to a header of requests created by restify clients #1101

Closed
serv opened this issue May 21, 2016 · 5 comments
Labels

Comments

@serv
Copy link

serv commented May 21, 2016

I know this is a bit mouthful, but the title describes the feature request.
We know that all the incoming request to restify server has a req_id.
Restify server may make subsequent requests to other services using the restify client.
Can we add an ability to attach this req_id to subsequent requests' header created by restify clients?

This is useful when you want to debug some production issues with downstream services you have control over.
Say, one of your client says that there's been some problem with a request calling /xyz endpoint to your restify API. And you are asked to find out what's happening.
You can take the req_id created from the request calling /xyz and take it to your downstream services team and ask them to look up some logs with req_id as header value. And help yourself during the debugging process.

@DonutEspresso
Copy link
Member

Thanks for the suggestion - I think this feature request is captured in #1086. The idea being that restify will automatically use whatever request id header you've specified. Can you take a look and see if that's meets your needs?

@serv serv closed this as completed May 21, 2016
@serv serv reopened this May 21, 2016
@serv
Copy link
Author

serv commented May 21, 2016

@DonutEspresso I don't think that issue is exactly what I am looking for, although it's quite similar. I'll suggest this issue as a part of requirement we might want to consider for #1086

@DonutEspresso
Copy link
Member

If you're making requests to upstream services, that would be configured at the client level, rather than the server right? I don't think restify-clients currently supports headers on a per request basis if that's what you're looking for.

If I'm not misunderstanding, can you please open an issue for this over at the restify-clients repo? Thanks!

@mogsie
Copy link

mogsie commented May 22, 2016

I was under the (mistaken) impression that this (forwarding the req_id to "back-end" services) was more or less out-of-the-box behaviour of restify, but I see that it isn't. I guess how to do it should be documented and explained how to do. I think that would be enough. And I agree that it makes more sense in the restify-clients project.

@DonutEspresso
Copy link
Member

Definitely something we can add to the docs.

retrohacker pushed a commit that referenced this issue Apr 29, 2017
Closes:

#289
#381
#474
#575
#790
#633
#717
#576
#576
#909
#875
#860
#853
#850
#829
#813
#801
#921
#1101
#1019
#989
#632
#708
#737
#859
#1326
#1327
#927
#1099
#1068
#1040
#1035
#957
#948
#1134
#1136
#1183
#1206
#1286
#1323

> Note: this issue closes _but does not resolve_ the issues listed, we are just tracking them in another medium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants