Trace requests

Sample request traces to monitor the traffic and health of your service mesh.

Distributed tracing helps you track requests across multiple services in your distributed service mesh. Sampling the requests in your mesh can give you insight into request latency, serialization, and parallelism. For more information, see the Istio tracing documentation.

To get started, enable the default Envoy distributed tracing in your Istio installation to trace requests across your service mesh, analyze service dependencies and find bottlenecks or high latency services in your mesh. Then, use a tracing provider, such as Zipkin or Jaeger, to collect and visualize the sampled spans. For a list of supported tracing providers, see the Envoy documentation.

  1. Install a tracing provider in your workload cluster. For example, you might follow the Istio documentation to install Zipkin.

  2. Enable tracing when you install or update Istio. The following example meshConfig options set a sampling rate of 10% of requests, add a custom host request header tag to the spans, and specify Zipkin as the default tracing provider. You can add these meshConfig settings to new or existing Istio installations in the following ways:

      enableTracing: true
          # Sampling rate in range of 0.0 to 100.0 with a precision of 0.01.
          # A value of 10 means that 10% of requests are sampled.
          # Default: 1
          sampling: 10
          # Add a tag to the trace span based on a literal, environment variable,
          # or client request header.
                name: host
          # Specify the address of a default tracer, such as Zipkin
             address: zipkin:9411
  3. Begin tracing the requests in your service mesh and view the sampled spans.

For more information about the sampling rate, custom tag, and maximum path length settings, see the Istio tracing configuration docs.

For more information about setting a tracer, see the Istio meshConfig.defaultConfig.tracing reference docs.