Skip to content

Commit

Permalink
Fix usage of deprecated funcs that work with mutable slices (open-tel…
Browse files Browse the repository at this point in the history
…emetry#12867)

Signed-off-by: Bogdan Drutu <[email protected]>
  • Loading branch information
bogdandrutu committed Aug 1, 2022
1 parent 80a2337 commit b150f19
Show file tree
Hide file tree
Showing 10 changed files with 62 additions and 63 deletions.
89 changes: 44 additions & 45 deletions exporter/dynatraceexporter/internal/serialization/histogram_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ import (
"testing"
"time"

"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"

"github.com/dynatrace-oss/dynatrace-metric-utils-go/metric/dimensions"
"github.com/stretchr/testify/assert"
"go.opentelemetry.io/collector/pdata/pcommon"
"go.opentelemetry.io/collector/pdata/pmetric"
"go.uber.org/zap"
"go.uber.org/zap/zaptest/observer"
)

func Test_serializeHistogramPoint(t *testing.T) {
Expand Down Expand Up @@ -57,8 +56,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
t.Run("when average > highest boundary, max = average", func(t *testing.T) {
// average = 15, highest boundary = 10
histWitMaxGreaterAvg := pmetric.NewHistogramDataPoint()
histWitMaxGreaterAvg.SetMExplicitBounds([]float64{0, 10})
histWitMaxGreaterAvg.SetMBucketCounts([]uint64{0, 0, 2})
histWitMaxGreaterAvg.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{0, 10}))
histWitMaxGreaterAvg.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 0, 2}))
histWitMaxGreaterAvg.SetCount(2)
histWitMaxGreaterAvg.SetSum(30)
histWitMaxGreaterAvg.SetTimestamp(pcommon.Timestamp(time.Date(2021, 07, 16, 12, 30, 0, 0, time.UTC).UnixNano()))
Expand All @@ -71,8 +70,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
t.Run("when average < lowest boundary, min = average", func(t *testing.T) {
// average = 5, lowest boundary = 10
histWitMinLessAvg := pmetric.NewHistogramDataPoint()
histWitMinLessAvg.SetMExplicitBounds([]float64{10, 20})
histWitMinLessAvg.SetMBucketCounts([]uint64{2, 0, 0})
histWitMinLessAvg.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{10, 20}))
histWitMinLessAvg.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{2, 0, 0}))
histWitMinLessAvg.SetCount(2)
histWitMinLessAvg.SetSum(10)
histWitMinLessAvg.SetTimestamp(pcommon.Timestamp(time.Date(2021, 07, 16, 12, 30, 0, 0, time.UTC).UnixNano()))
Expand All @@ -84,8 +83,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("when min is provided it should be used", func(t *testing.T) {
minMaxHist := pmetric.NewHistogramDataPoint()
minMaxHist.SetMExplicitBounds([]float64{10, 20})
minMaxHist.SetMBucketCounts([]uint64{2, 0, 0})
minMaxHist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{10, 20}))
minMaxHist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{2, 0, 0}))
minMaxHist.SetCount(2)
minMaxHist.SetSum(10)
minMaxHist.SetMin(3)
Expand All @@ -100,8 +99,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("when max is provided it should be used", func(t *testing.T) {
minMaxHist := pmetric.NewHistogramDataPoint()
minMaxHist.SetMExplicitBounds([]float64{10, 20})
minMaxHist.SetMBucketCounts([]uint64{2, 0, 0})
minMaxHist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{10, 20}))
minMaxHist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{2, 0, 0}))
minMaxHist.SetCount(2)
minMaxHist.SetSum(10)
minMaxHist.SetMax(7)
Expand All @@ -116,8 +115,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("when min and max is provided it should be used", func(t *testing.T) {
minMaxHist := pmetric.NewHistogramDataPoint()
minMaxHist.SetMExplicitBounds([]float64{10, 20})
minMaxHist.SetMBucketCounts([]uint64{2, 0, 0})
minMaxHist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{10, 20}))
minMaxHist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{2, 0, 0}))
minMaxHist.SetCount(2)
minMaxHist.SetSum(10)
minMaxHist.SetMin(3)
Expand All @@ -132,8 +131,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
t.Run("when min is not provided it should be estimated", func(t *testing.T) {
t.Run("values between first two boundaries", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{0, 1, 0, 3, 2, 0})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 1, 0, 3, 2, 0}))
hist.SetCount(6)
hist.SetSum(21.2)

Expand All @@ -144,8 +143,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("first bucket has value", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{1, 0, 0, 3, 0, 4})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 0, 0, 3, 0, 4}))
hist.SetCount(8)
hist.SetSum(34.5)

Expand All @@ -156,8 +155,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("only the first bucket has values, use the mean", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{3, 0, 0, 0, 0, 0})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{3, 0, 0, 0, 0, 0}))
hist.SetCount(3)
hist.SetSum(0.75)

Expand All @@ -167,8 +166,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
})
t.Run("just one bucket from -Inf to Inf", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{})
hist.SetMBucketCounts([]uint64{4})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{4}))
hist.SetCount(4)
hist.SetSum(8.8)

Expand All @@ -178,8 +177,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
})
t.Run("just one bucket from -Inf to Inf", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{})
hist.SetMBucketCounts([]uint64{1})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1}))
hist.SetCount(1)
hist.SetSum(1.2)

Expand All @@ -189,8 +188,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
})
t.Run("only the last bucket has a value", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{0, 0, 0, 0, 0, 3})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 0, 0, 0, 0, 3}))
hist.SetCount(3)
hist.SetSum(15.6)

Expand All @@ -203,8 +202,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
t.Run("when max is not provided it should be estimated", func(t *testing.T) {
t.Run("values between the last two boundaries", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{0, 1, 0, 3, 2, 0})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 1, 0, 3, 2, 0}))
hist.SetSum(21.2)
hist.SetCount(6)

Expand All @@ -215,8 +214,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("last bucket has value", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{1, 0, 0, 3, 0, 4})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1, 0, 0, 3, 0, 4}))
hist.SetSum(34.5)
hist.SetCount(8)

Expand All @@ -227,8 +226,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("only the last bucket has values", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{0, 0, 0, 0, 0, 2})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 0, 0, 0, 0, 2}))
hist.SetSum(20.2)
hist.SetCount(2)

Expand All @@ -239,8 +238,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("just one bucket from -Inf to Inf", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{})
hist.SetMBucketCounts([]uint64{4})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{4}))
hist.SetSum(8.8)
hist.SetCount(4)

Expand All @@ -251,8 +250,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("just one bucket from -Inf to Inf", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{})
hist.SetMBucketCounts([]uint64{1})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{1}))
hist.SetSum(1.2)
hist.SetCount(1)

Expand All @@ -263,8 +262,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("max is larger than sum", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{0, 5})
hist.SetMBucketCounts([]uint64{0, 2, 0})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{0, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 2, 0}))
hist.SetSum(2.3)
hist.SetCount(2)

Expand All @@ -277,8 +276,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
t.Run("when sum is not provided it should be estimated", func(t *testing.T) {
t.Run("single bucket histogram", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{})
hist.SetMBucketCounts([]uint64{13})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{13}))
hist.SetCount(6)

_, _, sum := histDataPointToSummary(hist)
Expand All @@ -288,8 +287,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("data in bounded buckets", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{0, 3, 5, 0, 0, 0})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 3, 5, 0, 0, 0}))
hist.SetCount(6)

_, _, sum := histDataPointToSummary(hist)
Expand All @@ -300,8 +299,8 @@ func Test_serializeHistogramPoint(t *testing.T) {
t.Run("data in unbounded buckets", func(t *testing.T) {
t.Run("first bucket", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{2, 3, 5, 0, 0, 0})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{2, 3, 5, 0, 0, 0}))
hist.SetCount(6)

_, _, sum := histDataPointToSummary(hist)
Expand All @@ -311,8 +310,8 @@ func Test_serializeHistogramPoint(t *testing.T) {

t.Run("last bucket", func(t *testing.T) {
hist := pmetric.NewHistogramDataPoint()
hist.SetMExplicitBounds([]float64{1, 2, 3, 4, 5})
hist.SetMBucketCounts([]uint64{0, 3, 5, 0, 0, 2})
hist.SetExplicitBounds(pcommon.NewImmutableFloat64Slice([]float64{1, 2, 3, 4, 5}))
hist.SetBucketCounts(pcommon.NewImmutableUInt64Slice([]uint64{0, 3, 5, 0, 0, 2}))
hist.SetCount(6)

_, _, sum := histDataPointToSummary(hist)
Expand Down
2 changes: 1 addition & 1 deletion exporter/lokiexporter/encode_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func serializeBody(body pcommon.Value) ([]byte, error) {
str, err = json.Marshal(body.SliceVal().AsRaw())

case pcommon.ValueTypeBytes:
str, err = json.Marshal(body.MBytesVal())
str, err = json.Marshal(body.BytesVal().AsRaw())

default:
err = fmt.Errorf("unsuported body type to serialize")
Expand Down
4 changes: 2 additions & 2 deletions exporter/tanzuobservabilityexporter/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,8 @@ func fromOtelHistogramDataPoint(point pmetric.HistogramDataPoint) bucketHistogra
return bucketHistogramDataPoint{
Attributes: point.Attributes(),
SecondsSinceEpoch: point.Timestamp().AsTime().Unix(),
bucketCounts: point.MBucketCounts(),
explicitBounds: point.MExplicitBounds(),
bucketCounts: point.BucketCounts().AsRaw(),
explicitBounds: point.ExplicitBounds().AsRaw(),
}
}

Expand Down
8 changes: 4 additions & 4 deletions exporter/tanzuobservabilityexporter/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1208,8 +1208,8 @@ func newHistogramMetricWithDataPoints(
aHistogram.DataPoints().EnsureCapacity(len(numBucketCountsForEachDataPoint))
for _, count := range numBucketCountsForEachDataPoint {
point := aHistogram.DataPoints().AppendEmpty()
point.SetMBucketCounts(make([]uint64, count))
point.SetMExplicitBounds(make([]float64, count-1))
point.SetBucketCounts(pcommon.NewImmutableUInt64Slice(make([]uint64, count)))
point.SetExplicitBounds(pcommon.NewImmutableFloat64Slice(make([]float64, count-1)))
}
return result
}
Expand All @@ -1226,8 +1226,8 @@ func newExponentialHistogramMetricWithDataPoints(
aHistogram.DataPoints().EnsureCapacity(len(positiveAndNegativeBucketCountsForEachDataPoint))
for _, count := range positiveAndNegativeBucketCountsForEachDataPoint {
point := aHistogram.DataPoints().AppendEmpty()
point.Negative().SetMBucketCounts(make([]uint64, count))
point.Positive().SetMBucketCounts(make([]uint64, count))
point.Negative().SetBucketCounts(pcommon.NewImmutableUInt64Slice(make([]uint64, count)))
point.Positive().SetBucketCounts(pcommon.NewImmutableUInt64Slice(make([]uint64, count)))
}
return result
}
Expand Down
8 changes: 4 additions & 4 deletions pkg/stanza/adapter/converter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func TestConvert(t *testing.T) {
m.InsertInt("int", 123)
m.InsertDouble("double", 12.34)
m.InsertString("string", "hello")
m.InsertMBytes("bytes", []byte("asdf"))
m.InsertBytes("bytes", pcommon.NewImmutableByteSlice([]byte("asdf")))
assert.EqualValues(t, m.Sort(), lr.Body().MapVal().Sort())
}
}
Expand Down Expand Up @@ -593,7 +593,7 @@ func TestConvertSimpleBody(t *testing.T) {
require.False(t, anyToBody(false).BoolVal())

require.Equal(t, "string", anyToBody("string").StringVal())
require.Equal(t, []byte("bytes"), anyToBody([]byte("bytes")).MBytesVal())
require.Equal(t, []byte("bytes"), anyToBody([]byte("bytes")).BytesVal().AsRaw())

require.Equal(t, int64(1), anyToBody(1).IntVal())
require.Equal(t, int64(1), anyToBody(int8(1)).IntVal())
Expand Down Expand Up @@ -644,7 +644,7 @@ func TestConvertMapBody(t *testing.T) {
}
for _, k := range []string{"bytes"} {
v, _ = result.Get(k)
require.Equal(t, []byte(k), v.MBytesVal())
require.Equal(t, []byte(k), v.BytesVal().AsRaw())
}
for _, k := range []string{"int", "int8", "int16", "int32", "int64", "uint", "uint8", "uint16", "uint32", "uint64"} {
v, _ = result.Get(k)
Expand Down Expand Up @@ -683,7 +683,7 @@ func TestConvertArrayBody(t *testing.T) {
require.True(t, result.At(0).BoolVal())
require.False(t, result.At(1).BoolVal())
require.Equal(t, "string", result.At(2).StringVal())
require.Equal(t, []byte("bytes"), result.At(3).MBytesVal())
require.Equal(t, []byte("bytes"), result.At(3).BytesVal().AsRaw())

require.Equal(t, int64(1), result.At(4).IntVal()) // int
require.Equal(t, int64(1), result.At(5).IntVal()) // int8
Expand Down
2 changes: 1 addition & 1 deletion pkg/stanza/adapter/frompdataconverter.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func valueToInterface(value pcommon.Value) interface{} {
case pcommon.ValueTypeInt:
return value.IntVal()
case pcommon.ValueTypeBytes:
return value.MBytesVal()
return value.BytesVal().AsRaw()
case pcommon.ValueTypeMap:
return value.MapVal().AsRaw()
case pcommon.ValueTypeSlice:
Expand Down
4 changes: 2 additions & 2 deletions processor/groupbyattrsprocessor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ func someComplexHistogramMetrics(withResourceAttrIndex bool, rmCount int, ilmCou
dataPoint.SetTimestamp(pcommon.NewTimestampFromTime(time.Now()))
buckets := randUIntArr(histogramSize)
sort.Slice(buckets, func(i, j int) bool { return buckets[i] < buckets[j] })
dataPoint.SetMBucketCounts(buckets)
dataPoint.SetMExplicitBounds(randFloat64Arr(histogramSize))
dataPoint.SetBucketCounts(pcommon.NewImmutableUInt64Slice(buckets))
dataPoint.SetExplicitBounds(pcommon.NewImmutableFloat64Slice(randFloat64Arr(histogramSize)))
dataPoint.SetCount(sum(buckets))
dataPoint.Attributes().InsertString("commonGroupedAttr", "abc")
dataPoint.Attributes().InsertString("commonNonGroupedAttr", "xyz")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ func compareHistogram(count uint64, sum float64, buckets []uint64) histogramPoin
return func(t *testing.T, histogramDataPoint *pmetric.HistogramDataPoint) {
assert.Equal(t, count, histogramDataPoint.Count(), "Histogram count value does not match")
assert.Equal(t, sum, histogramDataPoint.Sum(), "Histogram sum value does not match")
assert.Equal(t, buckets, histogramDataPoint.MBucketCounts(), "Histogram bucket count values do not match")
assert.Equal(t, buckets, histogramDataPoint.BucketCounts().AsRaw(), "Histogram bucket count values do not match")
}
}

Expand Down
2 changes: 1 addition & 1 deletion receiver/solacereceiver/unmarshaller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -902,7 +902,7 @@ func TestUnmarshallerInsertUserProperty(t *testing.T) {
&model_v1.SpanData_UserPropertyValue_ByteArrayValue{ByteArrayValue: []byte{1, 2, 3, 4}},
pcommon.ValueTypeBytes,
func(val pcommon.Value) {
assert.Equal(t, []byte{1, 2, 3, 4}, val.MBytesVal())
assert.Equal(t, []byte{1, 2, 3, 4}, val.BytesVal().AsRaw())
},
},
{
Expand Down
4 changes: 2 additions & 2 deletions testbed/correctnesstests/metrics/metric_diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ func diffDoubleHistogramPt(
) []*MetricDiff {
diffs = diff(diffs, expected.Count(), actual.Count(), "HistogramDataPoint Count")
diffs = diff(diffs, expected.Sum(), actual.Sum(), "HistogramDataPoint Sum")
diffs = diff(diffs, expected.MBucketCounts(), actual.MBucketCounts(), "HistogramDataPoint BucketCounts")
diffs = diff(diffs, expected.MExplicitBounds(), actual.MExplicitBounds(), "HistogramDataPoint ExplicitBounds")
diffs = diff(diffs, expected.BucketCounts().AsRaw(), actual.BucketCounts().AsRaw(), "HistogramDataPoint BucketCounts")
diffs = diff(diffs, expected.ExplicitBounds().AsRaw(), actual.ExplicitBounds().AsRaw(), "HistogramDataPoint ExplicitBounds")
// todo LabelsMap()
return diffExemplars(diffs, expected.Exemplars(), actual.Exemplars())
}
Expand Down

0 comments on commit b150f19

Please sign in to comment.