Prepare Blind Baked Pie Crust. You'll find complete instructions in my Pie Crust Article. Cut the bacon into ½ lardons and cook in a large fry pan, stirring often until soft crispy. Remove bacon to a plate and discard all but about 2 tablespoons of the grease.
In the meantime, cut the ends of each onion, remove skin and slice into ¼ inch rounds. Reduce heat medium low. Add the onions, sugar and salt and cook, stirring often until they cook down by two thirds, about 30 minutes. Add a generous 1 tablespoon pat of butter if you feel the bacon didn't yield enough grease. (I always do anyway)
Add the balsamic vinegar, reduce heat to low, and continue to cook until the onions are an even golden brown and softened, 15 minutes.
Stir often and scrape up any brown bits clinging to the bottom of the pan. while the onions cook, watch them closely, you don't want them to burn, just to become golden and caramelized.
Remove from heat, stir in the thyme, black pepper and cooked bacon. Allow the ingredients to cool slightly. Stir the cream into the caramelized onions until thoroughly combined.
Preheat oven to 350 degrees.
Place the filling in the 8" blind baked tart shell and spread it evenly with the back of a spoon. Sprinkle grated gruyere on top. Bake in oven until the filling is set, about 15 minutes.
Serve warm or at room temperature. Garnish with a sprig of thyme.