Correct location for DefaultExponentialHistogram #4347
Description
Originally Discussion in #4245 (comment)
Currently, for all Aggregators
in the sdk/metric/aggregation
package, the zero value, e.g. ExplicitBucketHistogram{}
, will result in a data stream with the recommended settings from the specification.
The Exponential Histogram does not, specifically MaxScale
is valid at 0 and the recommended starting value is 20.
The user experience of setting up a view to use the specification-recommended Exponential Histogram currently would be to find the recommendations in the specification and then construct the Aggregation
to match.
The goal of this ticket is to improve that experience.
Proposed solutions:
DocStrings
Add the recommended configuration to the doc string. This has the least impact on code.
DefaultExponentialHistogram()
This would be a function that returns the specification-recommended Aggregation
. It could be located in the sdk/metric/aggregation
alongside the type definition of ExponentialHistogram,
or in sdk/metric
alongside the DefaultAggregationSelector
and DefaultTemporalitySelector
.
ExponentialHistogram Constructor
This would allow you to only build valid ExponentialHistograms via a Constructor. There are multiple ways that this could be achieved via unexporting fields, or making a HasValue
like field.
Metadata
Assignees
Type
Projects
Status
Done