In a medium sized pan sauté the onion in olive oil for 4-5 minutes until softened then allow to cool slightly.
Add onion to a large mixing bowl along with the remaining ingredients and stir to combine. Add mixture to a 9x5 loaf pan or form into a loaf on a sheet pan coated with cooking spray.
Mix ketchup and brown sugar until well combined then spread evenly on top of loaf.
Bake for around 1 hour until the internal temperature reaches 160°F. Slice and serve warm.