Is it possible to send x-request-id back when using istio with zipkin for distributed tracing?

12/5/2017

Following the link Istio/Distributed tracing, I can get the tracing working with zipkin.

Currently in order for the client/caller to know about the x-request-id (in case no id is sent, zipkin creates one), he needs to send it as a part of the request.

This gives him the ability of trace the request. All works well.

However, I am thinking maybe it is not a good idea for the client to send the x-request-id to avoid issues of constraints/duplication.

It would be good if it is possible that at the istio level, one should be able to modify the response headers and send the x-request-id back.

I am not finding such capabilities for istio at present. If there is a way to achieve this, please let me know.

-- Gaurav Abbi
istio
kubernetes
zipkin

1 Answer

12/6/2017

I'm not sure I fully understand your question but I can elaborate a bit on how istio works with respect to tracing:

Tracing means identifying every span or node that is part of the original request, so typically an Id is generated by the istio-ingress and your application should propagate it so each istio-proxy can capture and forward that information to istio-mixer which then lets you use Zipkin or Jaeger to visualize it.

Istio can't know when you make outcalls from your application for which original request it was for unless you do copy the headers.

Does that help/makes sense ?

-- Laurent Demailly
Source: StackOverflow