《高性能 Rust tracing 库设计》
Speaker: Zhong Zhenzhi (钟镇炽) from PingCAP
Speaker Intro: Infrastructure Engineer in PingCAP
Similar to logging and metrics, tracing is intended to collect program runtime information. The difference is that tracing is request-scoped and it's useful for catching unexpected latency jitter and obtaining the performance issues of some kind of request. For performance-sensitive applications like TiKV, the tracing facility is carefully selected to avoid affecting performance. Minitrace, a timeline tracing library in Rust, tracing applications at the minimum cost, can be a good choice. We will talk about the details of Minitrace, to see how it provides: 1. High performance 2. Ergonomic API 3. Compatibility with OpenTracing. Tracing 是和日志、监控指标相似的用于收集程序执行信息的手段。Tracing 将精度提高到了单个请求级别,解决了日志和监控指标用于分析延迟抖动、性能瓶颈时的痛点。本次演讲将介绍如何在 TiKV 这样对性能极端敏感的项目中引入 Tracing,以及为此我们打造的一个追求极致性能的 Tracing 库 -- Minitrace 如何实现高性能、高易用性以及兼容 OpenTracing 协议。