Some time ago I wrote about “Custom links in Jaeger UI” (check it first if you haven’t got chance yet). I explained there how deep linking makes life easier and can speed up troubleshooting session. This post extends it a little bit and provides a more detailed example for a particular use case: links between Jaeger and Kiali.

Kiali is a tool which helps you manage and monitor your service mesh based on Istio. You can treat it as a console for Istio. It gives you features like:

displaying topology graph of the mesh,

providing health status and metrics for your services,

changing configuration of the mesh (also validating it for you),

embedding distributed tracing UI from Jeager

Kiali provides you an embedded Jaeger UI with a possibility to jump to Jaeger page directly:

Jaeger UI inside Kiali

But what if we start in Jaeger and want to jump to Kiali and directly to a certain page (f.e. workload details, or service graph)?

As I showed in the previous article it’s possible to configure Jaeger to create links based on span metadata. Unfortunately, if you install Istio with default configuration the spans will get tags with values not suitable for creating such links (I’ll show an example below).

But Istio lets you modify telemetry configuration, also trace span metadata so we can tweak configuration to our needs.

“Ok, show me the code”

Below there’s a simple example of how to configure Istio and Jaeger to enable deep-linking to Kiali.

NOTE:

For the example, I used Istio v1.2.2, not sure if it will work with previous versions.

F.e. in v1.1 there was a separate CRD for tracespan, for v1.2 we use instance type for defining span metadata.

If you’d like to follow the example below, I assume that you :

have a running Kubernetes cluster with helm’s tiller installed

will download all Github gists displayed below to a working directory

will also git clone Istio repository into working directory (or at least copy istio/install and istio/sample folders)

First, let’s install:

Istio (using helm chart directly from Istio repository),

Kiali (can be installed as part of Istio helm chart),

Jaeger (we’ll use jaeger-operator so we can customize UI configuration later)

example app (bookinfo app) so we can generate some traces.

First Istio:

# Install istio

helm install istio/install/kubernetes/helm/istio-init --name istio-init --namespace istio-system helm upgrade istio istio/install/kubernetes/helm/istio --install \

--namespace istio-system \

--set pilot.traceSampling=100.0 \

--set kiali.enabled=true \

--set kiali.createDemoSecret=true \

--set kiali.dashboard.jaegerURL=http://localhost:16686 \

--set global.tracer.zipkin.address=jaeger-collector.observability.svc.cluster.local:9411

we set traceSampling to 100% so every request will be stored in Jaeger

to 100% so every request will be stored in Jaeger kiali.createDemoSecret set to true will create secret with default admin/admin username/password for Kiali console

set to true will create secret with default username/password for Kiali console kiali.dashboard.jaegerURL is set to localhost because we will use kubectl port-forward for accessing all services in Kubernetes cluster

is set to localhost because we will use for accessing all services in Kubernetes cluster global.tracer.zipkin.address is set to Jaeger collector service which we will create in a minute

Next Jaeger:

# Install jaeger-operator

helm install stable/jaeger-operator --name jaeger-operator --namespace observability

# Install Jaeger CR from above snippet

kubectl apply -f jaeger1.yaml

And finally BookInfo app: