The purpose of the flame sensor rod is to tell the controller that the main gas burners have ignited. If no flame is present after a certain amount of time, the controller needs to take the appropriate actions, first of which is to close the gas valves to the main burners.
It’s very important that the flame sensor rod works properly. Dirt, corrosion, or bad connections in the flame sensing circuit can cause the controller to think the flame didn’t ignite. The gas valve will be shut down prematurely. Controller manufacturers publish specifications for the flame diode DC offset current.
You can measure the current in the flame sensing rod by putting an instrument in series with the flame sensing rod. The instrument must be capable of measuring 1 to 10 micro amps DC and have a resolution of .1 micro amps.
Instruments that can test flame sensors are carried by qualified HVAC professionals.
If your flame sensor is dirty or corroded it will not perform properly. Short term it may be helped by cleaning with steel wool but a replacement sensor is not costly and should be immediatlely considered as the best option.