forked from mirror/client_golang
Merge pull request #80 from peterbourgon/histogram-registry-fix
Fix for Histogram in registry.writePB
This commit is contained in:
commit
54238dea8f
|
@ -464,6 +464,8 @@ func (r *registry) writePB(w io.Writer, writeEncoded encoder) (int, error) {
|
||||||
metricFamily.Type = dto.MetricType_SUMMARY.Enum()
|
metricFamily.Type = dto.MetricType_SUMMARY.Enum()
|
||||||
case dtoMetric.Untyped != nil:
|
case dtoMetric.Untyped != nil:
|
||||||
metricFamily.Type = dto.MetricType_UNTYPED.Enum()
|
metricFamily.Type = dto.MetricType_UNTYPED.Enum()
|
||||||
|
case dtoMetric.Histogram != nil:
|
||||||
|
metricFamily.Type = dto.MetricType_HISTOGRAM.Enum()
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("empty metric collected: %s", dtoMetric)
|
return 0, fmt.Errorf("empty metric collected: %s", dtoMetric)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue