func()

in cmd/otelinmemexporter/store.go [136:153]


func (cfg *AggregationConfig) isEqualAttrs(
	name string,
	attrs, resAttrs pcommon.Map,
) bool {
	if cfg.Name != name {
		return false
	}
	if len(cfg.MatchLabelValues) > (attrs.Len() + resAttrs.Len()) {
		return false
	}
	for k, v := range cfg.MatchLabelValues {
		targetV := getValueFromMaps(k, attrs, resAttrs)
		if targetV.Type() == pcommon.ValueTypeEmpty || v != targetV.AsString() {
			return false
		}
	}
	return true
}