The shiny metal part is one of the metal film sensors. I am not sure but I believe they have 2 thin film temp sensors, one facing upstream (visible) the other downstream, inside the plastic. A heater is in the middle for a ref temp. Difference between upstream and down stream sensor temps indicate mass airflow.
The problem I suspect is caused by vibration of the
MAF sensor. They do not hold up very well. Best to cut your losses, you may as well cut the old one up for research.