This guide describes how to view the distributed tracing collected by Istio on its service mesh using Kiali.
Contents
Prerequisites
Kiali and Istio
This guide requires Charmed Kiali deployed and integrated with Charmed Istio and other dependencies, as well as something on the mesh producing traffic that actually generates traces. An example that satisfies these requirements is given in this Getting Started tutorial.
Tempo and Grafana
This guide requires that your Istio instance be configured to provide traces to Tempo and register that Tempo with an instance of Grafana.
At time of writing, the Kiali charm only supports integrating with Grafana workloads that were not behind authentication. It is planned to enable authenticated access to Grafana in a future release.
If you started with the Getting Started tutorial example, you can integrate Istio to Tempo and Grafana by...
…deploying Tempo, for example like described in this monolithic setup (note that we don’t need other pieces of the COS stack described in that guide).
Deploying Grafana and integrating it with Tempo:
juju deploy -m istio-system grafana-k8s --config allow_anonymous_access=true
juju relate -m istio-system tempo-coordinator-k8s:grafana-source grafana-k8s:grafana-source
Integrating Istio with Tempo:
juju relate -m istio-system istio-k8s:workload-tracing tempo-coordinator-k8s:tracing
And offering Tempo and Grafana for cross-model relations
juju offer -m istio-system tempo-coordinator-k8s:tempo-api
juju offer -m istio-system grafana-k8s:grafana-metadata
Integrate Kiali to Tempo and Grafana
To consume Istio’s traces in Kiali, we integrate Kiali to Tempo and Grafana:
juju relate -m kiali kiali-k8s:tempo-api tempo-coordinator-k8s:tempo-api
juju relate -m kiali kiali-k8s:tempo-datasource-exchange tempo-coordinator-k8s:receive-datasource
juju relate -m kiali kiali-k8s:grafana-metadata grafana-k8s:grafana-metadata
View Traces in Kiali
We can now browse to the Kiali dashboard to view traces, for example like seen on the Workloads page: