1. Preheat oven to 350°F. Line a rimmed baking pan with aluminum foil and spray with cooking spray.
2. Cook diced onion in butter over medium-low heat until tender. Let onions cool completely.
3. In a medium bowl, whisk together eggs, milk, and breadcrumbs. Let sit for 5 to 10 minutes.
4. Add ground beef, cooled onions, ketchup or chili sauce, Italian seasoning, parsley, salt, and pepper to the breadcrumb mixture. Mix until just combined.
5. Form mixture into an 8"x4" loaf on the prepared baking pan.
6. Bake loaf for 40 minutes.
7. While baking, mix chili sauce, ketchup, and brown sugar (if using) to make the glaze.
8. Spread glaze over the meatloaf and bake for an additional 15 to 30 minutes, or until the internal temperature reaches 160°F.
9. Broil for 1 to 2 minutes if desired for a caramelized top.
10. Let meatloaf rest for 10 minutes before slicing and serving.