diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py index c40ff1ddd21..cebfe7b2347 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py @@ -169,9 +169,9 @@ def _translate_data( ) def export( - self, metrics: Sequence[Metric], *args, **kwargs + self, metrics: Sequence[Metric], **kwargs ) -> MetricExportResult: return self._export(metrics) - def shutdown(self, *args, **kwargs): + def shutdown(self, **kwargs): pass diff --git a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py index 1b81f062c02..356c11136b2 100644 --- a/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py +++ b/exporter/opentelemetry-exporter-prometheus/src/opentelemetry/exporter/prometheus/__init__.py @@ -110,14 +110,12 @@ def __init__(self, prefix: str = "") -> None: REGISTRY.register(self._collector) self._collector._callback = self.collect - def _receive_metrics( - self, metrics: Iterable[Metric], *args, **kwargs - ) -> None: + def _receive_metrics(self, metrics: Iterable[Metric], **kwargs) -> None: if metrics is None: return self._collector.add_metrics_data(metrics) - def shutdown(self, *args, **kwargs) -> bool: + def shutdown(self, **kwargs) -> bool: REGISTRY.unregister(self._collector) return True diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/measurement_consumer.py b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/measurement_consumer.py index 2a9c36e9965..1400b2922bc 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/measurement_consumer.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_metrics/_internal/measurement_consumer.py @@ -32,14 +32,12 @@ class MeasurementConsumer(ABC): @abstractmethod - def consume_measurement( - self, measurement: Measurement, *args, **kwargs - ) -> None: + def consume_measurement(self, measurement: Measurement, **kwargs) -> None: pass @abstractmethod def register_asynchronous_instrument( - self, instrument: "_Asynchronous", *args, **kwargs + self, instrument: "_Asynchronous", **kwargs ): pass @@ -48,7 +46,6 @@ def collect( self, metric_reader: MetricReader, instrument_type_temporality: Dict[type, AggregationTemporality], - *args, **kwargs ) -> Iterable[Metric]: pass @@ -67,14 +64,12 @@ def __init__(self, sdk_config: SdkConfiguration) -> None: } self._async_instruments: List["_Asynchronous"] = [] - def consume_measurement( - self, measurement: Measurement, *args, **kwargs - ) -> None: + def consume_measurement(self, measurement: Measurement, **kwargs) -> None: for reader_storage in self._reader_storages.values(): reader_storage.consume_measurement(measurement) def register_asynchronous_instrument( - self, instrument: "_Asynchronous", *args, **kwargs + self, instrument: "_Asynchronous", **kwargs ) -> None: with self._lock: self._async_instruments.append(instrument) @@ -83,7 +78,6 @@ def collect( self, metric_reader: MetricReader, instrument_type_temporality: Dict[type, AggregationTemporality], - *args, **kwargs ) -> Iterable[Metric]: with self._lock: