Cook the spaghetti in a large saucepan of boiling water for approx 10 minutes. Drain in a colander and set aside.
To make the sauce, heat the olive oil in a frying pan, add the chopped onion and crushed garlic and fry for 5 minutes to soften. Add the chopped bacon and cook for a further 10-15 minutes until golden and crisp. Add the sliced mushrooms and fry for a further 2-3 minutes.
Whisk the eggs, creme fraiche and salt and pepper together and pour into the pan. Cook over a gentle heat for 2-3 minutes stirring constantly until the sauce starts to thicken.
Remove the sauce from the heat and stir in the spaghetti.
Plate up and sprinkle with parmesan to serve.