Overview
Istio leverages Envoy’s distributed tracing featureto provide tracing integration out of the box. Specifically, Istio provides options to install various tracing backendand 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.
To do this, an application needs to collect and propagate the following headers from the incoming request to any outgoing requests:
x-b3-traceid
x-b3-parentspanid
x-b3-sampled
x-ot-span-context
Additionally, tracing integrations based on OpenCensus (e.g. Stackdriver) propagate the following headers:
x-cloud-trace-context
grpc-trace-bin
If you look at the sample Python service, for example,you see that the application extracts the required headers from an HTTP requestusing libraries:
The reviews application (Java) does something similar:
Istio captures a trace for all requests by default when installing with the demo profile.For example, when using the Bookinfo sample application above, every time you access/productpage
you see a corresponding trace in thedashboard. This sampling rate is suitable for a test or low trafficmesh. For a high traffic mesh you can lower the trace samplingpercentage in one of two ways:
- During the mesh setup, use the option
values.pilot.traceSampling
toset the percentage of trace sampling. See theInstalling with istioctl documentation fordetails on setting options. In a running mesh, edit the
istio-pilot
deployment andchange the environment variable with the following steps:- To open your text editor with the deployment configuration fileloaded, run the following command:
- Find the
PILOT_TRACE_SAMPLING
environment variable, and changethe to your desired percentage.
In both cases, valid values are from 0.0 to 100.0 with a precision of 0.01.
Learn how to configure the proxies to send tracing requests to Jaeger.
This task shows you how to configure external access to the set of Istio telemetry addons.
Learn how to configure the proxies to send tracing requests to Zipkin.
Improving availability and reducing latency.
Provides an overview of Mixer's plug-in architecture.