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
refactor(metrics): extend direct-bind to all aggregators
Removes BoundFallbackHandle and the fallback parameter on
Measure::bind, leaving every aggregator on the same direct-bind
shape: bind() returns a BoundXxxHandle holding an Arc<TrackerEntry>
that writes directly to the aggregator without per-call attribute
lookup.
LastValue, PrecomputedSum, and ExpoHistogram now match the Sum /
Histogram pattern. PrecomputedSum's bind() is unreachable from user
code today (async-only) but the impl exists so the trait is uniform
and future Gauge / Observable bind() extensions are mechanical.
The rare RwLock-poisoned case now yields a NoopBoundMeasure that
drops measurements silently — mirroring measure()'s own poison
handling.
Test coverage added:
- Bound ExponentialHistogram via View: delta with NaN/inf filter,
bind-at-overflow attribution, persistence across delta eviction,
view filter applied at bind time, and cumulative accumulation.
- Cumulative bind-at-overflow tests for Counter and Histogram.
- LastValue::bind and PrecomputedSum::bind unit tests exercising
Measure / BoundMeasure traits and bound_count Drop semantics.
- ValueMap::bind under a poisoned trackers RwLock returns None so
the caller produces a NoopBoundMeasure rather than panicking.
0 commit comments