In a large skillet, melt butter over medium-low heat. Add onions and cook for 40 minutes, stirring occasionally, until deep mahogany brown and caramelized.
Preheat convection oven to 350°F (175°C).
In a large mixing bowl, combine the ground beef, breadcrumbs, egg, beef consommé, Worcestershire sauce, thyme, salt, pepper, and one-third of the caramelized onions.
Shape the mixture into a rectangular loaf and place on a wire rack set over a rimmed baking sheet.
Bake for 50 to 60 minutes, or until the internal temperature reaches 160°F (71°C).
Allow the meatloaf to rest for 10 minutes before slicing into 1-inch thick portions.
Arrange sourdough slices on a baking sheet. Place one meatloaf slice on each piece of bread.
Top the meatloaf slices with the remaining caramelized onions and the shredded Gruyère cheese.
Place under a broiler for 2 to 3 minutes until the cheese is melted, bubbly, and gold-brown.