8. 仪器仪表

Spring Cloud Sleuth会自动对所有Spring应用进行仪表化,因此你不需要做任何操作就可以激活它。应用层的自动检测是通过不同的技术实现的,比如对于servlet类型的web应用,我们使用了一个Filter,对于Spring Integration,我们使用了ChannelInterceptorsspring-doc.cadn.net.cn

您可以自定义 span 标记中使用的键。要限制 span 数据的量,对 HTTP 请求的默认配置仅包含少量元数据,例如状态代码、主机和 URL。您可以通过配置 spring.sleuth.keys.http.headers(标头名称列表)来添加请求标头。spring-doc.cadn.net.cn

0 that allows it. by default, there is no such Sampler, to ensure that there is no danger of accidentally collecting too much data without configuring something).