Update distributed tracing doc to reflect changes in 0.8.0 (#1415)
* Update distributed tracing doc to reflect changes in 0.8.0 * Updated images and reference from GKE setup page
After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 113 KiB |
|
@ -50,7 +50,7 @@ caption="GKE-IAM Role"
|
||||||
[Grafana](/docs/tasks/telemetry/using-istio-dashboard/) with
|
[Grafana](/docs/tasks/telemetry/using-istio-dashboard/) with
|
||||||
[Prometheus](/docs/tasks/telemetry/querying-metrics/),
|
[Prometheus](/docs/tasks/telemetry/querying-metrics/),
|
||||||
[ServiceGraph](/docs/tasks/telemetry/servicegraph/),
|
[ServiceGraph](/docs/tasks/telemetry/servicegraph/),
|
||||||
and [Zipkin](/docs/tasks/telemetry/distributed-tracing/#zipkin).
|
and [Tracing](/docs/tasks/telemetry/distributed-tracing/).
|
||||||
You'll find out more about how to access all of these below. This script will enable Istio auto-injection on the ```default``` namespace only.
|
You'll find out more about how to access all of these below. This script will enable Istio auto-injection on the ```default``` namespace only.
|
||||||
|
|
||||||
1. Click **Deploy**:
|
1. Click **Deploy**:
|
||||||
|
@ -218,21 +218,17 @@ For more details, see [About the ServiceGraph Add-on](/docs/tasks/telemetry/serv
|
||||||
|
|
||||||
## Tracing
|
## Tracing
|
||||||
|
|
||||||
Set up a tunnel to Zipkin:
|
Set up a tunnel to the tracing dashboard:
|
||||||
|
|
||||||
```command
|
```command
|
||||||
$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=zipkin -o jsonpath='{.items[0].metadata.name}') 9411:9411 &
|
$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 &
|
||||||
```
|
```
|
||||||
|
|
||||||
You should see the trace statistics sent earlier:
|
You should see the trace statistics sent earlier on [http://localhost:16686](http://localhost:16686)
|
||||||
|
|
||||||
```plain
|
{{< image width="100%" ratio="42.35%"
|
||||||
http://localhost:9411
|
link="../img/dm-tracing.png"
|
||||||
```
|
caption="Tracing Dashboard"
|
||||||
|
|
||||||
{{< image width="100%" ratio="57.00%"
|
|
||||||
link="../img/dm_zipkin.png"
|
|
||||||
caption="Zipkin"
|
|
||||||
>}}
|
>}}
|
||||||
|
|
||||||
For more details on tracing see [Understanding what happened](/docs/tasks/telemetry/distributed-tracing/#understanding-what-happened).
|
For more details on tracing see [Understanding what happened](/docs/tasks/telemetry/distributed-tracing/#understanding-what-happened).
|
||||||
|
|
|
@ -256,17 +256,17 @@ Install Istio's core components. Choose one of the four _**mutually exclusive**_
|
||||||
|
|
||||||
* Install Istio without enabling [mutual TLS authentication](/docs/concepts/security/mutual-tls/) between sidecars. Choose this option for clusters with existing applications, applications where services with an Istio sidecar need to be able to communicate with other non-Istio Kubernetes services, and applications that use [liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/), headless services, or StatefulSets.
|
* Install Istio without enabling [mutual TLS authentication](/docs/concepts/security/mutual-tls/) between sidecars. Choose this option for clusters with existing applications, applications where services with an Istio sidecar need to be able to communicate with other non-Istio Kubernetes services, and applications that use [liveness and readiness probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/), headless services, or StatefulSets.
|
||||||
|
|
||||||
```command
|
```command
|
||||||
$ kubectl apply -f install/kubernetes/istio-demo.yaml
|
$ kubectl apply -f install/kubernetes/istio-demo.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
OR
|
OR
|
||||||
|
|
||||||
* Install Istio and enforce mutual TLS authentication between sidecars by default. Use this option only on a fresh kubernetes cluster where newly deployed workloads are guaranteed to have Istio sidecars installed.
|
* Install Istio and enforce mutual TLS authentication between sidecars by default. Use this option only on a fresh kubernetes cluster where newly deployed workloads are guaranteed to have Istio sidecars installed.
|
||||||
|
|
||||||
```command
|
```command
|
||||||
$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml
|
$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
OR
|
OR
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,7 @@ aliases:
|
||||||
- /docs/tasks/zipkin-tracing.html
|
- /docs/tasks/zipkin-tracing.html
|
||||||
---
|
---
|
||||||
|
|
||||||
This task shows you how Istio-enabled applications
|
This task shows you how Istio-enabled applications can be configured to collect trace spans.
|
||||||
can be configured to collect trace spans using [Zipkin](https://zipkin.io) or [Jaeger](https://jaeger.readthedocs.io).
|
|
||||||
After completing this task, you should understand all of the assumptions about your
|
After completing this task, you should understand all of the assumptions about your
|
||||||
application and how to have it participate in tracing, regardless of what
|
application and how to have it participate in tracing, regardless of what
|
||||||
language/framework/platform you use to build your application.
|
language/framework/platform you use to build your application.
|
||||||
|
@ -19,38 +18,14 @@ example application for this task.
|
||||||
|
|
||||||
* Setup Istio by following the instructions in the [Installation guide](/docs/setup/).
|
* Setup Istio by following the instructions in the [Installation guide](/docs/setup/).
|
||||||
|
|
||||||
If you didn't start the Zipkin or Jaeger addon during installation,
|
Either use the `istio-demo.yaml` (or `istio-demo-auth.yaml`) template, which includes tracing support, or
|
||||||
you can run the following command to start it now.
|
use the helm chart with tracing enabled using the `--set tracing.enabled=true` option.
|
||||||
|
|
||||||
For Zipkin:
|
|
||||||
|
|
||||||
```command
|
|
||||||
$ kubectl apply -f install/kubernetes/addons/zipkin.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
For Jaeger:
|
|
||||||
|
|
||||||
```command
|
|
||||||
$ kubectl apply -n istio-system -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
* Deploy the [Bookinfo](/docs/guides/bookinfo/) sample application.
|
* Deploy the [Bookinfo](/docs/guides/bookinfo/) sample application.
|
||||||
|
|
||||||
## Accessing the dashboard
|
## Accessing the dashboard
|
||||||
|
|
||||||
### Zipkin
|
Setup access to the tracing dashboard URL using port-forwarding:
|
||||||
|
|
||||||
Setup access to the Zipkin dashboard URL using port-forwarding:
|
|
||||||
|
|
||||||
```command
|
|
||||||
$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=zipkin -o jsonpath='{.items[0].metadata.name}') 9411:9411 &
|
|
||||||
```
|
|
||||||
|
|
||||||
Then open your browser at [http://localhost:9411](http://localhost:9411)
|
|
||||||
|
|
||||||
### Jaeger
|
|
||||||
|
|
||||||
Setup access to the Jaeger dashboard URL using port-forwarding:
|
|
||||||
|
|
||||||
```command
|
```command
|
||||||
$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 &
|
$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 &
|
||||||
|
@ -65,28 +40,18 @@ With the Bookinfo application up and running, generate trace information by acce
|
||||||
|
|
||||||
If you now look at the dashboard, you should see something similar to the following:
|
If you now look at the dashboard, you should see something similar to the following:
|
||||||
|
|
||||||
{{< image width="100%" ratio="44.28%"
|
|
||||||
link="../img/zipkin_dashboard.png"
|
|
||||||
caption="Zipkin Dashboard"
|
|
||||||
>}}
|
|
||||||
|
|
||||||
{{< image width="100%" ratio="42.35%"
|
{{< image width="100%" ratio="42.35%"
|
||||||
link="../img/jaeger_dashboard.png"
|
link="../img/istio-tracing-list.png"
|
||||||
caption="Jaeger Dashboard"
|
caption="Tracing Dashboard"
|
||||||
>}}
|
>}}
|
||||||
|
|
||||||
If you click on the top (most recent) trace, you should see the details corresponding to your
|
If you click on the top (most recent) trace, you should see the details corresponding to your
|
||||||
latest refresh of the `/productpage`.
|
latest refresh of the `/productpage`.
|
||||||
The page should look something like this:
|
The page should look something like this:
|
||||||
|
|
||||||
{{< image width="100%" ratio="19.70%"
|
{{< image width="100%" ratio="42.35%"
|
||||||
link="../img/zipkin_span.png"
|
link="../img/istio-tracing-details.png"
|
||||||
caption="Zipkin Trace View"
|
caption="Detailed Trace View"
|
||||||
>}}
|
|
||||||
|
|
||||||
{{< image width="100%" ratio="26.99%"
|
|
||||||
link="../img/jaeger_trace.png"
|
|
||||||
caption="Jaeger Trace View"
|
|
||||||
>}}
|
>}}
|
||||||
|
|
||||||
As you can see, the trace is comprised of spans,
|
As you can see, the trace is comprised of spans,
|
||||||
|
@ -104,7 +69,7 @@ The `reviews` service took about 243ms to execute, including a 15ms call to `rat
|
||||||
## Understanding what happened
|
## Understanding what happened
|
||||||
|
|
||||||
Although Istio proxies are able to automatically send spans, they need some hints to tie together the entire trace.
|
Although Istio proxies are able to automatically send spans, they need some hints to tie together the entire trace.
|
||||||
Applications need to propagate the appropriate HTTP headers so that when the proxies send span information to Zipkin or Jaeger,
|
Applications need to propagate the appropriate HTTP headers so that when the proxies send span information,
|
||||||
the spans can be correlated correctly into a single trace.
|
the spans can be correlated correctly into a single trace.
|
||||||
|
|
||||||
To do this, an application needs to collect and propagate the following headers from the incoming request to any outgoing requests:
|
To do this, an application needs to collect and propagate the following headers from the incoming request to any outgoing requests:
|
||||||
|
@ -169,20 +134,6 @@ When you make downstream calls in your applications, make sure to include these
|
||||||
|
|
||||||
## Cleanup
|
## Cleanup
|
||||||
|
|
||||||
* Remove the addon tracing configuration:
|
|
||||||
|
|
||||||
If you are running with Zipkin, run the following command to cleanup:
|
|
||||||
|
|
||||||
```command
|
|
||||||
$ kubectl delete -f install/kubernetes/addons/zipkin.yaml
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are running with Jaeger, run the following command to cleanup:
|
|
||||||
|
|
||||||
```command
|
|
||||||
$ kubectl delete -f https://raw.githubusercontent.com/jaegertracing/jaeger-kubernetes/master/all-in-one/jaeger-all-in-one-template.yml
|
|
||||||
```
|
|
||||||
|
|
||||||
* If you are not planning to explore any follow-on tasks, refer to the
|
* If you are not planning to explore any follow-on tasks, refer to the
|
||||||
[Bookinfo cleanup](/docs/guides/bookinfo/#cleanup) instructions
|
[Bookinfo cleanup](/docs/guides/bookinfo/#cleanup) instructions
|
||||||
to shutdown the application.
|
to shutdown the application.
|
||||||
|
|
After Width: | Height: | Size: 107 KiB |
After Width: | Height: | Size: 99 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 31 KiB |