Small example of distributed tracing in grpc-go applications. Using OpenCensus for collecting traces data and Jaeger for export.
Example has 3 parts.
Client:
- reads "radius" from console
- calls "Circle.area" grpc method to calculate an area of a circle with given radius
Circle:
- Circle.area calls Math.sqr grpc method to calculate the radius squared
- Circle.area returns value of area
Math:
- Math.sqr returns the radius squared
- Start Jaeger Exporter locally in Docker
docker run -d --name jaeger \
-p 16686:16686 \
-p 14268:14268 \
jaegertracing/all-in-one:1.22
- 16686 - Jaeger UI port
- 14268 - Collector port
- Run main func of each part
- See your traces in http://localhost:16686/