diff --git a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/metrics_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/metrics_exporter/__init__.py index 2078664b439..2cd1ffad66b 100644 --- a/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/metrics_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp/src/opentelemetry/exporter/otlp/metrics_exporter/__init__.py @@ -15,8 +15,7 @@ """OTLP Metrics Exporter""" import logging -import os -from typing import List, Optional, Sequence, Type, TypeVar, Union +from typing import List, Optional, Sequence, Type, TypeVar from grpc import ChannelCredentials @@ -222,7 +221,8 @@ def _translate_data( sdk_metric_record, data_point_class ), aggregation_temporality=( - AggregationTemporality.AGGREGATION_TEMPORALITY_DELTA + AggregationTemporality. + AGGREGATION_TEMPORALITY_CUMULATIVE ), is_monotonic=True, ) @@ -234,7 +234,8 @@ def _translate_data( sdk_metric_record, data_point_class ), aggregation_temporality=( - AggregationTemporality.AGGREGATION_TEMPORALITY_DELTA + AggregationTemporality. + AGGREGATION_TEMPORALITY_CUMULATIVE ), is_monotonic=False, ) diff --git a/exporter/opentelemetry-exporter-otlp/tests/test_otlp_metric_exporter.py b/exporter/opentelemetry-exporter-otlp/tests/test_otlp_metric_exporter.py index 3034fcdf651..3e77b64a8ea 100644 --- a/exporter/opentelemetry-exporter-otlp/tests/test_otlp_metric_exporter.py +++ b/exporter/opentelemetry-exporter-otlp/tests/test_otlp_metric_exporter.py @@ -133,7 +133,8 @@ def test_translate_metrics(self, mock_time_ns): ) ], aggregation_temporality=( - AggregationTemporality.AGGREGATION_TEMPORALITY_DELTA + AggregationTemporality. + AGGREGATION_TEMPORALITY_CUMULATIVE ), is_monotonic=True, ),