oss_11_m2_per_reader_cardinality_limit - #44
Conversation
|
🔒 Internal (dash0) — not for upstream.
|
|
📣 Public-facing draft — to be used for the upstream PR in Title: Add per-MetricReader default cardinality limit WhatAdds an optional WhyThe base cardinality limit is fixed and cannot be tuned per reader; different export pipelines often need different cardinality/memory trade-offs. This aligns with the spec's configurable cardinality limits and the reader-level defaults in Go ( Spec / references
NotesBuilds on the base cardinality-limit change ( TestsNew integration tests: a reader with a small limit overflows at that limit; no overflow below the reader's limit; unset falls back to the base default; non-positive limits are rejected. Existing metrics tests pass (310). |
b2a00b4 to
e579430
Compare
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
1077256 to
c222981
Compare
e579430 to
f724b8e
Compare
Add an optional cardinality_limit parameter to MetricReader and the concrete readers (PeriodicExportingMetricReader, InMemoryMetricReader). When set, the limit is threaded through the SDK pipeline (SynchronousMeasurementConsumer -> MetricReaderStorage -> _ViewInstrumentMatch) so that every metric stream produced through that reader's pipeline overflows into the single otel.metric.overflow series at the reader's limit instead of the base default. When unset, the base default cardinality limit still applies. A non-positive limit is rejected with ValueError.
f724b8e to
1f155e1
Compare
Closes #41
Per-MetricReader default cardinality limit (Linear OSS-11, finding M2), layered on the M1 base limit. Optional
cardinality_limiton MetricReader / PeriodicExportingMetricReader / InMemoryMetricReader, threaded through the pipeline into _ViewInstrumentMatch; unset falls back to the M1 base default (2000); non-positive raises ValueError.Stacked on
oss_11_m1_metric_cardinality_limit(PR #17) — this PR's base is that branch, so its diff shows only the M2 delta. Retarget to the fork default branch once M1 merges.Validation: M2 delta scope contained to opentelemetry-sdk + changelog; full metrics suite 310 passed.
Linear issue: https://linear.app/dash0/issue/OSS-11/m1-m3-metric-cardinality-limits-base-per-reader-per-view