Don't attack it with any sort of weapon, even stone. It will electrocute you. If you need its bio toxin, just attack it with fists, and make sure to stay far enough away so that it doesn't sting you. I suggest finding a group of these guys near the surface so that you don't have to worry about bringing any tames, or looking out for aggressive dinos. Hope this helps :>
These things spawn on The Island at the bottom right of the map near the Lava Cave. These cheeky little buggers are more than happy to ruin your day by swarming and stunlocking you and your tames nonstop unless you are on a Basilosaurus, which is the only creature that is immune to their attacks. If you don't have a Basilosaurus, lure them close to shore and cheese it with a spear or pike, better yet pray that they beach themselves and die.