The validation of the exponential histogram, already performed in sdk/metric/aggregation, is duplicated in the exponential histogram implementation (sdk/metric/internal/aggregate). The view will use the Err from ExponentialHistogram in sdk/metric/aggregation to validate the configuration prior to getting here:
Having a duplicate validation of the configuration here will lead to two parts of the code-base doing the same thing and introduce the possibility for many bugs.
Similar to the explicit bucket histogram, we should just assume the configuration passed here is valid and proceed.
The validation of the exponential histogram, already performed in
sdk/metric/aggregation
, is duplicated in the exponential histogram implementation (sdk/metric/internal/aggregate
). The view will use theErr
fromExponentialHistogram
insdk/metric/aggregation
to validate the configuration prior to getting here:https://github.com/open-telemetry/opentelemetry-go/blob/ab61991465d957db46e4f8a78b1dcf84546bdef8/sdk/metric/view.go#L98-L105
Having a duplicate validation of the configuration here will lead to two parts of the code-base doing the same thing and introduce the possibility for many bugs.
Similar to the explicit bucket histogram, we should just assume the configuration passed here is valid and proceed.
_Originally posted by @MrAlias in https://github.com/open-telemetry/opentelemetry-go/pull/4245#discussion_r1272494713_