Spring 云侦探:与其他 header 键中的相关 ID 集成(不是 X-Trace-Id,而是例如 myCorrelationId)

Spring cloud sleuth: integrating with correlation id in other header key (not X-Trace-Id but e.g. myCorrelationId)

我们有一个现有的关联 ID 功能,它在 myCorrelationId HTTP header 中存储关联 ID(在 JMS 上下文、SOAP Header 等中也类似)。此功能用于许多应用程序。

最好使用 spring 侦探新应用程序并能够与现有应用程序进行互操作。

据我了解 spring cloud sleuth,它还没有提供这样的集成(查找可能存在的关联 ID 的关键 X-Trace-Id 是硬编码的,而不是在一个中心位置进行抽象) .

我理解您担心占用太多 header 个键 (https://gitlab.com/dsyer/spring-cloud-sleuth/issues/11)。支持映射传入的相关 ID(即将 myCorrelationId 的内容映射到 X-Trace-Id)已经解决了一些问题。

你打算支持这样的整合吗?您将如何为此调整侦探?

正在进行中 - https://github.com/spring-cloud/spring-cloud-sleuth/issues/19。我们正在尽最大努力为 RC1 完成它。