Tracezip: Efficient Distributed Tracing via Trace Compression

📅 2025-02-10
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Sampling in distributed tracing inherently trades off trace completeness against overhead, hindering high-fidelity monitoring. Method: This paper proposes an end-to-end compression framework featuring a novel Span Retrieval Tree (SRT) data structure—enabling lightweight server-side encoding and lossless backend reconstruction—complemented by redundancy-aware compression, differential synchronization, and SRT-optimized structural pruning to eliminate cross-service span duplication. Contribution/Results: Deeply integrated into OpenTelemetry Collector, the approach is rigorously evaluated on microservice benchmarks, cloud deployments, and real production traces. It achieves near-negligible transmission and storage overhead while preserving 100% trace completeness. The solution has been adopted into the OpenTelemetry ecosystem, establishing a new paradigm for high-fidelity, low-overhead distributed tracing.

Technology Category

Application Category

📝 Abstract
Distributed tracing serves as a fundamental building block in the monitoring and testing of cloud service systems. To reduce computational and storage overheads, the de facto practice is to capture fewer traces via sampling. However, existing work faces a trade-off between the completeness of tracing and system overhead. On one hand, head-based sampling indiscriminately selects requests to trace when they enter the system, which may miss critical events. On the other hand, tail-based sampling traces all requests and selectively persist the edge-case traces, which entails the overheads related to trace collection and ingestion. Taking a different path, in this paper we propose Tracezip to enhance the efficiency of distributed tracing via trace compression. Our key insight is that there exists significant redundancy among traces, which results in repetitive transmission of identical data between the services and backend. We design a new data structure named Span Retrieval Tree (SRT) that continuously encapsulates such redundancy at the service side and transforms trace spans into a lightweight form. At the backend, the full traces can be seamlessly reconstructed by retrieving the common data already delivered by previous spans. Tracezip includes a series of strategies to optimize the structure of SRT and a differential update mechanism to efficiently synchronize SRT between services and backend. Our evaluation on microservices benchmarks, popular cloud service systems, and production trace data demonstrate that Tracezip can achieve substantial performance gains in trace collection, with negligible overhead. We have implemented Tracezip inside OpenTelemetry Collector, making it compatible with existing tracing APIs.
Problem

Research questions and friction points this paper is trying to address.

Reduce overhead in distributed tracing
Enhance trace completeness via compression
Optimize trace data structure and synchronization
Innovation

Methods, ideas, or system contributions that make the work stand out.

Tracezip enhances distributed tracing efficiency
Span Retrieval Tree reduces trace redundancy
Differential update mechanism ensures SRT synchronization