Heat a wide pan over a low flame and add butter. Add onions and cook until soft and translucent.
Add the mushrooms, salt and pepper, raise the heat and stir. When the moisture from the mushrooms has been released, allow it to evaporate, concentrating the flavour. This might happen quickly or slowly, depending entirely on the type of mushrooms used.
Add the paprika and cayenne then fry for a few moments more, until the paprika turns a shade darker. Finally, add the sour cream or crème fraiche and dill, and allow it bubble gently for about 5 minutes more.
Choose a large boiling pot and a large-hole colander which will rest on top of the pot. Fill the pot with water and rest the colander on top, so that the base of the colander is at least 5cm / 2 inches above the surface. Bring to the boil, salt it well, and reduce to a simmer.
Meanwhile, mix the salt into the flour. Add the egg and gradually work in the milk. You may need more or less milk, but you want to achieve a consistency somewhere between a dough and a batter, though leaning towards batter — you should be able to push it through the holes of the colander quite easily.
Using a large metal spoon, scoop part of the batter into the colander and push it through into the simmering water. The spatzle will sink to the bottom, then rise when cooked. Remove cooked spatzle with a slotted spoon and keep warm while you cook the remaining batches.