Begin by cutting bacon into bite-sized pieces. (It cooks much faster this way.)
Cook it in a large skillet (cast iron works great) over medium heat, until it is crispy, but not burnt. If the bacon is really fatty, I will spoon some of the grease out into my bacon jar.
While the bacon is cooking, thinly slice onions.
Once the bacon is finished cooking, pour it into a strainer over a bowl to drain the fat out, then return 2 tablespoons of the bacon grease to the skillet to cook the onions.
Reduce the heat to low/medium-low and add the onions. Let them cook and cook, and cook, and cook for what seems like forever, stirring every 5 - 10 minutes. The longer the onions cook, the more caramelization and sweet flavor they will have.
Once the onions basically look like a pile of brown noodles, add a splash of balsamic vinegar to deglaze the pan and scrape any crispy bits off the bottom of the pan.
Then add the remaining balsamic vinegar, brown sugar, salt, pepper, and thyme. Stir until fully mixed and let this mixture caramelize and bubble for a few minutes. It will smell like onion soup and bacon made a baby.
Once it starts to thicken, turn off the heat and mix the strained bacon back in. Let this cool for about 10 minutes.
Pour the cooled bacon and onion mixture into a food processor or blender and chop/puree until it is your desired consistency. I like it to be thick enough where you can differentiate what is onion and what is bacon, but you can also puree it into oblivion and make it into a spreadable paste.
Transfer bacon jam to an air-tight container (I like to use a mason jar) and let cool. Store in the refrigerator until ready to use. Reheat before serving.