{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,7,7]],"date-time":"2026-07-07T02:39:39Z","timestamp":1783391979024,"version":"3.54.6"},"reference-count":57,"publisher":"Association for Computing Machinery (ACM)","issue":"FSE","license":[{"start":{"date-parts":[[2024,7,12]],"date-time":"2024-07-12T00:00:00Z","timestamp":1720742400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/www.acm.org\/publications\/policies\/copyright_policy#Background"}],"funder":[{"DOI":"10.13039\/501100021171","name":"Guangdong Basic and Applied Basic Research Foundation","doi-asserted-by":"crossref","award":["No.2023B1515020054"],"award-info":[{"award-number":["No.2023B1515020054"]}],"id":[{"id":"10.13039\/501100021171","id-type":"DOI","asserted-by":"crossref"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Proc. ACM Softw. Eng."],"published-print":{"date-parts":[[2024,7,12]]},"abstract":"<jats:p>Distributed tracing has been widely adopted in many microservice systems and plays an important role in monitoring and analyzing the system. However, trace data often come in large volumes, incurring substantial computational and storage costs. To reduce the quantity of traces, trace sampling has become a prominent topic of discussion, and several methods have been proposed in prior work. To attain higher-quality sampling outcomes, biased sampling has gained more attention compared to random sampling. Previous biased sampling methods primarily considered the importance of traces based on diversity, aiming to sample more edge-case traces and fewer common-case traces. However, we contend that relying solely on trace diversity for sampling is insufficient, system runtime state is another crucial factor that needs to be considered, especially in cases of system failures. In this study, we introduce TraStrainer, an online sampler that takes into account both system runtime state and trace diversity. TraStrainer employs an interpretable and automated encoding method to represent traces as vectors. Simultaneously, it adaptively determines sampling preferences by analyzing system runtime metrics. When sampling, it combines the results of system-bias and diversity-bias through a dynamic voting mechanism. Experimental results demonstrate that TraStrainer can achieve higher quality sampling results and significantly improve the performance of downstream root cause analysis (RCA) tasks. It has led to an average increase of 32.63% in Top-1 RCA accuracy compared to four baselines in two datasets.<\/jats:p>","DOI":"10.1145\/3643748","type":"journal-article","created":{"date-parts":[[2024,7,12]],"date-time":"2024-07-12T10:22:09Z","timestamp":1720779729000},"page":"473-493","source":"Crossref","is-referenced-by-count":6,"title":["TraStrainer: Adaptive Sampling for Distributed Traces with System Runtime State"],"prefix":"10.1145","volume":"1","author":[{"ORCID":"https:\/\/orcid.org\/0009-0000-6146-2493","authenticated-orcid":false,"given":"Haiyu","family":"Huang","sequence":"first","affiliation":[{"name":"Sun Yat-sen University, Guangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-3458-8706","authenticated-orcid":false,"given":"Xiaoyu","family":"Zhang","sequence":"additional","affiliation":[{"name":"Huawei, Shenzhen, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-0972-6900","authenticated-orcid":false,"given":"Pengfei","family":"Chen","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Guangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7963-082X","authenticated-orcid":false,"given":"Zilong","family":"He","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Guangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0009-0004-9554-2626","authenticated-orcid":false,"given":"Zhiming","family":"Chen","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Guangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-6195-9088","authenticated-orcid":false,"given":"Guangba","family":"Yu","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Guangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-9419-3768","authenticated-orcid":false,"given":"Hongyang","family":"Chen","sequence":"additional","affiliation":[{"name":"Sun Yat-sen University, Guangzhou, China"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0003-2480-2350","authenticated-orcid":false,"given":"Chen","family":"Sun","sequence":"additional","affiliation":[{"name":"Huawei, Beijing, China"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"320","published-online":{"date-parts":[[2024,7,12]]},"reference":[{"key":"e_1_3_1_2_2","unstructured":"2023. Kubernetes Homepage. http:\/\/kubernetes.io\/. [Online]."},{"key":"e_1_3_1_3_2","unstructured":"2023. Zipkin Homepage. https:\/\/zipkin.io. [Online]."},{"key":"e_1_3_1_4_2","doi-asserted-by":"publisher","DOI":"10.1145\/2909480"},{"key":"e_1_3_1_5_2","unstructured":"Chaosblade. 2023. Chaosblade. https:\/\/github.com\/chaosblade-io\/chaosblade. Accessed Jan. 6 2023."},{"key":"e_1_3_1_6_2","volume-title":"Time-series forecasting","year":"2000","unstructured":"Chris Chatfield. 2000. Time-series forecasting. CRC press."},{"key":"e_1_3_1_7_2","first-page":"373","article-title":"Deep Attentive Anomaly Detection for Microservice Systems with Multimodal Time-Series Data","author":"Chen Yufu","year":"2022","unstructured":"Yufu Chen, Meng Yan, Dan Yang, Xiaohong Zhang, and Ziliang Wang. 2022. Deep Attentive Anomaly Detection for Microservice Systems with Multimodal Time-Series Data. In ICWS 2022. IEEE, 373\u2013378.","journal-title":"ICWS 2022"},{"key":"e_1_3_1_8_2","article-title":"{X-Trace} : A pervasive network tracing framework","author":"Fonseca Rodrigo","year":"2007","unstructured":"Rodrigo Fonseca, George Porter, Randy H Katz, and Scott Shenker. 2007. {X-Trace} : A pervasive network tracing framework. In 4th USENIX Symposium on Networked Systems Design & Implementation (NSDI 07).","journal-title":"4th USENIX Symposium on Networked Systems Design & Implementation (NSDI 07)"},{"key":"e_1_3_1_9_2","doi-asserted-by":"publisher","DOI":"10.1080\/00031305.1989.10475612"},{"key":"e_1_3_1_10_2","unstructured":"FudanSELab. 2023. TrainTicket. https:\/\/github.com\/FudanSELab\/train-ticket. Accessed Jan. 6 2023."},{"key":"e_1_3_1_11_2","doi-asserted-by":"publisher","DOI":"10.1145\/3445814.3446700"},{"key":"e_1_3_1_12_2","article-title":"SampleHST: Efficient On-the-Fly Selection of Distributed Traces","author":"Gias Alim Ul","year":"2022","unstructured":"Alim Ul Gias, Yicheng Gao, Matthew Sheldon, Jos\u00e9 A. Perusqu\u00eda, Owen O\u2019Brien, and Giuliano Casale. 2022. SampleHST: Efficient On-the-Fly Selection of Distributed Traces. arXiv:2210.04595 [cs.DC]","journal-title":"arXiv:2210.04595 [cs.DC]"},{"key":"e_1_3_1_13_2","unstructured":"GoogleCloudPlatform. 2023. OnlineBoutique. https:\/\/github.com\/GoogleCloudPlatform\/microservices-demo. Accessed Jan. 6 2023."},{"key":"e_1_3_1_14_2","unstructured":"Grafana. 2023. Grafana Tempo. https:\/\/github.com\/grafana\/tempo. [Online]."},{"key":"e_1_3_1_15_2","doi-asserted-by":"publisher","DOI":"10.1145\/3368089.3417066"},{"key":"e_1_3_1_16_2","doi-asserted-by":"publisher","DOI":"10.1145\/3472883.3486994"},{"key":"e_1_3_1_17_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICWS53863.2021.00063"},{"key":"e_1_3_1_18_2","doi-asserted-by":"crossref","unstructured":"jaeger. 2023. Jaeger. https:\/\/www.jaegertracing.io\/. Accessed: 2023\/7\/14.","DOI":"10.3917\/vsoc.227.0007"},{"key":"e_1_3_1_19_2","doi-asserted-by":"publisher","DOI":"10.1145\/3132747.3132749"},{"key":"e_1_3_1_20_2","unstructured":"Kmaork. 2023. Hypno. https:\/\/docs.aws.amazon.com\/prescriptive-guidance\/latest\/implementing-logging-monitoring-cloudwatch\/configure-cloudwatch-ec2-on-premises.html. Accessed Jan. 6 2023."},{"key":"e_1_3_1_21_2","doi-asserted-by":"publisher","DOI":"10.1145\/3267809.3267841"},{"key":"e_1_3_1_22_2","doi-asserted-by":"publisher","DOI":"10.1145\/3357223.3362736"},{"key":"e_1_3_1_23_2","first-page":"3","volume-title":"SIGCOMM 2019","author":"Li Xing","year":"2019","unstructured":"Xing Li, Yan Chen, and Zhiqiang Lin. 2019. Towards automated inter-service authorization for microservice applications. In SIGCOMM 2019. ACM, 3\u20135."},{"key":"e_1_3_1_24_2","doi-asserted-by":"publisher","DOI":"10.1109\/IWQOS52092.2021.9521340"},{"key":"e_1_3_1_25_2","doi-asserted-by":"publisher","DOI":"10.1007\/978-3-030-03596-9_1"},{"key":"e_1_3_1_26_2","doi-asserted-by":"publisher","DOI":"10.1109\/ICSE-SEIP52600.2021.00043"},{"key":"e_1_3_1_27_2","doi-asserted-by":"publisher","DOI":"10.1109\/ISSRE5003.2020.00014"},{"key":"e_1_3_1_28_2","doi-asserted-by":"publisher","DOI":"10.1109\/CLOUD.2019.00038"},{"key":"e_1_3_1_29_2","doi-asserted-by":"publisher","DOI":"10.1109\/CLOUD.2019.00038"},{"key":"e_1_3_1_30_2","first-page":"380","article-title":"Using of Jaccard coefficient for keywords similarity","volume":"1","author":"Niwattanakul Suphakit","year":"2013","unstructured":"Suphakit Niwattanakul, Jatsada Singthongchai, Ekkachai Naenudorn, and Supachanun Wanapu. 2013. Using of Jaccard coefficient for keywords similarity. In Proceedings of the international multiconference of engineers and computer scientists, Vol. 1. 380\u2013384.","journal-title":"Proceedings of the international multiconference of engineers and computer scientists"},{"key":"e_1_3_1_31_2","unstructured":"Opentelemetry. 2023. Opentelemetry. https:\/\/opentelemetry.io. Accessed: 2023\/7\/14."},{"key":"e_1_3_1_32_2","unstructured":"Opentelemetry. 2023. OpenTelemetry Collector. https:\/\/github.com\/open-telemetry\/opentelemetry-collector. [Online]."},{"key":"e_1_3_1_33_2","unstructured":"Opentelemetry. 2023. Opentelemetry span-events concept. https:\/\/opentelemetry.io\/docs\/concepts\/signals\/traces\/#span-events. Accessed: 2023\/7\/14."},{"key":"e_1_3_1_34_2","volume-title":"Distributed tracing in practice: Instrumenting, analyzing, and debugging microservices","author":"Parker Austin","year":"2020","unstructured":"Austin Parker, Daniel Spoonhower, Jonathan Mace, Ben Sigelman, and Rebecca Isaacs. 2020. Distributed tracing in practice: Instrumenting, analyzing, and debugging microservices. O\u2019Reilly Media."},{"key":"e_1_3_1_35_2","first-page":"432","article-title":"The Use of Program Profiling for Software Maintenance with Applications to the Year 2000 Problem","author":"Reps Thomas W.","year":"1997","unstructured":"Thomas W. Reps, Thomas Ball, Manuvir Das, and James R. Larus. 1997. The Use of Program Profiling for Software Maintenance with Applications to the Year 2000 Problem. In 6th European Software Engineering Conference Held Jointly with the 5th ACM SIGSOFT Symposium on Foundations of Software Engineering. 432\u2013449.","journal-title":"6th European Software Engineering Conference Held Jointly with the 5th ACM SIGSOFT Symposium on Foundations of Software Engineering"},{"key":"e_1_3_1_36_2","doi-asserted-by":"publisher","DOI":"10.1109\/CLOUD55607.2022.00072"},{"key":"e_1_3_1_37_2","doi-asserted-by":"crossref","DOI":"10.1016\/j.physd.2019.132306","article-title":"Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network","author":"Sherstinsky Alex","year":"2020","unstructured":"Alex Sherstinsky. 2020. Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network. Physica D: Nonlinear Phenomena 404 (2020), 132306.","journal-title":"Physica D: Nonlinear Phenomena 404 (2020)"},{"key":"e_1_3_1_38_2","unstructured":"Benjamin H Sigelman Luiz Andre Barroso Mike Burrows Pat Stephenson Manoj Plakal Donald Beaver Saul Jaspan and Chandan Shanbhag. 2010. Dapper a large-scale distributed systems tracing infrastructure. (2010)."},{"key":"e_1_3_1_39_2","unstructured":"Apache SkyWalking. 2023. Apache SkyWalking. https:\/\/skywalking.apache.org. Accessed July. 6 2023."},{"key":"e_1_3_1_40_2","volume-title":"Distributed systems observability: a guide to building robust systems","author":"Sridharan Cindy","year":"2018","unstructured":"Cindy Sridharan. 2018. Distributed systems observability: a guide to building robust systems. O\u2019Reilly Media."},{"key":"e_1_3_1_41_2","unstructured":"TraStrainer. 2024. TraStrainer implementation. https:\/\/github.com\/IntelligentDDS\/TraStrainer. Accessed Feb. 20 2024."},{"key":"e_1_3_1_42_2","article-title":"Attention is all you need","volume":"30","author":"Vaswani Ashish","year":"2017","unstructured":"Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. Advances in neural information processing systems 30 (2017).","journal-title":"Advances in neural information processing systems"},{"issue":"2021","key":"e_1_3_1_43_2","first-page":"22419","article-title":"Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting","volume":"34","author":"Wu Haixu","year":"2021","unstructured":"Haixu Wu, Jiehui Xu, Jianmin Wang, and Mingsheng Long. 2021. Autoformer: Decomposition transformers with auto-correlation for long-term series forecasting. Advances in Neural Information Processing Systems 34(2021), 22419\u201322430.","journal-title":"Advances in Neural Information Processing Systems"},{"key":"e_1_3_1_44_2","doi-asserted-by":"publisher","DOI":"10.1109\/CCGrid51090.2021.00051"},{"key":"e_1_3_1_45_2","doi-asserted-by":"publisher","DOI":"10.1145\/2043556.2043572"},{"key":"e_1_3_1_46_2","first-page":"3087","article-title":"MicroRank: End-to-End Latency Issue Localization with Extended Spectrum Analysis in Microservice Environments","author":"Yu Guangba","year":"2021","unstructured":"Guangba Yu, Pengfei Chen, Hongyang Chen, Zijie Guan, Zicheng Huang, Linxiao Jing, Tianjun Weng, Xinmeng Sun, and Xiaoyun Li. 2021. MicroRank: End-to-End Latency Issue Localization with Extended Spectrum Analysis in Microservice Environments. In WWW 2021. ACM, 3087\u20133098.","journal-title":"WWW 2021"},{"key":"e_1_3_1_47_2","first-page":"1763","article-title":"LogReducer: Identify and Reduce Log Hotspots in Kernel on the Fly","author":"Yu Guangba","year":"2023","unstructured":"Guangba Yu, Pengfei Chen, Pairui Li, Tianjun Weng, Haibing Zheng, Yuetang Deng, and Zibin Zheng. 2023. LogReducer: Identify and Reduce Log Hotspots in Kernel on the Fly. In ICSE 2023. 1763\u20131775.","journal-title":"ICSE 2023"},{"key":"e_1_3_1_48_2","doi-asserted-by":"publisher","DOI":"10.1145\/3611643.3616249"},{"key":"e_1_3_1_49_2","first-page":"68","article-title":"Microscaler: Automatic Scaling for Microservices with an Online Learning Approach","author":"Yu Guangba","year":"2019","unstructured":"Guangba Yu, Pengfei Chen, and Zibin Zheng. 2019. Microscaler: Automatic Scaling for Microservices with an Online Learning Approach. In ICWS 2019. IEEE, 68\u201375.","journal-title":"ICWS 2019"},{"key":"e_1_3_1_50_2","doi-asserted-by":"crossref","first-page":"11121","DOI":"10.1609\/aaai.v37i9.26317","article-title":"Are transformers effective for time series forecasting?","volume":"37","author":"Zeng Ailing","year":"2023","unstructured":"Ailing Zeng, Muxi Chen, Lei Zhang, and Qiang Xu. 2023. Are transformers effective for time series forecasting?. In Proceedings of the AAAI conference on artificial intelligence, Vol. 37. 11121\u201311128.","journal-title":"Proceedings of the AAAI conference on artificial intelligence"},{"key":"e_1_3_1_51_2","first-page":"623","article-title":"DeepTraLog: Trace-Log Combined Microservice Anomaly Detection through Graph-based Deep Learning","author":"Zhang Chenxi","year":"2022","unstructured":"Chenxi Zhang, Xin Peng, Chaofeng Sha, Ke Zhang, Zhenqing Fu, Xiya Wu, Qingwei Lin, and Dongmei Zhang. 2022. DeepTraLog: Trace-Log Combined Microservice Anomaly Detection through Graph-based Deep Learning. In ICSE 2022. IEEE, 623\u2013634.","journal-title":"ICSE 2022"},{"key":"e_1_3_1_52_2","first-page":"1221","article-title":"TraceCRL: Contrastive Representation Learning for Microservice Trace Analysis","author":"Zhang Chenxi","year":"2022","unstructured":"Chenxi Zhang, Xin Peng, Tong Zhou, Chaofeng Sha, Zhenghui Yan, Yiru Chen, and Hong Yang. 2022. TraceCRL: Contrastive Representation Learning for Microservice Trace Analysis. In ESEC\/FSE 2022. ACM, 1221\u20131232.","journal-title":"ESEC\/FSE 2022"},{"key":"e_1_3_1_53_2","first-page":"321","article-title":"The Benefit of Hindsight: Tracing {Edge-Cases} in Distributed Systems","author":"Zhang Lei","year":"2023","unstructured":"Lei Zhang, Zhiqiang Xie, Vaastav Anand, Ymir Vigfusson, and Jonathan Mace. 2023. The Benefit of Hindsight: Tracing {Edge-Cases} in Distributed Systems. In 20th USENIX Symposium on Networked Systems Design and Implementation (NSDI 23). 321\u2013339.","journal-title":"20th USENIX Symposium on Networked Systems Design and Implementation (NSDI 23)"},{"key":"e_1_3_1_54_2","first-page":"149","article-title":"Overload Control for Scaling WeChat Microservices","author":"Zhou Hao","year":"2018","unstructured":"Hao Zhou, Ming Chen, Qian Lin, Yong Wang, Xiaobin She, Sifan Liu, Rui Gu, Beng Chin Ooi, and Junfeng Yang. 2018. Overload Control for Scaling WeChat Microservices. In SoCC 2018. ACM, 149\u2013161.","journal-title":"SoCC 2018"},{"key":"e_1_3_1_55_2","first-page":"27268","volume-title":"International Conference on Machine Learning","author":"Zhou Tian","year":"2022","unstructured":"Tian Zhou, Ziqing Ma, Qingsong Wen, Xue Wang, Liang Sun, and Rong Jin. 2022. Fedformer: Frequency enhanced decomposed transformer for long-term series forecasting. In International Conference on Machine Learning. PMLR, 27268\u201327286."},{"key":"e_1_3_1_56_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2018.2887384"},{"key":"e_1_3_1_57_2","doi-asserted-by":"publisher","DOI":"10.1109\/TSE.2018.2887384"},{"key":"e_1_3_1_58_2","unstructured":"Zhenyi Zhu. 2022. Anomaly detection over time series data. (2022)."}],"container-title":["Proceedings of the ACM on Software Engineering"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3643748","content-type":"unspecified","content-version":"vor","intended-application":"text-mining"},{"URL":"https:\/\/dl.acm.org\/doi\/pdf\/10.1145\/3643748","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,2,4]],"date-time":"2026-02-04T08:04:36Z","timestamp":1770192276000},"score":1,"resource":{"primary":{"URL":"https:\/\/dl.acm.org\/doi\/10.1145\/3643748"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2024,7,12]]},"references-count":57,"journal-issue":{"issue":"FSE","published-print":{"date-parts":[[2024,7,12]]}},"alternative-id":["10.1145\/3643748"],"URL":"https:\/\/doi.org\/10.1145\/3643748","relation":{},"ISSN":["2994-970X"],"issn-type":[{"value":"2994-970X","type":"electronic"}],"subject":[],"published":{"date-parts":[[2024,7,12]]}}}