Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Commit f08c1ea

Browse files
authored
Update Zipkin instructions. (#246)
1 parent 1673868 commit f08c1ea

File tree

1 file changed

+29
-17
lines changed

1 file changed

+29
-17
lines changed

opencensus/exporters/trace/zipkin/README.md

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,48 @@
11
# Zipkin Export Example
22

3-
This is a simple example program to demonstrate how to export tracing information
4-
to Zipkin using OpenCensus.
3+
This is a simple example program to demonstrate how to export tracing
4+
information to Zipkin using OpenCensus.
55

6-
Usage:
7-
8-
Start the zipkin server.
6+
Start the zipkin server:
97
```shell
10-
java -jar zipkin.jar --logging.level.zipkin=DEBUG --logging.level.zipkin2=DEBUG
8+
docker run -p 9411:9411 openzipkin/zipkin
9+
10+
# Or, download zipkin and run:
11+
# java -jar zipkin.jar --logging.level.zipkin=DEBUG --logging.level.zipkin2=DEBUG
1112
```
1213

13-
Build and run the OpenCensus example.
14+
Run the OpenCensus example:
1415
```shell
15-
bazel build opencensus/...
16-
./bazel-bin/opencensus/exporters/trace/zipkin/zipkin_exporter_test
16+
bazel run //opencensus/exporters/trace/zipkin:zipkin_exporter_test
1717
```
1818

19-
## Zipkin:
19+
Go to http://127.0.0.1:9411/ and click the "Find Traces" button to see traces.
2020

21-
A Zipkin server needs to be running to collect the spans. Zipkin can be found [here](https://github.com/openzipkin/zipkin). Instructions on running the server can be found [here](https://github.com/openzipkin/zipkin/tree/master/zipkin-server). The Zipkin server should by default listen on port 9411. If you are running the server locally, the spans should be sent to "http://127.0.0.1:9411/api/v2/spans".
21+
## Zipkin
22+
23+
A Zipkin server needs to be running to send spans to it.
24+
Zipkin can be found [here](https://github.com/openzipkin/zipkin).
25+
Instructions on running the server can be found in their
26+
[quickstart](https://zipkin.io/pages/quickstart.html).
27+
The Zipkin server should by default listen on port 9411.
2228

2329
Zipkin's tracing model is not identical to the model used by OpenCensus. Here is
24-
a list of some of the differences when converting from OpenCensus to Zipkin.
30+
a list of some of the differences when converting from OpenCensus to Zipkin:
2531

26-
**OpenCensus -> Zipkin**
27-
* message events -> annotations (serialized as <SENT/RECEIVED>/\<Id\>/\<size\>)
28-
* attributes -> tags (which are a dict of key/value pairs in Zipkin)
29-
* links -> Not Supported
32+
OpenCensus | Zipkin
33+
---------- | ------
34+
message events | annotations (formatted as: SENT/ID/size)
35+
attributes | tags (which are key/value pairs in Zipkin)
36+
links | not supported
3037

3138
## Viewing Example Trace
3239

33-
The traces will show up on the Zipkin webpage UI. If you are using the default address it will be "http://127.0.0.1:9411/zipkin". Click on find traces. The trace sent from the exporter should appear. Click on it and it should look something like this:
40+
The traces will show up on the Zipkin webpage UI.
41+
By default, this is http://127.0.0.1:9411/
42+
43+
Click the "Find Traces" button and the trace sent from the exporter should
44+
appear.
45+
Click on it and it should look something like this:
3446

3547
![Example Trace](https://i.imgur.com/7bNWraI.png)
3648

0 commit comments

Comments
 (0)