Skip to content

Do not duplicate validation of exponential histogram configuration #4406

Closed
@MrAlias

Description

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:

if err := agg.Err(); err != nil {
global.Error(
err, "not using aggregation with view",
"criteria", criteria,
"mask", mask,
)
agg = nil
}

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 #4245 (comment)

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions