Magnets offer an outstanding temperature stability, high residual induction and high energy output. They make for an excellent candidate in the world of sensor technology & can be manufactured in a variety of complex shapes and sizes.
The very frequently magnetized directions of disc magnets is axially magnetized, that means that the N-S poles are on the flat/round surfaces.
But there is also diametrically magnetized option to choose from.