- if configOk {
- metrics, metricsOk := config.(map[string]interface{})["metrics"]
- if metricsOk {
- parseMetricsRules(metrics.([]interface{}), appMetrics)
+ if !configOk {
+ logger.Info("No xApp config found!")
+ continue
+ }
+ measurements, measurementsOk := config.(map[string]interface{})["measurements"]
+ if !measurementsOk {
+ logger.Info("No xApp metrics found!")
+ continue
+ }
+
+ for _, m := range measurements.([]interface{}) {
+ measId, measIdOk := m.(map[string]interface{})["measId"].(string)
+ measObject, objectOk := m.(map[string]interface{})["object"].(string)
+ metrics, metricsOk := m.(map[string]interface{})["metrics"]
+ if !metricsOk || !measIdOk || !objectOk {
+ logger.Info("No metrics found for measId=%s Object=%s", measId, measObject)
+ continue