You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Originally Discussion in #4245 (comment)
Currently, for all
Aggregators
in thesdk/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 thesdk/metric/aggregation
alongside the type definition ofExponentialHistogram,
or insdk/metric
alongside theDefaultAggregationSelector
andDefaultTemporalitySelector
.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.The text was updated successfully, but these errors were encountered: