自定义CorrelationId春天云侦探Finchley.RELEASE

时间:2019-04-01 13:11:07

标签: spring-boot spring-cloud spring-cloud-sleuth mdc distributed-tracing

我目前在spring-cloud-sleuth中只能使用一个用例。 我正在使用Finchley。在pom中释放spring cloud和Spring boot 2.0.3.RELEASEץ

我实现了自己的CustomTraceContext,它扩展了CurrentTraceContext,并向MDC添加了自定义的CorrelationId(X-P-TraceId)。

我正在使用log4j2.xml,并且能够在日志文件中看到CorrelationId(X-P-TraceId)。

现在,我需要将CorrelationId(X-P-TraceId)传播到微服务链,并且 我也看不到异步线程中的CorrelationId(X-P-TraceId)(我在异步线程中打印了MDC.getCopyOfContextMap(),我只看到X-B3-TraceId,X-B3-SpanId)?

Finchley.Release可以吗?

有任何示例配置吗?

我推荐了this,但无法对此进行配置。

感谢您的帮助。

0 个答案:

没有答案