Skip to content

Commit

Permalink
Add more logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zzhlogin committed Nov 7, 2024
1 parent 1b8ca06 commit 20a53ca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions exporter/awsemfexporter/datapoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,15 +331,22 @@ func (dps exponentialHistogramDataPointSlice) CalculateDeltaDatapoints(idx int,
}

var maxValues []float64
var dpValuesLength []int
for _, dp := range datapoints {
maxValues = append(maxValues, dp.value.(*cWMetricHistogram).Max)
dpValuesLength = append(dpValuesLength, len(dp.value.(*cWMetricHistogram).Counts))
}

if metric.Max() != datapoints[0].value.(*cWMetricHistogram).Max {
logger.Warn("The max value of the first split does not match the max value of the metric",
zap.Float64("maxValue", datapoints[0].value.(*cWMetricHistogram).Max),
zap.Float64("metricMax", metric.Max()),
zap.Float64s("maxValues", maxValues),
zap.Ints("dpValuesLength", dpValuesLength),
zap.Int("totalBucketLen", totalBucketLen),
zap.Int("splitThreshold", splitThreshold),
zap.Int("expectedSplitNumber", expectedSplitNumber),
zap.Int("datapoints", len(datapoints)),
)
}
return datapoints, true
Expand Down

0 comments on commit 20a53ca

Please sign in to comment.