1

I would like to include the spring.sleuth.propagation-keys into the MDC. Mentioned here we can create our own implementation of CurrentTraceContext similar to Slf4jCurrentTraceContext.

However cannot get the value via since the ExtraFieldPropagation.Extra class is package private:

((ExtraFieldPropagation.Extra) currentSpan.extra().get(0)).values[0];

if I set:

spring: sleuth: propagation-keys: trId

What am I missing?

Thank you.

Zoltan Altfatter
  • 802
  • 2
  • 11
  • 25

1 Answers1

0

figured it out. Works with: ExtraFieldPropagation.get(currentSpan, "trId")

Zoltan Altfatter
  • 802
  • 2
  • 11
  • 25