在spring cloud sleuth中重命名X-B3-TraceId标头



我在Node中编写了一些使用"X-Request-Id";作为标识请求的报头。我现在正在使用spring boot用Java编写服务,在那里我可以使用spring cloud sleuth来跟踪traceId和spanId。

然而,我想继续使用";X-Request-Id";作为我所有服务的请求标识符。有没有办法将";X-B3-跑道Id";spring-sleuth中的头,以便它在HTTP请求中发送相同的头,并使用传入请求中的所述头来设置traceId?

您可以传播额外的字段,请参阅Spring Cloud Sleuth文档的传播部分。

spring:
sleuth:
propagation-keys: x-correlation-id

最新更新