diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py index df48a15a7bd..92aba2958c2 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/_metric_exporter/__init__.py @@ -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, ) diff --git a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/metrics/test_otlp_metrics_exporter.py b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/metrics/test_otlp_metrics_exporter.py index 9c4bd860f51..9c00ee43408 100644 --- a/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/metrics/test_otlp_metrics_exporter.py +++ b/exporter/opentelemetry-exporter-otlp-proto-grpc/tests/metrics/test_otlp_metrics_exporter.py @@ -589,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=[],