Onion
It doesn't belong. It sweetens the sauce and masks the guanciale, which is the dish's key ingredient.
Recipe · Roman classic
Guanciale, tomato, pecorino romano and a little chilli. The sauce is made in the guanciale fat: no onion, no garlic, no added oil.
Quantities for two people, weighed in the kitchen, not eyeballed.
Cut 120 g of guanciale into thick strips. Cold pan, medium-low heat: in seven or eight minutes the fat renders and the edges turn crisp. Lift it out with tongs and set it aside: it goes back in at the end, otherwise it softens in the sauce.

In the fat left behind, add a piece of chilli and 400 g of peeled tomatoes (one tin) crushed by hand. A little salt and high heat for two minutes.

Turn down to medium-low and leave it uncovered for twenty minutes, until the sauce thickens and changes colour.

Cook 180 g of bucatini in lightly salted water and drain them a minute before the time on the packet, keeping back a ladleful of pasta water. Bucatini keep cooking in the sauce and soak up a lot.

Toss the pasta in the sauce with a little pasta water, return the guanciale and turn off the heat. Off the heat, add 50 g of pecorino romano, grated: that way it stays creamy instead of turning stringy.

What to avoid
They're the same ones that turn the dish into a generic tomato sauce.
It doesn't belong. It sweetens the sauce and masks the guanciale, which is the dish's key ingredient.
The guanciale fat is enough: oil only makes the sauce greasier.
Its fat is different from guanciale fat, and smoked pancetta adds a flavour that doesn't belong: the sauce loses the sweetness of guanciale.
It softens and turns rubbery. It comes out after browning and goes back in at the end.
It clumps and turns stringy. It goes in off the heat, with a little pasta water.
Twenty minutes uncovered is enough: if it stays watery it won't cling to the pasta and slides to the bottom of the plate.
Questions
Can't find the answer? See the photos, they show every step one by one.
Both work: the sauce is the same. Bucatini hold more and are the traditional choice; spaghetti splash less when you eat them.