-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Propagate request ID through gRPC context #7356
Conversation
The request ID only gets propagated through HTTP calls and is not available in gRPC servers. This commit adds intereceptors to grpc servers and clients to make sure request ID propagation happens. Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Does it mean store gateway can log the request ID if it is set on the gRPC client side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
I need to double check how we can get this to the logger now. I think we use message tags right now (which works only locally), but we will have the request ID in the context and we can get it from there. |
Yeah I think the logger needs to be changed. Now the logger is the one in the bucket store instance and it doesn't take context into account so request ID cannot be propagated. It would be nice to make the logger customizable using context so that Cortex can be benefited as well. As Cortex uses a different request ID format from Thanos so we need it to be a hook |
Let's merge this and we can go ahead and implement the logger hook |
* Propagate request ID through gRPC context The request ID only gets propagated through HTTP calls and is not available in gRPC servers. This commit adds intereceptors to grpc servers and clients to make sure request ID propagation happens. Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com> * Add license Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com> --------- Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
* Propagate request ID through gRPC context The request ID only gets propagated through HTTP calls and is not available in gRPC servers. This commit adds intereceptors to grpc servers and clients to make sure request ID propagation happens. Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com> * Add license Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com> --------- Signed-off-by: Filip Petkovski <filip.petkovsky@gmail.com>
The request ID only gets propagated through HTTP calls and is not available in gRPC servers.
This commit adds intereceptors to grpc servers and clients to make sure request ID propagation happens.
Changes
Verification