Skip to content

Commit

Permalink
chore: added double_gauge case
Browse files Browse the repository at this point in the history
Signed-off-by: Juraj Michalek <[email protected]>
  • Loading branch information
jmichalek132 committed Oct 8, 2024
1 parent f1c7003 commit 0133574
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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 {
Expand Down

0 comments on commit 0133574

Please sign in to comment.