Preheat your oven to 400°F (200°C).
Heat olive oil in a large skillet over medium heat.
Add the sliced onions and cook until golden brown, about 15-20 minutes.
Stir in the thyme, salt, and pepper to the cooked onions.
Remove the skillet from heat and let cool slightly.
In a bowl, combine the sausage, cooled onions, and grated Gruyère cheese.
Roll out the puff pastry on a floured surface and cut into rectangles.
Place a spoonful of filling on one end of each rectangle and roll to enclose.
Place the rolls seam-side down on a baking sheet lined with parchment.
Brush the tops with beaten egg for a golden finish.
Bake for 25-30 minutes or until golden and puffed.
Allow to cool slightly before serving.