Heat a saucepan over medium-high heat and add the butter. When the butter has melted lower the flame to medium-low and add the thinly sliced onions, and sauté until the onions start to turn golden, around 4-5 minutes. Add the pear to the onions, stirring occasionally until caramelized and golden, around 10-15 minutes, making sure to not let the onions burn. Mix in balsamic vinegar and 1 tablespoon brown sugar and raise the flame a little and continue to cook until most of the liquid has been reduced. Taste and add more brown sugar to taste.