Preheat the oven to 400°F. Line a large rimmed baking sheet with parchment paper and place the pork loin in the center.
In a small bowl, stir together the Dijon mustard, whole grain mustard and olive oil. Rub the mixture all over the pork, then season both sides with salt and pepper.
In a large bowl, toss the carrots, red onion (if using), garlic, balsamic vinegar, melted coconut oil and thyme. Season with salt and pepper and toss again.
Spread the carrots in a single layer around the pork on the baking sheet and pour any juices left in the bowl over the top.
Roast for 20 minutes, then flip the pork. Roast for another 15 to 20 minutes, until an instant-read thermometer in the thickest part of the pork reads 145°F and the carrots are tender and caramelized. If you're using two pork tenderloins, start checking the temperature after about 25 minutes total.
Let the pork rest for 3 to 5 minutes before slicing. Serve warm with the roasted carrots and any pan juices spooned over the top.
Notes
Pork tenderloin: Two 1-pound pork tenderloins work in place of the pork loin. They're thinner, so start checking the temperature after about 25 minutes.Doneness: Pork is safe and juicy at 145°F followed by a short rest. A thermometer is the easiest way to get it right, since pork loins vary in thickness.Storage: Refrigerate leftovers in an airtight container for up to 3 to 4 days. The cooked pork freezes well for up to 3 months.