You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(metrics): bind() at cardinality limit binds directly to overflow
The previous Fallback path re-routed every bound.add() through the
unbound measure() path, creating a ~25x perf cliff at the cardinality
limit (~50ns vs ~1.8ns) and letting attribution drift across delta
eviction cycles as space freed and refilled.
ValueMap::bind() now looks up or lazily creates the overflow
TrackerEntry at the limit and returns a direct handle to it. The bound
handle writes directly to overflow via a single atomic update for its
lifetime — perf parity with a normal bind. To recover after delta
eviction frees space, drop the handle and rebind.
Spec-aligned with open-telemetry/opentelemetry-specification#5050:
overflow data lands in the otel.metric.overflow=true bucket (MUST)
and per-call attribute lookup is bypassed (SHOULD).
Bench (Apple M4 Max):
Counter_Bound_AtOverflow_Delta: 1.82 ns
Histogram_Bound_AtOverflow_Delta: 6.58 ns
0 commit comments