Skip to content

Commit

Permalink
Change temporality for Counter and UpDownCounter to CUMULATIVE
Browse files Browse the repository at this point in the history
Fixes #1383
  • Loading branch information
ocelotl committed Nov 16, 2020
1 parent f1db112 commit 4a6a1b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Expand Up @@ -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

Expand Down Expand Up @@ -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,
)
Expand All @@ -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,
)
Expand Down
Expand Up @@ -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,
),
Expand Down

0 comments on commit 4a6a1b5

Please sign in to comment.