Istio Jaegar UI does not display services?

1/17/2019

I did

helm install ibm-charts/ibm-istio --name=istio --namespace istio-system --set grafana.enabled=true,kiali.enabled=true,tracing.enabled=true

I have a bunch of services e.g. kubectl get svc and was expecting to see some information about them in Jaegar dropdown, but I only see Istio-related ones. My services properly show up in tools like Grafana, etc.

Is there something extra I need to configure to see information about them in Jaegar?

enter image description here

-- atkayla
istio
kubernetes

2 Answers

1/18/2019

Below is an python snippet that can help you with traces. As @rinormaloku said you need to forward above headers to get span.

import sys

from flask import Flask, abort, request
import requests

app = Flask(__name__)


def getForwardHeaders(request):
    headers = {}

    incoming_headers = [ 'x-request-id',
                         'x-b3-traceid',
                         'x-b3-spanid',
                         'x-b3-parentspanid',
                         'x-b3-sampled',
                         'x-b3-flags',
                         'x-ot-span-context'
    ]

    for ihdr in incoming_headers:
        val = request.headers.get(ihdr)
        if val is not None:
            headers[ihdr] = val
            print("incoming: "+ihdr+":"+val, file=sys.stderr)
    return headers


@app.route("/")
def f1():
    tracking_headers = getForwardHeaders(request)
    return requests.get('http://paytm-svc', headers=tracking_headers).content

Above snippet is working on istio in kubernetes.

If you are still getting any other errors, let me know.

-- murarisumit
Source: StackOverflow

1/17/2019

The application needs to be instrumented to pass on the following headers:

x-request-id
x-b3-traceid
x-b3-spanid
x-b3-parentspanid
x-b3-sampled
x-b3-flags
x-ot-span-context

This is automated for most frameworks and implementations can be found in the OpenTracing Contrib repository. Besides that, for Pods and Services to be part of the service mesh, they need to fulfill the requirements specified here. Special attention to named ports.

BUT, as you are not getting any traces, it looks like a failure in setting up jaeger, sometimes uninstalling istio from your cluster and reinstalling fixes the issue.

-- Rinor
Source: StackOverflow