code: public static Metric fromProto(alluxio.grpc.Metric metric) {
      Metric created = new Metric(MetricsSystem.InstanceType.fromString(metric.getInstance()),
          metric.getHostname(), metric.hasInstanceId() ? metric.getInstanceId() : null,
          metric.getName(), metric.getValue());
      for (Entry<String, String> entry : metric.getTagsMap().entrySet()) {
        created.addTag(entry.getKey(), entry.getValue());
      }
      return created;
    }
docs: Constructs the metric object from the proto format.
  
  @param metric the metric in proto format
  @return the constructed metric