From 4d90ee77cf7f2f62c1558599620984e254405a9e Mon Sep 17 00:00:00 2001
From: Ankit Bhargava <abharg@amazon.com>
Date: Mon, 3 Aug 2020 11:53:18 -0400
Subject: [PATCH] found bug during pipeline testing

---
 sdk/include/opentelemetry/sdk/metrics/sync_instruments.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sdk/include/opentelemetry/sdk/metrics/sync_instruments.h b/sdk/include/opentelemetry/sdk/metrics/sync_instruments.h
index 1b2d181118..d8b1f83d24 100644
--- a/sdk/include/opentelemetry/sdk/metrics/sync_instruments.h
+++ b/sdk/include/opentelemetry/sdk/metrics/sync_instruments.h
@@ -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));
     }
@@ -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));
     }