-
Notifications
You must be signed in to change notification settings - Fork 37
Description
I'm opening this after reviewing open-telemetry/opentelemetry-go#7855.
The schema appears to currently support configuring cardinality limits differently based on the instrument kind. This is not part of the metrics SDK specification, and should be removed.
| default: 100 | |
| counter: 2000 | |
| gauge: 2000 | |
| histogram: 2000 | |
| observable_counter: 2000 | |
| observable_gauge: 2000 | |
| observable_up_down_counter: 2000 | |
| up_down_counter: 2000 |
The PR above referenced this section as the spec as justification:
If there is no matching view, but the
MetricReaderdefines a default
cardinality limit value based on the instrument an aggregation is created
for, that value SHOULD be used.
But this does not suggest that the metric reader needs configuration allowing the cardinality limit to be changed per-instrument-kind. It only suggests that the default value chosen by the SDK can be based on the instrument.
The correct specification for this configuration is here
aggregation_cardinality_limit: A positive integer value defining the
maximum number of data points allowed to be emitted in a collection cycle by
a single instrument. See cardinality limits, below.
Users can provide an
aggregation_cardinality_limit, but it is up to their
discretion. Therefore, the stream configuration parameter needs to be
structured to accept anaggregation_cardinality_limit, but MUST NOT
obligate a user to provide one. If the user does not provide an
aggregation_cardinality_limitvalue, theMeterProviderMUST apply the
default aggregation cardinality limit theMetricReaderis
configured with.