addAttributes(attributes) {
    if (!attributes) {
      return
    }

    for (const [key, value] of Object.entries(attributes)) {
      this.addAttribute(key, value)
    }
  }
Adds all attributes in an object to the attribute collection.
null/undefined values will be dropped.

Does not apply filtering/truncation.

@param {object} [attributes]
@param {string} [attributes.key] Name of the attribute to be stored.
@param {string|boolean|number} [attributes.value] Value of the attribute to be stored.