From 8a390acc3490d0095c6f151e13cbcf9a2cb69540 Mon Sep 17 00:00:00 2001 From: Tyler Yahn Date: Mon, 31 Oct 2022 18:59:05 -0700 Subject: [PATCH] Recommend not recording cumulative explicit histogram min/max (#3403) * Recommend not recording cumulative hist min/max * Update sdk/metric/aggregation/aggregation.go Co-authored-by: David Ashpole Co-authored-by: Chester Cheung Co-authored-by: David Ashpole --- sdk/metric/aggregation/aggregation.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdk/metric/aggregation/aggregation.go b/sdk/metric/aggregation/aggregation.go index e1da10f53..f1c215069 100644 --- a/sdk/metric/aggregation/aggregation.go +++ b/sdk/metric/aggregation/aggregation.go @@ -121,7 +121,12 @@ type ExplicitBucketHistogram struct { // (500.0, 1000.0], (1000.0, +∞) Boundaries []float64 // NoMinMax indicates whether to not record the min and max of the - // distribution. By default, these extremes are recorded. + // distribution. By default, these extrema are recorded. + // + // Recording these extrema for cumulative data is expected to have little + // value, they will represent the entire life of the instrument instead of + // just the current collection cycle. It is recommended to set this to true + // for that type of data to avoid computing the low-value extrema. NoMinMax bool }