Collect Trace with Zipkin

Zipkin

Distributed tracing is a method used to profile and monitor applications built with microservices architecture. Distributed tracing helps pinpoint where failures occur and what causes poor performance.

Zipkin is a distributed tracing system that helps collect timing data needed to troubleshoot latency problems in service architectures. EventMesh exposes a collection of trace data that could be collected and analyzed by Zipkin. Please follow the “Zipkin Quickstart” tutorial to download and install the latest release of Zipkin.

Configuration

To enable the trace exporter of EventMesh Runtime, set the eventMesh.server.trace.enabled field in the conf/eventmesh.properties file to true.

  1. # Trace plugin
  2. eventMesh.server.trace.enabled=true
  3. eventMesh.trace.plugin=zipkin

To customize the behavior of the trace exporter such as timeout or export interval, edit the exporter.properties file.

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

To send the exported trace data to Zipkin, edit the eventmesh.trace.zipkin.ip and eventmesh.trace.zipkin.port fields in the conf/zipkin.properties file to match the configuration of the Zipkin server.

  1. # Zipkin's IP and Port
  2. eventmesh.trace.zipkin.ip=localhost
  3. eventmesh.trace.zipkin.port=9411