-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With instructions on how to use docker-compose to run the example. Signed-off-by: Andrew Hsu <[email protected]>
- Loading branch information
Showing
1 changed file
with
12 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |