remove method

TraceState remove(
  1. String key
)

Creates a new TraceState with the given key removed.

Implementation

TraceState remove(String key) {
  if (!_entries.containsKey(key)) return this;

  final newEntries = Map<String, String>.from(_entries);
  newEntries.remove(key);
  return OTelFactory.getOrCreateDefault().traceState(newEntries);
}