Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update distributed tracing doc to reflect changes in 0.8.0 #1415

Merged
merged 2 commits into from
Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/docs/setup/kubernetes/img/dm_zipkin.png
Binary file not shown.
18 changes: 7 additions & 11 deletions content/docs/setup/kubernetes/quick-start-gke-dm.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ caption="GKE-IAM Role"
[Grafana](/docs/tasks/telemetry/using-istio-dashboard/) with
[Prometheus](/docs/tasks/telemetry/querying-metrics/),
[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.

1. Click **Deploy**:
Expand Down Expand Up @@ -218,21 +218,17 @@ For more details, see [About the ServiceGraph Add-on](/docs/tasks/telemetry/serv

## Tracing

Set up a tunnel to Zipkin:
Set up a tunnel to the tracing dashboard:

```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
http://localhost:9411
```

{{< image width="100%" ratio="57.00%"
link="../img/dm_zipkin.png"
caption="Zipkin"
{{< image width="100%" ratio="42.35%"
link="../img/dm-tracing.png"
caption="Tracing Dashboard"
>}}

For more details on tracing see [Understanding what happened](/docs/tasks/telemetry/distributed-tracing/#understanding-what-happened).
Expand Down
12 changes: 6 additions & 6 deletions content/docs/setup/kubernetes/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,17 +256,17 @@ Install Istio's core components. Choose one of the four _**mutually exclusive**_

a) 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
$ kubectl apply -f install/kubernetes/istio-demo.yaml
```
```command
$ kubectl apply -f install/kubernetes/istio-demo.yaml
```

OR

b) 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
$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml
```
```command
$ kubectl apply -f install/kubernetes/istio-demo-auth.yaml
```

OR

Expand Down
69 changes: 10 additions & 59 deletions content/docs/tasks/telemetry/distributed-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ aliases:
- /docs/tasks/zipkin-tracing.html
---

This task shows you how Istio-enabled applications
can be configured to collect trace spans using [Zipkin](https://zipkin.io) or [Jaeger](https://jaeger.readthedocs.io).
This task shows you how Istio-enabled applications can be configured to collect trace spans.
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
language/framework/platform you use to build your application.
Expand All @@ -19,38 +18,14 @@ example application for this task.

* Setup Istio by following the instructions in the [Installation guide](/docs/setup/).

If you didn't start the Zipkin or Jaeger addon during installation,
you can run the following command to start it now.

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
```
Either use the `istio-demo.yaml` (or `istio-demo-auth.yaml`) template, which includes tracing support, or
use the helm chart with tracing enabled using the `--set tracing.enabled=true` option.

* Deploy the [Bookinfo](/docs/guides/bookinfo/) sample application.

## Accessing the dashboard

### Zipkin

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:
Setup access to the tracing dashboard URL using port-forwarding:

```command
$ kubectl port-forward -n istio-system $(kubectl get pod -n istio-system -l app=jaeger -o jsonpath='{.items[0].metadata.name}') 16686:16686 &
Expand All @@ -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:

{{< image width="100%" ratio="44.28%"
link="../img/zipkin_dashboard.png"
caption="Zipkin Dashboard"
>}}

{{< image width="100%" ratio="42.35%"
link="../img/jaeger_dashboard.png"
caption="Jaeger Dashboard"
link="../img/istio-tracing-list.png"
caption="Tracing Dashboard"
>}}

If you click on the top (most recent) trace, you should see the details corresponding to your
latest refresh of the `/productpage`.
The page should look something like this:

{{< image width="100%" ratio="19.70%"
link="../img/zipkin_span.png"
caption="Zipkin Trace View"
>}}

{{< image width="100%" ratio="26.99%"
link="../img/jaeger_trace.png"
caption="Jaeger Trace View"
{{< image width="100%" ratio="42.35%"
link="../img/istio-tracing-details.png"
caption="Detailed Trace View"
>}}

As you can see, the trace is comprised of spans,
Expand All @@ -104,7 +69,7 @@ The `reviews` service took about 243ms to execute, including a 15ms call to `rat
## Understanding what happened

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.

To do this, an application needs to collect and propagate the following headers from the incoming request to any outgoing requests:
Expand Down Expand Up @@ -169,20 +134,6 @@ When you make downstream calls in your applications, make sure to include these

## 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
[Bookinfo cleanup](/docs/guides/bookinfo/#cleanup) instructions
to shutdown the application.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed content/docs/tasks/telemetry/img/jaeger_trace.png
Binary file not shown.
Binary file not shown.
Binary file removed content/docs/tasks/telemetry/img/zipkin_span.png
Binary file not shown.