Skip to content

Commit

Permalink
update zipkin example README.md
Browse files Browse the repository at this point in the history
With instructions on how to use docker-compose to run the example.

Signed-off-by: Andrew Hsu <[email protected]>
  • Loading branch information
andrewhsu committed Apr 17, 2020
1 parent 117883b commit 1e1b5a4
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions example/zipkin/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
# Zipkin Exporter Example

Sends spans to zipkin collector.
Send an example span to a [Zipkin](https://zipkin.io/) service.
These instructions expect you have [docker-compose](https://docs.docker.com/compose/) installed.

### Run collector
Bring up the `zipkin-collector` service and example `zipkin-client` service to send an example trace:
```sh
docker-compose up --detach zipkin-collector zipkin-client
```

The `zipkin-client` service sends just one trace and exits. Retrieve the `traceId` generated by the `zipkin-client` service; should be the last line in the logs:
```sh
docker run -d -p 9411:9411 openzipkin/zipkin
docker-compose logs --tail=1 zipkin-client
```

### Run client
With the `traceId` you can view the trace from the `zipkin-collector` service UI hosted on port `9411`, e.g. with `traceId` of `f5695ba3b2ed00ea583fa4fa0badbeef`:
http://localhost:9411/zipkin/traces/f5695ba3b2ed00ea583fa4fa0badbeef

Shut down the services when you are finished with the example:
```sh
go build .
./zipkin
docker-compose down
```

0 comments on commit 1e1b5a4

Please sign in to comment.