diff --git a/CHANGELOG.md b/CHANGELOG.md index b7180b4aec..cbd9a82d3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ Increment the: ## [Unreleased] +* [SDK] Set small initial value for AttributesHashMap::hash_map_ + [#3391](https://github.com/open-telemetry/opentelemetry-cpp/pull/3391) + * [Metrics SDK] Use nostd::function_ref in AttributesHashMap [#3393](https://github.com/open-telemetry/opentelemetry-cpp/pull/3393) diff --git a/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h b/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h index f1ab55ed61..fba649ab1a 100644 --- a/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h +++ b/sdk/include/opentelemetry/sdk/metrics/state/attributes_hashmap.h @@ -48,7 +48,7 @@ class AttributesHashMapWithCustomHash { public: AttributesHashMapWithCustomHash(size_t attributes_limit = kAggregationCardinalityLimit) - : attributes_limit_(attributes_limit) + : hash_map_(1), attributes_limit_(attributes_limit) {} Aggregation *Get(const MetricAttributes &attributes) const {