Collect Trace with Jaeger

Jaeger

Jaeger, inspired by Dapper and OpenZipkin, is a distributed tracing platform created by Uber Technologies and donated to Cloud Native Computing Foundation. It can be used for monitoring microservices-based distributed systems.

For the installation of Jaeger, you can refer to the official documentation of Jaeger. It is recommended to use docker image jaegertracing/all-in-one to quickly build the environment for testing.

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=jaeger

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 Jaeger, edit the eventmesh.trace.jaeger.ip and eventmesh.trace.jaeger.port fields in the conf/jaeger.properties file to match the configuration of the Jaeger server.

  1. # Jaeger's IP and Port
  2. eventmesh.trace.jaeger.ip=localhost
  3. eventmesh.trace.jaeger.port=14250

Migrating from Zipkin

Collector service exposes Zipkin compatible REST API /api/v1/spans which accepts both Thrift and JSON. Also there is /api/v2/spans for JSON and Proto.

So you can also use the eventmesh-trace-zipkin plugin to collect trace with Jaeger. Please refer to the eventmesh-trace-zipkin documentation for the specific configuration. By default this feature in Jaeger is disabled. It can be enabled with --collector.zipkin.host-port=:9411.