Skip to content

Commit

Permalink
Remove unique ValueKey constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
ronensc committed Mar 15, 2022
1 parent ef70698 commit c0f17db
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions pkg/confgen/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,7 @@ func (cg *ConfGen) parseEncode(encode *map[string]interface{}) (*api.PromEncode,
log.Debugf("Unmarshal aggregate.Definitions err: %v ", err)
return nil, err
}

// validate that ValueKey is unique
for _, existingPromMetric := range cg.promMetrics {
for _, newPromMetric := range prom.Metrics {
if existingPromMetric.ValueKey == newPromMetric.ValueKey {
log.Panicf("error in parseEncode: ValueKey %s overlaps, metric encoding ignored !!!! ", newPromMetric.ValueKey)
return nil, err
}
}
}


cg.promMetrics = append(cg.promMetrics, prom.Metrics...)
return &prom, nil
}

0 comments on commit c0f17db

Please sign in to comment.