Skip to content

Commit 9f1d06b

Browse files
fix: Add JVM metric loaders to SimpleStrategy metrics list
- Add MaxJVMMemoryLoader and JVMMemoryAmountLoader to metrics property - Fix KeyError when processing JVM workloads - Resolve unused import warnings for JVM metric loaders This change ensures that JVM-specific metrics are properly collected when a JVM application is detected, preventing runtime KeyError exceptions in __calculate_memory_proposal method.
1 parent a6067d0 commit 9f1d06b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

robusta_krr/strategies/simple.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ def metrics(self) -> list[type[PrometheusMetric]]:
9191
CPUAmountLoader,
9292
MemoryAmountLoader,
9393
JVMDetector,
94+
MaxJVMMemoryLoader,
95+
JVMMemoryAmountLoader,
9496
]
9597

9698
if self.settings.use_oomkill_data:

0 commit comments

Comments
 (0)