Distributed Tracing and Service Mesh
Building applications to support trace context propagation
Although Istio proxies can automatically send spans, extra information is needed to join those spans into a single trace. Applications must propagate this information in HTTP headers, so that when proxies send spans, the backend can join them together into a single trace.
To do this, each application must collect headers from each incoming request and forward the headers to all outgoing requests triggered by that incoming request. The choice of headers to forward depends on the configured trace backend. The following is a summary:
All applications should forward the following headers:
x-request-id: an Envoy-specific header that is used to consistently sample logs and traces.traceparentandtracestate: W3C standard headers
For other observability tools, refer to their documentation.