code: public final void setTags(Map<String, String> tags) {
          Map<String, String> updatedTags = new TreeMap<>();
  
          if (tags != null) {
              for (Map.Entry<String, String> entry : tags.entrySet()) {
                  String key = entry.getKey();
  
                  requireArgument(!Metric.ReservedField.isReservedField(key), MessageFormat.format("Tag {0} is a reserved tag name.", key));
                  updatedTags.put(key, entry.getValue());
              }
          }
          _tags.clear();
          _tags.putAll(updatedTags);
      }
docs: Replaces the tags for the query.
  
  @param  tags  The new tags. May be null.