In D&D 5e. the Ranger’s beast companion has a lot of special benefits, one of which is:
Add your proficiency bonus to the beast’s AC, attack rolls, and damage rolls, as well as to any saving throws and skills it is proficient in.
A Ranger could choose a beast for their companion that has an attack that deals damage in multiple components. For example, a flying snake, whose attacks deal 1 piercing damage + 3d4 poison damage. Would the proficiency bonus be added to the piercing damage, the poison damage, or both?