Skip to content

Commit ab5441e

Browse files
committed
set max_buckets minimum to 2
1 parent 50ca1c0 commit ab5441e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/src/metrics/aggregation/base2_exponential_histogram_aggregation.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Base2ExponentialHistogramAggregation::Base2ExponentialHistogramAggregation(
7878
ac = &default_config;
7979
}
8080

81-
point_data_.max_buckets_ = ac->max_buckets_;
81+
point_data_.max_buckets_ = (std::max)(ac->max_buckets_, static_cast<size_t>(2));
8282
point_data_.scale_ = ac->max_scale_;
8383
point_data_.record_min_max_ = ac->record_min_max_;
8484
point_data_.min_ = (std::numeric_limits<double>::max)();

0 commit comments

Comments
 (0)