Bug tracks. Generally harmless. I think the larva are just between the bark and wood and the track left has resin staining it. I think the larva exit through the bark and are never actually in the wood itself.
I believe it's sawflies that cause these. Very common in HHB and seen in Birch too.
Here's a quote from a wood site:
Fly larvae create distinctive marks The dark, thin streaks of varying length running with the grain that you'll often spot on basswood, birch, cherry, maple, and willow boards were made by fly larvae. These pith flecks result from the burrowing of the larvae down through the cambium layer of the living tree toward the ground. The wound heals after the larvae pass, but the tissue turns dark. The pith flecks don't weaken the wood. It only looks bad.