Skip to content

Commit

Permalink
found bug during pipeline testing
Browse files Browse the repository at this point in the history
  • Loading branch information
ankit-bhargava committed Aug 3, 2020
1 parent 5982862 commit 42da878
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/include/opentelemetry/sdk/metrics/sync_instruments.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ class UpDownCounter final : public SynchronousInstrument<T>, public metrics_api:
{
toDelete.push_back(x.first);
}
auto agg_ptr = dynamic_cast<BoundCounter<T> *>(x.second.get())->GetAggregator();
auto agg_ptr = dynamic_cast<BoundUpDownCounter<T> *>(x.second.get())->GetAggregator();
agg_ptr->checkpoint();
ret.push_back(Record(x.second->GetName(), x.second->GetDescription(), x.first, agg_ptr));
}
Expand Down Expand Up @@ -396,7 +396,7 @@ class ValueRecorder final : public SynchronousInstrument<T>, public metrics_api:
{
toDelete.push_back(x.first);
}
auto agg_ptr = dynamic_cast<BoundCounter<T> *>(x.second.get())->GetAggregator();
auto agg_ptr = dynamic_cast<BoundValueRecorder<T> *>(x.second.get())->GetAggregator();
agg_ptr->checkpoint();
ret.push_back(Record(x.second->GetName(), x.second->GetDescription(), x.first, agg_ptr));
}
Expand Down

0 comments on commit 42da878

Please sign in to comment.