diff --git a/pkg/translator/prometheusremotewrite/number_data_points_v2_test.go b/pkg/translator/prometheusremotewrite/number_data_points_v2_test.go index a3368a11860d..d59563aae92d 100644 --- a/pkg/translator/prometheusremotewrite/number_data_points_v2_test.go +++ b/pkg/translator/prometheusremotewrite/number_data_points_v2_test.go @@ -26,7 +26,7 @@ func TestPrometheusConverterV2_addGaugeNumberDataPoints(t *testing.T) { want func() map[uint64]*writev2.TimeSeries }{ { - name: "gauge", + name: "int_gauge", metric: func() pmetric.Metric { return getIntGaugeMetric( "test", @@ -51,6 +51,32 @@ func TestPrometheusConverterV2_addGaugeNumberDataPoints(t *testing.T) { } }, }, + { + name: "double_gauge", + metric: func() pmetric.Metric { + return getDoubleGaugeMetric( + "test", + pcommon.NewMap(), + 1, ts, + ) + }, + want: func() map[uint64]*writev2.TimeSeries { + labels := labels.Labels{ + labels.Label{ + Name: labels.MetricName, + Value: "test", + }, + } + return map[uint64]*writev2.TimeSeries{ + labels.Hash(): { + LabelsRefs: []uint32{1, 2}, + Samples: []writev2.Sample{ + {Timestamp: convertTimeStamp(pcommon.Timestamp(ts)), Value: 1}, + }, + }, + } + }, + }, { name: "gauge with staleNaN", metric: func() pmetric.Metric {