## 4 Motivations and the Main Contributions  
A common method for troubleshooting applications involves utilizing Traces Browser or Application Maps, which enable the examination of malfunctioning microservices. These tools allow for the isolation of trace traffic, facilitating the feeding of trace data into the browser for an in-depth analysis of traces and spans. Following this manual investigative process, the metadata associated with the spans can uncover underlying issues and suggest potential remediation procedures. However, those approaches have serious drawbacks. The volume of traces without sampling is so large that it is not feasible to draw the Application Maps within a realistic period. Moreover, manual inspection requires expertise and a thorough understanding of the application's internal flows. Additionally, it does not allow us to properly automate the procedure in case of many applications, traces, and spans. Our primary objective was to automate and optimize this intricate process using ML methodologies, focusing on achieving explanations through XAI solutions such as RIPPER or Dempster-Shafer theory. However, we encountered a significant challenge due to the overwhelming volume of traces, even after the initial stage of head-based sampling. Hence, the critical task was the identification of effective sampling strategies to tackle this issue. Deliberating between ML approaches and simpler statistical methods, we initially opted for the latter for several reasons, including leveraging expert knowledge, maintaining transparency, and retaining control over the sampling process. This decision led us to develop a dynamic streaming solution that proved highly practical. Our next goal was to assess the impact of this sampling technique on XAI methods. This paper's contribution is multi-fold. We discuss the trace sampling approach that has been successfully implemented, and demonstrate its capability for diverse applications. We developed application trace sampling technology that leverages the statistical properties of traces, such as type, duration, and errors. It is easy to implement and has serious benefits compared to more sophisticated ML approaches. Statistical methods provide more interpretable results. This transparency can be crucial for understanding the underlying processes or relationships in the data. The corresponding parameters are easy to fine-tune and control. Statistical methods are built on clear assumptions about the data distribution, which can help to guide the analysis and ensure the validity of the results. In contrast, ML models are more ambivalent to data assumptions, which can sometimes lead to unexpected or inaccurate outcomes. Our approach is suitable for limited data availability. ML models, on the other hand, often require larger datasets to achieve reliable performance. Statistical methods often allow for the easier incorporation of domain knowledge or expert insights into the analysis process, enhancing the interpretability and relevance of the results. Then, we explore the impact of sampling on application troubleshooting. We demonstrated that sampling positively impacted rule-learning systems by reducing time and generating clearer rules. Hence, sample size reduction does not impact the efficiency of the application troubleshooting approach. We also experimented with the Dempster-Shafer classifier, which was successfully implemented and proved applicable to the RCA in different IT issues. However, the efficiency of ML strategies is an open problem. There is a compelling need to explore ML solutions for sampling that offer enhanced scalability, speed, and accuracy, particularly in application domains where such capabilities are crucial [68; 69; 70; 71]. One of the important problems is related to trace type identification. ML methods can categorize traces based on specific characteristics or outcomes as a supervised learning problem. Alternatively, clustering approaches can be used to group similar traces together based on patterns or similarities.