Trace Sampling 2.0: Code Knowledge Enhanced Span-level Sampling for Distributed Tracing

Fuente: arXiv
Salvato in:
Dettagli Bibliografici
Autori principali: Wu, Yulun, Yu, Guangba, Jiang, Zhihan, Li, Yichen, Lyu, Michael R.
Natura: Preprint
Pubblicazione: 2025
Soggetti:
Accesso online:
Tags: Aggiungi Tag
Nessun Tag, puoi essere il primo ad aggiungerne!!
_version_ 1866909792725893120
author Wu, Yulun
Yu, Guangba
Jiang, Zhihan
Li, Yichen
Lyu, Michael R.
author_facet Wu, Yulun
Yu, Guangba
Jiang, Zhihan
Li, Yichen
Lyu, Michael R.
contents Distributed tracing is an essential diagnostic tool in microservice systems, but the sheer volume of traces places a significant burden on backend storage. A common approach to mitigating this issue is trace sampling, which selectively retains traces based on specific criteria, often preserving only anomalous ones. However, this method frequently discards valuable information, including normal traces that are essential for comparative analysis. To address this limitation, we introduce Trace Sampling 2.0, which operates at the span level while maintaining trace structure consistency. This approach allows for the retention of all traces while significantly reducing storage overhead. Based on this concept, we design and implement Autoscope, a span-level sampling method that leverages static analysis to extract execution logic, ensuring that critical spans are preserved without compromising structural integrity. We evaluated Autoscope on two open-source microservices. Our results show that it reduces trace size by 81.2% while maintaining 98.1% faulty span coverage, outperforming existing trace-level sampling methods. Furthermore, we demonstrate its effectiveness in root cause analysis, achieving an average improvement of 8.3%. These findings indicate that Autoscope can significantly enhance observability and storage efficiency in microservices, offering a robust solution for performance monitoring.
format Preprint
id arxiv_https___arxiv_org_abs_2509_13852
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Trace Sampling 2.0: Code Knowledge Enhanced Span-level Sampling for Distributed Tracing
Wu, Yulun
Yu, Guangba
Jiang, Zhihan
Li, Yichen
Lyu, Michael R.
Software Engineering
Distributed tracing is an essential diagnostic tool in microservice systems, but the sheer volume of traces places a significant burden on backend storage. A common approach to mitigating this issue is trace sampling, which selectively retains traces based on specific criteria, often preserving only anomalous ones. However, this method frequently discards valuable information, including normal traces that are essential for comparative analysis. To address this limitation, we introduce Trace Sampling 2.0, which operates at the span level while maintaining trace structure consistency. This approach allows for the retention of all traces while significantly reducing storage overhead. Based on this concept, we design and implement Autoscope, a span-level sampling method that leverages static analysis to extract execution logic, ensuring that critical spans are preserved without compromising structural integrity. We evaluated Autoscope on two open-source microservices. Our results show that it reduces trace size by 81.2% while maintaining 98.1% faulty span coverage, outperforming existing trace-level sampling methods. Furthermore, we demonstrate its effectiveness in root cause analysis, achieving an average improvement of 8.3%. These findings indicate that Autoscope can significantly enhance observability and storage efficiency in microservices, offering a robust solution for performance monitoring.
title Trace Sampling 2.0: Code Knowledge Enhanced Span-level Sampling for Distributed Tracing
topic Software Engineering
url https://arxiv.org/abs/2509.13852