From 1e1b5a4941faf92ce72486447ad808225dd2e729 Mon Sep 17 00:00:00 2001 From: Andrew Hsu Date: Thu, 16 Apr 2020 19:10:33 -0700 Subject: [PATCH] update zipkin example README.md With instructions on how to use docker-compose to run the example. Signed-off-by: Andrew Hsu --- example/zipkin/README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/example/zipkin/README.md b/example/zipkin/README.md index 43889e36ba9d..c1702586fddd 100644 --- a/example/zipkin/README.md +++ b/example/zipkin/README.md @@ -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 ```