Introduction
Modern cloud-native applications are built on complex microservice architectures that generate a staggering volume of observability data. For Site Reliability Engineers (SREs), defining effective alerts is a significant challenge: too many alerts lead to fatigue and false positives, while too few risks missing critical system failures. Traditionally, selecting which metrics to monitor requires deep manual expertise, which is increasingly impractical at scale.
KIMetrix is a data-driven framework designed to automatically identify the most "critical" subset of metrics for monitoring microservices. By combining information theory with service topology, it helps SREs find a minimal, high-coverage set for alerting without requiring manual expert labeling.
Methodology
The authors formalize the selection process as the Informative Metric Subset Problem, proving it is NP-complete. KIMetrix addresses this through three key algorithmic steps:
- Information-Theoretic Selection: The framework uses Entropy to rank metrics by their variability (informativeness) and Mutual Information to identify and prune redundant signals.
- Topology-Aware Refinement: Unlike "flat" approaches that treat services in isolation, KIMetrix processes services according to their topological order in a Directed Acyclic Graph (DAG). It uses metrics from upstream services as "pivots" to ensure downstream services aren't monitoring redundant signals already captured elsewhere.
- Dynamic Threshold Tuning (AIMD): To balance metric count and system coverage, KIMetrix employs an Additive Increase Multiplicative Decrease (AIMD) strategy, similar to TCP congestion control, to automatically find optimal parameters.
Experimental Evaluation
The framework was evaluated on two primary benchmarks: Quote of the Day (QoTD), an in-house application with 40 injected anomaly types, and DeathStarBench, a social networking site benchmark simulating real-world "gray failures."
Key Results
- Noise Reduction: On the QoTD dataset, KIMetrix reduced the metric space by over 70% while maintaining high coverage of anomalous events.
- Superior Coverage: Compared to standard methods like SelectKBest or mRMR, KIMetrix consistently achieved higher coverage (often >75%) for anomalies because it is unsupervised and does not rely on pre-labeled data.
- Efficiency Gains: The topology-aware approach is significantly faster than flat analysis. For the "Mix" dataset, execution time dropped from 6.9 hours to just 0.6 hours, making it practical for production environments.
Discussion and Insights
A core insight of KIMetrix is that redundancy is the enemy of efficient monitoring. High mutual information between metrics indicates they provide the same information; KIMetrix treats this as a budget-saving opportunity. Furthermore, the algorithm recognizes that rare paths matter more, adjusting sensitivity based on path probability to ensure subtle bugs in infrequent execution paths aren't overlooked.
By understanding the call graph, the system can "pivot" its selection. If a failure in an upstream service is already captured by its own metrics, dependent services do not need to monitor redundant signals, further streamlining the observability stack.
Conclusion and Future Work
While KIMetrix effectively reduces noise using structured metrics and traces, it currently omits the rich information found in unstructured logs. Future work will investigate incorporating log data in a lightweight manner to further refine metric selection and improve the detection of elusive "silent" failures.
Summary updated