caramelize onions
Cook the sliced onions in a skillet along with the beef broth and thyme. Cook, stirring often, for 20-25 minutes or until they're deep golden brown.
cut the pork loin
Butterfly the pork loin to create one large rectangle. Use a meat mallet to flatten it to an even thickness.
add onions
Season the pork loin, then spread 3/4 of the caramelized onions on top. Leave a border about 1/2 to 1-inch.
add the cheese
Sprinkle half the Gruyere over the onions. Roll up the pork loin, starting from the side cut from the center, then secure with butcher's twine.
smoke
Place on the Traeger grill grates and smoke at 225°F for about 2 hours or until the internal temp is 135°F.
top
Increase to 375°F and cook another 10-15 minutes, adding the remaining cheese and onions to the top during the last 5-10 minutes of cook time. It's done when the internal temp is 140-145°F.