What insect is this?
The photos lack the detail needed to identify the insects. Consequently we don't know whether you should be concerned,
The multiple holes in the trunk indicate that the tree is infested with borers. It's possible that the flying insects might be parasitic wasps that prey upon borer larvae. Go here to learn about them:
Go to the October entry here:
On the other hand, some adult wood borers are wasp-like so the insects in the photo could the the adult form of the borers themselves.
Learn more here:
If you reply to this message and attach sharp closeup photos, we may be able to identify the insects.
By the way, the extent of borer damage shown in the photo suggests that the tree's days may be numbered. Consider asking a certified arborist or forester to assess it's health and determine whether it could pose a hazard to anything nearby.
Thanks Bob. Clearer photo attached. How do you know the holes are from borers rather than woodpeckers? That was the opinion we received from the tree trimmer. Next time we will check with the certified arborist. Kelly
By now, if you have visited the websites posted in our original message, you may have concluded as we have (thanks to the most recent photo) that the flying insects are ichneumon wasps. The wasps are probably preying on borer grubs in the wood. In that respect they are beneficial. Female ichneumons have long ovipositors that enable them to penetrate the wood. Males lack the ovipositors. We can't identify the wasp species (there are many) with certainty.
Learn more here:
The tree trimmer might have concluded that woodpeckers made the holes because they resemble holes made by yellow-bellied sapsuckers, a kind of woodpecker that feeds on sap. However, sapsucker holes are round and arranged in parallel rows. Also, the holes shown in the photos are D-shaped which is typical of those created by many species of wood boring insects. Compare the holes made by sapsuckers shown here: