Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ Increment the:
* [TEST] Remove workaround for metrics cardinality limit test
[#3663](https://github.com/open-telemetry/opentelemetry-cpp/pull/3663)

* [SDK] Fix typo in hashmap method GetEnteries
[#3680](https://github.com/open-telemetry/opentelemetry-cpp/pull/3680)

## [1.23 2025-09-25]

* [CodeHealth] Fix clang-tidy warnings part 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class AttributesHashMapWithCustomHash
/**
* Iterate the hash to yield key and value stored in hash.
*/
bool GetAllEnteries(
bool GetAllEntries(
nostd::function_ref<bool(const MetricAttributes &, Aggregation &)> callback) const
{
for (auto &kv : hash_map_)
Expand Down
8 changes: 4 additions & 4 deletions sdk/src/metrics/state/temporal_metric_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ bool TemporalMetricStorage::buildMetrics(CollectorHandle *collector,
metric_data.end_ts = collection_ts;

// Direct conversion of delta metrics to point data
delta_metrics->GetAllEnteries(
delta_metrics->GetAllEntries(
[&metric_data](const MetricAttributes &attributes, Aggregation &aggregation) {
PointDataAttributes point_data_attr;
point_data_attr.point_data = aggregation.ToPoint();
Expand Down Expand Up @@ -102,7 +102,7 @@ bool TemporalMetricStorage::buildMetrics(CollectorHandle *collector,
: kAggregationCardinalityLimit));
for (auto &agg_hashmap : unreported_list)
{
agg_hashmap->GetAllEnteries(
agg_hashmap->GetAllEntries(
[&merged_metrics, this](const MetricAttributes &attributes, Aggregation &aggregation) {
auto agg = merged_metrics->Get(attributes);
if (agg)
Expand Down Expand Up @@ -135,7 +135,7 @@ bool TemporalMetricStorage::buildMetrics(CollectorHandle *collector,
if (aggregation_temporarily == AggregationTemporality::kCumulative)
{
// merge current delta to previous cumulative
last_aggr_hashmap->GetAllEnteries(
last_aggr_hashmap->GetAllEntries(
[&merged_metrics, this](const MetricAttributes &attributes, Aggregation &aggregation) {
auto agg = merged_metrics->Get(attributes);
if (agg)
Expand Down Expand Up @@ -172,7 +172,7 @@ bool TemporalMetricStorage::buildMetrics(CollectorHandle *collector,
metric_data.aggregation_temporality = aggregation_temporarily;
metric_data.start_ts = last_collection_ts;
metric_data.end_ts = collection_ts;
result_to_export->GetAllEnteries(
result_to_export->GetAllEntries(
[&metric_data](const MetricAttributes &attributes, Aggregation &aggregation) {
PointDataAttributes point_data_attr;
point_data_attr.point_data = aggregation.ToPoint();
Expand Down
6 changes: 3 additions & 3 deletions sdk/test/metrics/attributes_hashmap_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ TEST(AttributesHashMap, BasicTests)
MetricAttributes m6 = {{"k1", "v2"}, {"k2", "v1"}};
EXPECT_EQ(hash_map.Has(m6), false);

// GetAllEnteries
// GetAllEntries
size_t count = 0;
hash_map.GetAllEnteries(
hash_map.GetAllEntries(
[&count](const MetricAttributes & /* attributes */, Aggregation & /* aggregation */) {
count++;
return true;
Expand Down Expand Up @@ -210,7 +210,7 @@ TEST(AttributesHashMap, OverflowCardinalityLimitBehavior)

// Copy the hash map to a new map in non-determistic order and verify all entries are present
AttributesHashMapWithCustomHash<> map_copy(limit);
map.GetAllEnteries([&map_copy](const MetricAttributes &attributes, Aggregation &) {
map.GetAllEntries([&map_copy](const MetricAttributes &attributes, Aggregation &) {
map_copy.Set(attributes, std::unique_ptr<Aggregation>(new DropAggregation()));
return true;
});
Expand Down
Loading