code: func SerializeDescriptor(fields []Field) []*pb.MetricsDataSet_MetricFieldDescriptor {
  	ret := make([]*pb.MetricsDataSet_MetricFieldDescriptor, len(fields))
  
  	for i, f := range fields {
  		d := &pb.MetricsDataSet_MetricFieldDescriptor{
  			Name: proto.String(f.Name),
  		}
  
  		switch f.Type {
  		case StringType:
  			d.FieldType = pb.MetricsDataSet_MetricFieldDescriptor_STRING.Enum()
  		case BoolType:
  			d.FieldType = pb.MetricsDataSet_MetricFieldDescriptor_BOOL.Enum()
  		case IntType:
  			d.FieldType = pb.MetricsDataSet_MetricFieldDescriptor_INT64.Enum()
  		}
  
  		ret[i] = d
  	}
  
  	return ret
  }
docs: // SerializeDescriptor returns a slice of field descriptors, representing just
  // the names and types of fields.