Skip to content

Commit

Permalink
add sum to OTLP histogram
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Boten committed Feb 2, 2022
1 parent dc5f929 commit 14403c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def _translate_data(
time_unix_nano=metric.point.time_unix_nano,
start_time_unix_nano=metric.point.start_time_unix_nano,
count=sum(metric.point.bucket_counts),
sum=metric.point.sum,
bucket_counts=metric.point.bucket_counts,
explicit_bounds=metric.point.explicit_bounds,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def setUp(self):
time_unix_nano=1641946016139533244,
start_time_unix_nano=1641946016139533244,
bucket_counts=[1, 4],
sum=67,
explicit_bounds=[10.0, 20.0],
aggregation_temporality=AggregationTemporality.DELTA,
),
Expand Down Expand Up @@ -588,6 +589,7 @@ def test_translate_histogram(self):
start_time_unix_nano=1641946016139533244,
time_unix_nano=1641946016139533244,
count=5,
sum=67,
bucket_counts=[1, 4],
explicit_bounds=[10.0, 20.0],
exemplars=[],
Expand Down

0 comments on commit 14403c0

Please sign in to comment.