Melt the butter in a heavy based pot or Dutch oven over medium-high heat. Once the butter has melted, add the onions with a pinch of salt, and stir to combine. Cover and cook, stirring every few minutes, until the onions are very soft and caramelized, about 20 minutes. Scrape up any brown bits as you go. If the onions start to burn on the bottom of the pan, reduce the heat to medium. (Don’t worry though, you’ll scrape the pan to remove the browned bits when you add the vinegar. )
Once the onions are lightly browned, add the sugar and stir until melted. Add the red wine vinegar, balsamic vinegar, and mustard. Turn the heat down to medium and simmer for about 20 to 25 minutes, or until you like the consistency. (A spoon dragged across the bottom of the pan should take a few seconds to fill in.)
The relish can simply be stored in an airtight container in the fridge, or transferred to jars. If storing in jars, prepare by pouring boiling water into your containers and allow to sit for a few minutes before carefully emptying them out. Using a stainless steel jar funnel and ladle, carefully fill the jars, leaving around 1cm head room at the top of the jar. Place the lids on and seal immediately, then let cool on the counter before transferring to the fridge.