Skip to content

Commit

Permalink
review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Jan 22, 2025
1 parent 8f60276 commit 03efcb5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions sdk/src/metrics/state/temporal_metric_storage.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ bool TemporalMetricStorage::buildMetrics(CollectorHandle *collector,
AggregationTemporality aggregation_temporarily =
collector->GetAggregationTemporality(instrument_descriptor_.type_);

// If no metrics, early return
if (delta_metrics->Size() == 0)
{
return true;
}

// Fast path for single collector with delta temporality and counter, updown-counter, histogram
if (collectors.size() == 1 && collector->GetAggregationTemporality(
instrument_descriptor_.type_) == AggregationTemporality::kDelta)
if (collectors.size() == 1 && aggregation_temporarily == AggregationTemporality::kDelta)
{
// If no metrics, early return
if (delta_metrics->Size() == 0)
{
return true;
}

// Create MetricData directly
MetricData metric_data;
Expand Down

0 comments on commit 03efcb5

Please sign in to comment.