Preheat oven to 400 degrees F.
Thinly slice the onion. Heat up a pan with 1/2 a tablespoon of butter and add the sliced onion. Sauté it until a golden brown and cooked through. Add 1/2 tbsp of butter if needed.
Cut the puff pastry into the size you would like your tarts. I usually divide each puff pastry section into 5 pieces about 1 inch by 2 inches.
Beat the egg in a bowl and brush it onto the puff pastry.
Put a tsp of apricot preserves in the middle.
Place a dollop or a few crumbs of goat cheese on the apricot.
Then add the caramelized onion on top.
Spray a cookie sheet with cooking spray, or rub olive oil around it. Place the squares about 1 inch apart.
Bake for 10-12 minutes rotating the baking sheet halfway through.