Member-only story
Distributed Tracing For Spring Boot 3x gRPC App Using Micrometer, Brave And Zipkin
4 min readJun 20, 2023
Prequel: Please check my another blog for in detail coverage of lot of this setup:
Distributed Tracing For Spring Boot 3x App Using Micrometer, Brave And Zipkin
In this blog, we will quickly recap the dependency changes along with application.yml
, code (main + test), and log XML configurations, all explained in the above ☝ blog, which covers enabling Distributed Tracing for a Spring Boot App using Micrometer, Brave And Zipkin. Then, we will supplement the setup to work with a gRPC Spring Boot App.
RECAP
- Dependencies
#build.gradle
implementation 'io.micrometer:micrometer-tracing-bridge-brave'
implementation 'io.zipkin.reporter2:zipkin-reporter-brave'
- Log XML
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<!--Notice addition of traceId & spanId from Log Thread MDC context -->
<PatternLayout
pattern="[%date{ISO8601}] [%-5level] [%thread] [%MDC{traceId},%MDC{spanId}] %logger{1.}.%method#%line - %message%n"/>
</Console>
</Appenders>
<Loggers>
<Logger name="com.example" level="INFO"…