Diagnostic of prominence magnetic fields through spectropolarimetric observations