Skip to content
Zipkin tracing example with MDC
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
common
service-a Better variable name Feb 11, 2018
service-b Add hystrix command to service A Feb 7, 2018
service-c Add hystrix command to service A Feb 7, 2018
zipkin-trace Checkin after fix from Brave with 4.3.4-snapshot version with GrpcCon… Jun 15, 2017
.gitignore Checkin after fix from Brave with 4.3.4-snapshot version with GrpcCon… Jun 15, 2017
README.md Update README with a description. Jun 16, 2017

README.md

zipkin-trace

Proof of concept showing how to add MDC traceId and spanId to logging, when using HTTP and gRPC between services.

Start a zipkin container (e.g. openzipkin/zipkin:latest) and note exposed ports. Edit the application.yml files to point to the correct zipkin port (the lowest numbered port).

There are currently three calls that can be made:

  1. http://localhost:8080/v1/a
  2. http://localhost:8080/v1/b
  3. http://localhost:8080/v1/c

With call /v1/a, service A calls service B via gRPC and service B calls service C via HTTP With call /v1/b, service A calls service B via gRPC ans service B calls service C via gRPC With call /v1/c, service A calls service C via HTTP

In the logging of each service A,B,C one should see the traceId/spanId logged between square brackets.

In the common directory you can find much of the configuration of Brave to make it quick for new services to include tracing, by autowiring.

You can’t perform that action at this time.