Draw line from armature animation
You could try the BTrace Blender Addon for that purpose.
I don't know if it can track armatures, it might only work on meshes, not sure but you can probably easily add a mesh to your armature to accomplish the desired effect