untrackAll method

void untrackAll(
  1. String name
)

Drops every ref under name + detaches each Finalizer token + clears the per-name observables. Capture screens call this between legs to isolate each leg's workload. Silent no-op when name is unknown. Preserves the per-name threshold override (clear via Sleuth.setResourceThreshold(name)).

Implementation

void untrackAll(String name) {
  if (!_isEnabled) return;
  final bucket = _buckets[name];
  if (bucket == null) return;
  _dropBucketsAndDetachAllRefs([bucket]);
  _buckets.remove(name);
  _lastObservedLiveCountByName.remove(name);
  _peakObservedLiveCountByName.remove(name);
  _lastObservedAgeSecondsByName.remove(name);
  _peakObservedAgeSecondsByName.remove(name);
}