Skip to content

**<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Allow histogram configs when aggregation type is default** #3743

@kingpope0120

Description

@kingpope0120

P1 Badge Allow histogram configs when aggregation type is default

The new validation in View now throws whenever AggregationType::kDefault is paired with a HistogramAggregationConfig. However, kDefault defers the actual aggregation choice to the instrument’s default (GetDefaultAggregationType returns kHistogram for histogram instruments). Existing callers can legitimately pass a histogram config while leaving the aggregation type at kDefault to customize bucket boundaries without overriding the default type; this change will now throw std::invalid_argument and prevent those views from being constructed. The check should accept histogram (and other concrete) config types when aggregation_type_ is kDefault because the concrete aggregation is resolved later based on the instrument descriptor.

Useful? React with 👍 / 👎.

Originally posted by @chatgpt-codex-connector[bot] in #3732 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage/not-reproducibleIndicates an issue can not be reproduced as described.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions