Skip to content

Commit

Permalink
make it more safer
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanvc committed Dec 22, 2023
1 parent 6f666c7 commit 15e70e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion prometheus/internal/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func NormalizeMetricFamilies(metricFamiliesByName map[string]*dto.MetricFamily)
result = append(result, mf)
}
sort.Slice(result, func(i, j int) bool {
return *result[i].Name < *result[j].Name
return result[i].GetName() < result[j].GetName()
})
return result
}

0 comments on commit 15e70e5

Please sign in to comment.