Skip to content

Commit ca7a3fa

Browse files
authored
Add min max fields to Histogram (#2759)
1 parent e073d4d commit ca7a3fa

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased](https://github.com/open-telemetry/opentelemetry-python/compare/v1.12.0rc1-0.31b0...HEAD)
99

10+
- Add min/max fields to Histogram
11+
([#2759](https://github.com/open-telemetry/opentelemetry-python/pull/2759))
1012
- `opentelemetry-exporter-otlp-proto-http` Add support for OTLP/HTTP log exporter
1113
([#2462](https://github.com/open-telemetry/opentelemetry-python/pull/2462))
1214
- Fix yield of `None`-valued points

exporter/opentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/metric_exporter/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ def _translate_data(
146146
sum=data_point.sum,
147147
bucket_counts=data_point.bucket_counts,
148148
explicit_bounds=data_point.explicit_bounds,
149+
max=data_point.max,
150+
min=data_point.min,
149151
)
150152
pb2_metric.histogram.aggregation_temporality = (
151153
metric.data.aggregation_temporality

exporter/opentelemetry-exporter-otlp-proto-grpc/tests/metrics/test_otlp_metrics_exporter.py

+10
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,8 @@ def test_translate_histogram(self):
720720
explicit_bounds=[10.0, 20.0],
721721
exemplars=[],
722722
flags=pb2.DataPointFlags.FLAG_NONE,
723+
max=18.0,
724+
min=8.0,
723725
)
724726
],
725727
aggregation_temporality=AggregationTemporality.DELTA,
@@ -782,6 +784,8 @@ def test_translate_multiple_scope_histogram(self):
782784
explicit_bounds=[10.0, 20.0],
783785
exemplars=[],
784786
flags=pb2.DataPointFlags.FLAG_NONE,
787+
max=18.0,
788+
min=8.0,
785789
)
786790
],
787791
aggregation_temporality=AggregationTemporality.DELTA,
@@ -816,6 +820,8 @@ def test_translate_multiple_scope_histogram(self):
816820
explicit_bounds=[10.0, 20.0],
817821
exemplars=[],
818822
flags=pb2.DataPointFlags.FLAG_NONE,
823+
max=18.0,
824+
min=8.0,
819825
)
820826
],
821827
aggregation_temporality=AggregationTemporality.DELTA,
@@ -857,6 +863,8 @@ def test_translate_multiple_scope_histogram(self):
857863
explicit_bounds=[10.0, 20.0],
858864
exemplars=[],
859865
flags=pb2.DataPointFlags.FLAG_NONE,
866+
max=18.0,
867+
min=8.0,
860868
)
861869
],
862870
aggregation_temporality=AggregationTemporality.DELTA,
@@ -898,6 +906,8 @@ def test_translate_multiple_scope_histogram(self):
898906
explicit_bounds=[10.0, 20.0],
899907
exemplars=[],
900908
flags=pb2.DataPointFlags.FLAG_NONE,
909+
max=18.0,
910+
min=8.0,
901911
)
902912
],
903913
aggregation_temporality=AggregationTemporality.DELTA,

0 commit comments

Comments
 (0)