【问题标题】:how to exclude some calls with the Feign from tracing with the cloud sleuth如何从使用云侦探的跟踪中排除一些使用 Feign 的调用
【发布时间】:2018-08-20 19:42:10
【问题描述】:

有一个微服务 spring-boot 1.5 使用 Feign 与其他服务通信,还有 spring-cloud-starter-zipkin,它通过 Feign 包装所有调用并将跟踪发送到 zipkin 服务器。 问题是我不想包装所有呼叫并跟踪它们,只有几个最重要的可以做到这一点。 如何从跟踪中排除一些使用 Feign 的调用(方法)或排除整个 Feign 客户端(接口)?

【问题讨论】:

    标签: spring-boot spring-cloud zipkin spring-cloud-sleuth


    【解决方案1】:

    在 Sleuth 1.3.x 中,您可以创建一个自定义 SpanReporter,在将跨度发送到 Zipkin 之前,它会分析 URL 并且不会报告该跨度。在 Sleuth 2.0.x 中,您可以为客户端创建自定义 HttpSampler(名称为 sleuthClientSampler

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-05-12
      • 2016-06-25
      • 2013-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多