It's inside the tip.

Bulb of mercury. Fine tube extending up from it. Thermal expansion of the bulb produces a big effect on how far up the tube it goes.

They work. They're safe unless you break them. But they can break.