-
Notifications
You must be signed in to change notification settings - Fork 74
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
Translate between x-cloud-trace-context and grpc-trace-bin for http/grpc transcoding #627
Comments
backend_protocol can be found by calling request_->GetBackendProtocol(); |
I created a partial workaround for this in my java/grpc downstream by doing the x-cloud-trace-context to grpc-trace-bin conversion in a custom ServerStreamTracer implementation. This allows me to link subsequent downstream spans with the trace created by ESP, but I am unable to intercept the call early enough to prevent opencensus from creating a second trace id for the sent/ received stats. Summary - it would be super if this translation happened in the ESP ! |
Instead of doing a translation that replaces the |
My understanding is: if backend is grpc, it should use grpc-trace-bin. If it is http, it will use X-Cloud-Trace-Context. It doesn't make sense to send both. |
I agree in the general. However, ESP currently has been sending |
@qiwzhang Any chance y'all have an ETA on this? I ran into a case where I will need to switch to using |
Would it work on a non-GKE Kubernetes cluster? If so, I'm game to give it a shot. We're not fully on GKE yet but making our way there. |
Yes, same as ESPv1, if not in GCP, we could not use its metadata server to get access token, you need to pass a service_account key file to ESP to generate access token to talk to Google services. |
For tracing: HTTP uses x-cloud-trace-context, but grpc uses grpc-trace-bin
In http/grpc transcoding, ESP should translate from x-cloud-trace-context to grpc-trace-bin in request, and from grpc-trace-bin to x-cloud-trace-context in response.
The text was updated successfully, but these errors were encountered: