Skip to content

Commit eb1cde8

Browse files
committed
Remove max and min from histogram datapoint
1 parent 9cd18ee commit eb1cde8

File tree

4 files changed

+1
-15
lines changed

4 files changed

+1
-15
lines changed

exporter/awsemfexporter/datapoint.go

+1-9
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ type DataPoint struct {
4242
// - pdata.DoubleDataPointSlice
4343
// - pdata.IntHistogramDataPointSlice
4444
// - pdata.DoubleHistogramDataPointSlice
45+
// - pdata.DoubleSummaryDataPointSlice
4546
type DataPoints interface {
4647
Len() int
4748
// NOTE: At() is an expensive call as it calculates the metric's value
@@ -143,17 +144,8 @@ func (dps DoubleHistogramDataPointSlice) At(i int) DataPoint {
143144
labels := createLabels(metric.LabelsMap(), dps.instrumentationLibraryName)
144145
timestamp := unixNanoToMilliseconds(metric.Timestamp())
145146

146-
var minBound, maxBound float64
147-
bucketBounds := metric.ExplicitBounds()
148-
if len(bucketBounds) > 0 {
149-
minBound = bucketBounds[0]
150-
maxBound = bucketBounds[len(bucketBounds)-1]
151-
}
152-
153147
return DataPoint{
154148
Value: &CWMetricStats{
155-
Min: minBound,
156-
Max: maxBound,
157149
Count: metric.Count(),
158150
Sum: metric.Sum(),
159151
},

exporter/awsemfexporter/datapoint_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,6 @@ func TestDoubleHistogramDataPointSliceAt(t *testing.T) {
383383

384384
expectedDP := DataPoint{
385385
Value: &CWMetricStats{
386-
Min: 1,
387-
Max: 3,
388386
Sum: 17.13,
389387
Count: 17,
390388
},

exporter/awsemfexporter/groupedmetric_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ func TestAddToGroupedMetric(t *testing.T) {
9797
map[string]*MetricInfo{
9898
"foo": {
9999
Value: &CWMetricStats{
100-
Min: 0,
101-
Max: 10,
102100
Count: 18,
103101
Sum: 35.0,
104102
},

exporter/awsemfexporter/metric_translator_test.go

-2
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,6 @@ func TestTranslateOtToGroupedMetric(t *testing.T) {
425425
timerMetrics := map[string]*MetricInfo{
426426
"spanTimer": {
427427
Value: &CWMetricStats{
428-
Max: 10,
429-
Min: 0,
430428
Count: 5,
431429
Sum: 15,
432430
},

0 commit comments

Comments
 (0)