3.1 KiB
| title | description | weight | keywords | aliases | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Zipkin | Learn how to configure the proxies to send tracing requests to Zipkin. | 10 |
|
|
To learn how Istio handles tracing, visit this task's overview.
Before you begin
-
To set up Istio, follow the instructions in the Installation guide and then configure:
a) a demo/test environment by setting the
--set tracing.enabled=trueand--set tracing.provider=zipkinHelm install options to enable tracing "out of the box"b) a production environment by referencing an existing Zipkin instance and then setting the
--set global.tracer.zipkin.address=<zipkin-collector-service>.<zipkin-collector-namespace>:9411Helm install option.{{< warning >}} When you enable tracing, you can set the sampling rate that Istio uses for tracing. Use the
pilot.traceSamplingoption to set the sampling rate. The default sampling rate is 1%. {{< /warning >}} -
Deploy the Bookinfo sample application.
Accessing the dashboard
Remotely Accessing Telemetry Addons details how to configure access to the Istio addons through a gateway. Alternatively, to use a Kubernetes ingress, specify the Helm chart option --set tracing.ingress.enabled=true during install.
For testing (and temporary access), you may also use port-forwarding. Use the following, assuming you've deployed Zipkin to the istio-control namespace:
{{< text bash >}}
kubectl -n istio-control port-forward(kubectl -n istio-control get pod -l app=zipkin -o jsonpath='{.items[0].metadata.name}') 15032:9411
{{< /text >}}
Open your browser to http://localhost:15032.
Generating traces using the Bookinfo sample
-
When the Bookinfo application is up and running, access
http://$GATEWAY_URL/productpageone or more times to generate trace information.{{< boilerplate trace-generation >}}
-
From the top panel, select a service of interest (or 'all') from the Service Name drop-down list and click Find Traces:
{{< image link="./istio-tracing-list-zipkin.png" caption="Tracing Dashboard" >}}
-
Click on the most recent trace at the top to see the details corresponding to the latest request to the
/productpage:{{< image link="./istio-tracing-details-zipkin.png" caption="Detailed Trace View" >}}
-
The trace is comprised of a set of spans, where each span corresponds to a Bookinfo service, invoked during the execution of a
/productpagerequest, or internal Istio component, for example:istio-ingressgateway,istio-mixer,istio-policy.
Cleanup
-
Remove any
kubectl port-forwardprocesses that may still be running:{{< text bash >}} $ killall kubectl {{< /text >}}
-
If you are not planning to explore any follow-on tasks, refer to the Bookinfo cleanup instructions to shutdown the application.