Skip to main content
logoTetrate Istio SubscriptionVersion: Next

TIS0902 - Using Tracing Configuration in MeshConfig Is Not Recommended

Configuring tracing directly in MeshConfig is discouraged in recent versions of Istio. Instead, Istio’s Telemetry API is the recommended way to manage tracing configurations and providers, offering more flexibility and maintainability.

Recommendation: Use the Telemetry API for Tracing

By using the Telemetry API to configure tracing, you can take advantage of fine-grained controls, future Istio enhancements, and best-practice approaches to observability.

Example

  1. ConfigMap Including Tracing in MeshConfig

    apiVersion: v1
    kind: ConfigMap
    metadata:
    name: istio
    namespace: istio-system
    data:
    mesh: |-
    defaultConfig:
    discoveryAddress: istiod.istio-system.svc:15012
    tracing:
    sampling: 10
    zipkin:
    address: zipkin.istio-system:9411
    defaultProviders:
    metrics:
    - prometheus
    enablePrometheusMerge: true
    rootNamespace: istio-system
    trustDomain: cluster.local
    meshNetworks: 'networks: {}'

    Explanation: This configuration uses tracing under mesh.defaultConfig, which is an older pattern. While it may continue to function, it’s no longer recommended. Future Istio releases may deprecate this approach in favor of the Telemetry API, leading to potential issues or missing functionality if you rely solely on MeshConfig tracing settings.

Recommendation

  1. Migrate Tracing Configuration to the Telemetry API

    Instead of embedding tracing settings in MeshConfig, define them via the Telemetry custom resource:

    apiVersion: telemetry.istio.io/v1alpha1
    kind: Telemetry
    metadata:
    name: default
    namespace: istio-system
    spec:
    tracing:
    sampling: 10
    providers:
    - name: zipkin
    zipkin:
    address: zipkin.istio-system:9411

    This approach allows you to tailor tracing at different scopes (namespace, workloads, etc.) and stay aligned with current and future Istio best practices.

  2. Gradually Phase Out Deprecated MeshConfig Fields

    If you’re currently using MeshConfig for tracing, begin removing or disabling these fields once your Telemetry resource is in place. This helps ensure compatibility with new Istio versions and reduces the risk of configuration conflicts.