-
Notifications
You must be signed in to change notification settings - Fork 63
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
Problem propagating trace id to grpc service #224
Comments
Hey @RobWalker, thanks for raising this issue!
Just to confirm, does your flow look like this? User -> aspnet Core App Front-end HTTP Server (Instrumented with X-Ray) -> Application Load Balancer -> gRPC server (Instrumented with X-Ray) And you want there to be 1 single trace throughout, correct?
Can you explain in more detail how you are doing this? As long as you have your gRPC server instrumented with X-Ray .NET SDK, you shouldn't have to do anything special!
I believe this is the source of the issue. The
Maybe you can share how you are instrumenting the aspnet front-end app? As long as you are instrumenting the HTTP client that makes the request to the second gRPC server, the X-Ray instrumentation should know that we are leaving the context of the current app and add this
Correct. According to the ELB - ALB docs on request tracing, ALB will always add a trace ID if the However, if we want the traces to be linked we are more interested in the Please let me know if you have any questions! 🙂 |
I have an aspnet core app with a front end HTTP server and a second gRPC server with an AWS ALB between them.
I have XRay tracing working on both servers, but can not get the calls to the gRPC server to be linked to the originating call on the frontend server.
When making the gRPC call I am grabbing the current trace id and adding it to a
X-Amzn-Trace-Id
header. This is set as something like:I have custom middleware in the gRPC server which is checking to see if this header is present, which it is, though as:
So I suspect the ALB is modifying it?
However, within my custom middleware there is already an XRay recorder instance set up, and it has an unrelated trace id which results in two traces in the console.
I am calling:
app.UseXRay("v4-rpc");
as part of the gRPC server startupWhat is the recommended way of propagating the trace id over to the gRPC server?
The text was updated successfully, but these errors were encountered: