Note: you can make the topping ahead of time and store it in the refrigerator, in an air-tight container. Warm it up slightly before adding to the brie and baking.
Caramelized Onions:
Half the onions, cut off the tip, peel the outer skin, and slice onion thinly to the root. Discard the tip and the root.
Heat up a cooking pan over medium heat and add oil. Add sliced onions and season with salt and a little sugar. Mix onions to evenly coat them with oil and seasoning. Lower the heat a little and cook onions over medium-low heat.
Stir onions every 5-10 minutes. When onions seem a little dry, add the butter and stir it in.
The total time will take 45-60 minutes. Make sure to scrape the pan as onions are caramelizing. Don't try to rush it or raise the heat because the onions will sear instead of caramelizing. Wait for them to naturally caramelize and brown.
Filling:
Mix caramelized onion with crushed pecans and thyme. Set it aside.
Baked Brie:
Preheat the oven to 400°.
Make sure puff pastry is completely thawed. Roll it out a little.
Slice the rind off the top of the brie circle and place it cut side up in the middle of the puff pastry sheet.
Spread caramelized onions topping evenly over the brie.
Bring the edges of puff pastry together, fold them over in a nice shape and make sure that all openings are sealed well so the cheese doesn't leak out.
Whisk egg white and brush the outside of the pastry all over.
Place covered brie onto a lightly greased baking sheet and bake for about 30 minutes, until pastry is golden-brown.
Take it out of the oven and let it rest for about 10 minutes before cutting