Configurability (Beta/Development)

    All tracing options are configured by using during Istio installation. To simplify configuration, create a single YAML file to pass to istioctl.

    Then, you can append any configuration options to the tracing.yaml file.

    Istio captures a trace for all requests by default when installing with the demo profile. For example, when using the Bookinfo sample application, every time you access /productpage you see a corresponding trace in the dashboard. This sampling rate is suitable for a test or low traffic mesh. For a high traffic mesh you can lower the trace sampling percentage in one of two ways:

    Previously, the recommended method was to change the values.pilot.traceSampling setting during the mesh setup or to change the PILOT_TRACE_SAMPLE environment variable in the pilot or istiod deployment. While this method to alter sampling continues to work, the following method is strongly recommended instead.

    In the event that both are specified, the value specified in the MeshConfig will override any other setting.

    To modify the default random sampling, which is defaulted to a value of 100 in the demo profile and 1 for the default profile, add the following to your tracing.yaml file.

    1. apiVersion: install.istio.io/v1alpha1
    2. kind: IstioOperator
    3. spec:
    4. meshConfig:
    5. tracing:
    6. sampling: <VALUE>

    Where the <VALUE> should be in the range of 0.0 to 100.0 with a precision of 0.01. For example, to trace 5 requests out of every 10000, use 0.05 as the value here.

    The ability to add custom tracing tags to spans has also been implemented.

    Tags can be added to spans based on literals, environmental variables and client request headers.

    To add custom tags to your spans, add the following to your tracing.yaml file.

    Literals:

    Environmental variables:

    1. apiVersion: install.istio.io/v1alpha1
    2. kind: IstioOperator
    3. spec:
    4. meshConfig:
    5. defaultConfig:
    6. tracing:
    7. custom_tags:
    8. environment:
    9. name: <ENV_VARIABLE_NAME>
    10. defaultValue: <VALUE> # optional

    In order to add custom tags based on environmental variables, you must modify the istio-sidecar-injector ConfigMap in your root Istio system namespace.

    Client request headers:

    By default, the maximum length for the request path included as part of the HttpUrl span tag is 256.

    To modify this maximum length, add the following to your tracing.yaml file.

    1. apiVersion: install.istio.io/v1alpha1
    2. kind: IstioOperator
    3. spec:
    4. meshConfig:
    5. defaultConfig:

    Learn how to configure the proxies to send tracing requests to Jaeger.

    How to configure the proxies to send tracing requests to Lightstep.

    Overview

    Overview of distributed tracing in Istio.

    This task shows you how to configure external access to the set of Istio telemetry addons.

    Zipkin

    Learn how to configure the proxies to send tracing requests to Zipkin.

    Improving availability and reducing latency.