Preheat the oven to 350 degrees F.
Mix together the chili powder, brown sugar, dark chocolate, and coffee in a shallow dish. Coat the pork tenderloin with the mustard, then roll it into the chili powder mixture, coating well. Pat down to make sure the spices stick to the pork.
Add the oil to a large skillet over medium-high heat until smoking. Quickly sear the pork all over to get a golden brown color, turning constantly so the meat doesn't burn.
Put the pork loin on a baking sheet and roast in the preheated oven until required doneness is reached, about or 20 to 25 minutes. Remove the loin from the baking sheet to a cutting board and let rest for 5 minutes.
If needed, add a little more oil to the same skillet that was used to sear the pork. Heat the oil over low heat and stir in the onion. Saute the onion until soft, then add the chicken stock, root beer and apple juice. Simmer until the mixture is reduced to 1/2 the volume. Add the sour cream and stir until well combined.
Remove from the heat and stir in the butter. The sauce should be thick and glossy. Adjust the seasoning with salt and pepper, to taste. If the sauce is a little spicy, more sugar can be added.
Slice the pork into medallions and transfer to a serving platter. Serve with the root beer sauce on the side. Enjoy.