diff --git a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py index 8f4997c2f4e..8cf321be72e 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-common/src/opentelemetry/exporter/otlp/proto/common/_internal/metrics_encoder/__init__.py @@ -66,6 +66,9 @@ def _common_configuration( self, preferred_temporality: Dict[type, AggregationTemporality] = None, preferred_aggregation: Dict[type, "opentelemetry.sdk.metrics.view.Aggregation"] = None, + preferred_aggregation: Dict[ + type, "opentelemetry.sdk.metrics.view.Aggregation" + ] = None, ) -> None: MetricExporter.__init__( @@ -74,7 +77,9 @@ def _common_configuration( preferred_aggregation=self.get_aggregation(preferred_aggregation), ) - def get_temporality(self, preferred_temporality: Dict[type, AggregationTemporality]) -> Dict[type, AggregationTemporality]: + def get_temporality( + self, preferred_temporality: Dict[type, AggregationTemporality] + ) -> Dict[type, AggregationTemporality]: otel_exporter_otlp_metrics_temporality_preference = ( environ.get( @@ -128,7 +133,12 @@ def get_temporality(self, preferred_temporality: Dict[type, AggregationTemporali return instrument_class_temporality - def get_aggregation(self, preferred_aggregation: Dict[type, "opentelemetry.sdk.metrics.view.Aggregation"]) -> Dict[type, "opentelemetry.sdk.metrics.view.Aggregation"]: + def get_aggregation( + self, + preferred_aggregation: Dict[ + type, "opentelemetry.sdk.metrics.view.Aggregation" + ], + ) -> Dict[type, "opentelemetry.sdk.metrics.view.Aggregation"]: otel_exporter_otlp_metrics_default_histogram_aggregation = environ.get( OTEL_EXPORTER_OTLP_METRICS_DEFAULT_HISTOGRAM_AGGREGATION,