Skip to content

Commit 40785d6

Browse files
committed
fix(test): allow for summary and histogram types to be emit
1 parent 452ca91 commit 40785d6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

pkg/util/metrics/helpers.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ func ParsePrometheusMetrics(metricsText string) ([]Float64MetricRepresentation,
5858
value = *metric.Counter.Value
5959
case pcm.MetricType_GAUGE:
6060
value = *metric.Gauge.Value
61+
case pcm.MetricType_SUMMARY:
62+
value = *metric.Summary.SampleSum
63+
case pcm.MetricType_HISTOGRAM:
64+
value = *metric.Histogram.SampleSum
6165
default:
6266
return metrics, fmt.Errorf("unexpected MetricType %s for metric %s",
6367
pcm.MetricType_name[int32(*metricFamily.Type)], *metricFamily.Name)

0 commit comments

Comments
 (0)