Stop MeterProvier attribute error message from showing up
@@ -357,6 +357,8 @@ class MeterProvider(APIMeterProvider):
self._atexit_handler = register(self.shutdown)
self._meters = {}
+ self._shutdown_once = Once()
+ self._shutdown = False
for metric_reader in self._sdk_config.metric_readers:
@@ -373,9 +375,6 @@ class MeterProvider(APIMeterProvider):
self._measurement_consumer.collect
)
- self._shutdown_once = Once()
- self._shutdown = False
-
def force_flush(self, timeout_millis: float = 10_000) -> bool:
deadline_ns = _time_ns() + timeout_millis * 10**6
