in hub/hub.go [396:408]
func makeLabeledName(metric *dto.Metric, metricName string) string {
labels := metric.GetLabel()
sort.Slice(labels, func(i, j int) bool {
return labels[i].GetName() < labels[j].GetName()
})
labeledName := strings.Builder{}
labeledName.WriteString(metricName)
for _, labelPair := range labels {
labeledName.WriteString(fmt.Sprintf("_%s_%s", labelPair.GetName(), labelPair.GetValue()))
}
return labeledName.String()
}