Overview

    Istio leverages Envoy’s distributed tracing feature to provide tracing integration out of the box. Specifically, Istio provides options to install various tracing backend and configure proxies to send trace spans to them automatically. See , Jaeger and task docs about how Istio works with those tracing systems.

    Although Istio proxies are able to automatically send spans, they need some hints to tie together the entire trace. Applications need to propagate the appropriate HTTP headers so that when the proxies send span information, the spans can be correlated correctly into a single trace.

    • x-b3-traceid
    • x-b3-spanid
    • x-b3-parentspanid
    • x-b3-flags

    Additionally, tracing integrations based on OpenCensus (e.g. Stackdriver) propagate the following headers:

    • x-cloud-trace-context
    • traceparent
    • grpc-trace-bin

    If you look at the sample Python productpage service, for example, you see that the application extracts the required headers from an HTTP request using libraries:

    Zip int productId,)

    1. @Path("/reviews/{productId}")
    2. public Response bookReviewsById(@PathParam("productId") int productId, @Context HttpHeaders requestHeaders) {
    3. // ...
    4. JsonObject ratingsResponse = getRatings(Integer.toString(productId), requestHeaders);

    When you make downstream calls in your applications, make sure to include these headers.