春天云侦探与春云流

问题描述 投票:0回答:1

我们正在使用Spring Cloud Stream(使用Kafka活页夹)构建事件驱动的微服务,并查看用于跟踪未作为http端点公开的Micorservices的选项。请建议。

据我所知,使用Sleuth会自动将trace和span id添加到日志中,如果它超过http。使用Spring Cloud Stream(https://cloud.spring.io/spring-cloud-sleuth/spring-cloud-sleuth#_messaging)的文档并不清楚

找到了一个例子,但不确定它是否是正确的方法 - https://github.com/bjedrzejewski/food-order-publisher/blob/zipkin-example/src/main/java/com/e4developer/foodorderpublisher/FoodOrderController.java

谢谢

spring-cloud-stream spring-cloud-sleuth
1个回答
1
投票

Sleuth将通过使用消息头传播span id,trace id和其他相关信息来进行消息传递。它通过注册特殊的通道拦截器来实现。

© www.soinside.com 2019 - 2024. All rights reserved.