code: private void setType(String type) {
          requireArgument(type != null && !type.trim().isEmpty(), "Type cannot be null or empty.");
          _type = type;
      }
docs: Sets the category of the metric.
  
  @param  type  The category of the metric. Cannot be null or empty.