diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/__init__.py index 8a87c22ff93..5dcb599d694 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/__init__.py @@ -32,7 +32,6 @@ ObservableUpDownCounter as APIObservableUpDownCounter, ) from opentelemetry._metrics.instrument import UpDownCounter as APIUpDownCounter -from opentelemetry.sdk._metrics.export import MetricExporter from opentelemetry.sdk._metrics.instrument import ( Counter, Histogram, @@ -100,7 +99,6 @@ class MeterProvider(APIMeterProvider): def __init__( self, - metric_exporters: Sequence[MetricExporter] = (), metric_readers: Sequence[MetricReader] = (), resource: Resource = Resource.create({}), shutdown_on_exit: bool = True, @@ -116,8 +114,6 @@ def __init__( for metric_reader in self._metric_readers: metric_reader._register_meter_provider(self) - self._metric_exporters = metric_exporters - self._resource = resource self._shutdown = False @@ -126,7 +122,6 @@ def force_flush(self) -> bool: # FIXME implement a timeout metric_reader_result = True - metric_exporter_result = True for metric_reader in self._metric_readers: metric_reader_result = ( @@ -136,15 +131,7 @@ def force_flush(self) -> bool: if not metric_reader_result: _logger.warning("Unable to force flush all metric readers") - for metric_exporter in self._metric_exporters: - metric_exporter_result = ( - metric_exporter_result and metric_exporter.force_flush() - ) - - if not metric_exporter_result: - _logger.warning("Unable to force flush all metric exporters") - - return metric_reader_result and metric_exporter_result + return metric_reader_result def shutdown(self): # FIXME implement a timeout @@ -161,12 +148,6 @@ def shutdown(self): if not result: _logger.warning("A MetricReader failed to shutdown") - for metric_exporter in self._metric_exporters: - result = result and metric_exporter.shutdown() - - if not result: - _logger.warning("A MetricExporter failed to shutdown") - self._shutdown = True if self._atexit_handler is not None: