通过 Zipkin 观察 Trace

1、下载和运行Zipkin

请参考https://zipkin.io/pages/quickstart.html

2、运行eventmesh

运行eventmesh-starter(参考eventmesh-runtime-quickstart)

运行eventmesh-example(参考eventmesh-sdk-java-quickstart)

3、相关的设置

eventmesh-runtime/conf/eventmesh.properties中:

默认的exporter是log,需要手动改成Zipkin

  1. #trace exporter
  2. eventmesh.trace.exporter.type=Zipkin

下面是关于Zipkin的各种配置

  1. #set the maximum batch size to use
  2. eventmesh.trace.exporter.max.export.size=512
  3. #set the queue size. This must be >= the export batch size
  4. eventmesh.trace.exporter.max.queue.size=2048
  5. #set the max amount of time an export can run before getting(TimeUnit=SECONDS)
  6. eventmesh.trace.exporter.export.timeout=30
  7. #set time between two different exports(TimeUnit=SECONDS)
  8. eventmesh.trace.exporter.export.interval=5
  9. #zipkin
  10. eventmesh.trace.export.zipkin.ip=localhost
  11. eventmesh.trace.export.zipkin.port=9411

以上都是相关的配置,如果你十分熟悉Zipkin的话可以自行修改。

4、观察

浏览器打开: localhost:9411