Spring's sleuth adds to MDC X-B3-SpanId and SpanId. (same for TraceId)
{X-B3-SpanId=0000000000000001, X-B3-TraceId=0000000000000002, X-Span-Export=false, spanExportable=false, spanId=0000000000000001, traceId=0000000000000002}
"X-B3-" prefixed values are identical to non-prefixed.
If one of them is redundant, I prefer to remove it. (to reduce verboseness of my logs)
Is there any difference between X-B3-SpanId and SpanId? (X-B3-TraceId and Traceid)
Is there good reason to log both?
Diagram in spring docs https://cloud.spring.io/spring-cloud-sleuth/2.1.x/single/spring-cloud-sleuth.html#_propagation show that "X-B3-" prefixed thing lives only in request header for transport, but if I make request without any of those headers, my log's MDC still contains "X-B3-" prefixed values.
Used dependencies:
- org.springframework.boot:spring-boot-starter-log4j2:2.0.3.RELEASE
- org.springframework.cloud:spring-cloud-sleuth-core:2.0.3.RELEASE
Just plain addition of dependency to gradle.build - no customizations/configurations regarding sleuth.
*MDC = log4j2's Mapped Diagnostic Contex https://logging.apache.org/log4j/2.x/manual/thread-context.html