SpringCloud Spring Integration和Spring Cloud Stream

2023-12-03 18:55 更新

Spring Cloud Sleuth与Spring Integration集成它为发布和订阅事件创建spans。要禁用Spring Integration检测,请将​​spring.sleuth.integration.enabled设置为false

您可以提供spring.sleuth.integration.patterns模式来显式提供要包括以进行跟踪的通道的名称。默认情况下,除hystrixStreamOutput通道以外的所有通道都包括在内。

 使用Executor构建Spring Integration IntegrationFlow时,必须使用Executor的未跟踪版本。TraceableExecutorService装饰Spring Integration执行器通道会导致spans被不正确地关闭。

如果要自定义从消息头读取和向消息头写入跟踪上下文的方式,就足以注册类型的beans:

  • Propagation.Setter<MessageHeaderAccessor, String>-用于将标头写入消息
  • Propagation.Getter<MessageHeaderAccessor, String>-用于从邮件中读取标题
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号