Image for post
Image for post

For our projects with lots of JAVA microservices, we use Zipkin to get insights into the calls that are made and where the bottlenecks might be. Once we identified an interesting trace, we would like to know what the services were doing at the time. However, we were initially missing the ability to link the Zipkin traces to the log messages of the microservices.

Our JAVA microservices create JSON formatted log lines using the logback LogStash encoder. They are picked up by Fluentd, put in Elasticsearch and accessed via Kibana. In this post, we want to show how to add the Zipkin traceId and spanId to the JSON formatted log lines via the Mapped Diagnostic Context (MDC). …

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store