Merge pull request #413 from prometheus/beorn7/registry
Be more robust about nil pointers in protobuf
This commit is contained in:
commit
42bc0a18c2
|
@ -727,8 +727,8 @@ func checkMetricConsistency(
|
|||
}
|
||||
|
||||
for _, labelPair := range dtoMetric.GetLabel() {
|
||||
if !utf8.ValidString(*labelPair.Value) {
|
||||
return fmt.Errorf("collected metric's label %s is not utf8: %#v", *labelPair.Name, *labelPair.Value)
|
||||
if !utf8.ValidString(labelPair.GetValue()) {
|
||||
return fmt.Errorf("collected metric's label %s is not utf8: %#v", labelPair.GetName(), labelPair.GetValue())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue