Skip to content

Commit

Permalink
chore: fix linter findings on metrics_encoder/__init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Dudssource authored and ocelotl committed Feb 13, 2024
1 parent 6b5cf7a commit 4f805cc
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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__(
Expand All @@ -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(
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 4f805cc

Please sign in to comment.