We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
append
copy
1 parent fae8896 commit 619eb59Copy full SHA for 619eb59
prometheus/registry.go
@@ -909,8 +909,8 @@ func checkDescConsistency(
909
}
910
911
// Is the desc consistent with the content of the metric?
912
- lpsFromDesc := make([]*dto.LabelPair, 0, len(dtoMetric.Label))
913
- lpsFromDesc = append(lpsFromDesc, desc.constLabelPairs...)
+ lpsFromDesc := make([]*dto.LabelPair, len(desc.constLabelPairs), len(dtoMetric.Label))
+ copy(lpsFromDesc, desc.constLabelPairs)
914
for _, l := range desc.variableLabels {
915
lpsFromDesc = append(lpsFromDesc, &dto.LabelPair{
916
Name: proto.String(l),
0 commit comments