setIntAttribute method

void setIntAttribute(
  1. String name,
  2. int value
)

Sets an attribute, replacing any existing attribute with the same name/key Adding attributes at span creation is preferred to calling set attribute later, as samplers can only consider information already present during span creation. Ignored if isEnded

Implementation

void setIntAttribute(String name, int value) {
  if (_modifiable) {
    _attributes = _attributes.copyWithIntAttribute(name, value);
  }
}