Preheat the pellet smoker to 225°F.
Mix together the brown sugar, garlic powder, onion powder, paprika, thyme, rosemary, salt, and pepper in a bowl.
Remove the pork tenderloin from the packaging, rinse, and pat dry. Trim any silver skin and remove any excess fat.
On a clean work surface, arrange the bacon in a single layer, with long edges barely overlapping. Make a 10 to 12” rectangle, long enough to cover the length of your tenderloin.
Place the tenderloin in the center of the bacon and season both sides with the dry rub mixture, rolling it over to cover it evenly.
Brush your choice of BBQ sauce over the pork tenderloin, rolling to coat both sides.
Wrap the bacon slices around the tenderloin. Start with the last bacon strips of bacon you placed down to make the rectangle, wrapping at an angle to create a bacon weave and tucking the edges in until you reach the end. Secure the ends with toothpicks.
Place the bacon-wrapped pork tenderloin in the smoker and cook for 2 hours, brushing with BBQ sauce and flipping halfway through.
If you like soft bacon, brush the outside with BBQ sauce once more when the pork tenderloin reaches 130°F and smoke until it reaches a final internal temperature of 145°F
If crispy bacon is more your style, take the fully cooked pork tenderloin out at 145°F and broil it in the oven for 2-3 minutes before serving.
Remove the pork tenderloin and let it rest for 10 minutes. Remove all the toothpicks before slicing and serving hot.