我们可以使用 sleuth、Spring Boot 来增加仅对错误/异常跨度进行采样的概率吗
我想仅增加对包含错误或异常的那些范围的采样。 如果可能的话该怎么做?
我正在使用 Spring boot(2.2+)、sleuth(2.2+) 和 zipkin(2.2+)。
I want to increase sampling of only those spans which contains error or exception.
If that's possible then how to do that?
I'm using Spring boot(2.2+), sleuth(2.2+) and zipkin(2.2+).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是 Brave(默认),您可以注册一个类型为 brave.handler.SpanHandler 的 bean,并在方法 end 中返回 false 如果 < code>MutableSpan 有任何错误。
If you're using Brave (which is the default) you can register a bean of type
brave.handler.SpanHandler
and over there in the methodend
return false if theMutableSpan
had any errors.