With the expansion of microservice-based applications over time, the number of microservices rises, resulting in an augmentation of the volume of performance metrics. Consequently, selecting the appropriate performance metrics for anomaly detection becomes a critical challenge. Since these performance metrics are typically strongly correlated with timestamps, they form time series data comprising timestamp–value pairs. To address this, we propose SRdetector, a feature-enhanced Transformer-based model that adopts a time series forecasting approach to detect anomalies in microservices. Furthermore, we integrate a dynamic weight adjustment mechanism into the original Transformer attention mechanism to assign weights to different performance and temporal features. This enables the model to dynamically learn the significance of various features at different time intervals, effectively serving as a feature selection method for microservice performance metrics. Finally, anomaly detection in microservices is conducted by evaluating the predicted performance metric data based on confidence intervals.
Read full abstract