In a certain way both, and in another certain way, neither.
Normally the term "whistleblower" is only used when we speak of a country, company, organization, whatchamacallit, doing things that are definitely unethical, or even illegal. Of course, those who are accused are never happy about the revelations, no matter how true they are. When it handles defamation, in other words, lies, then we can't speak of a whistleblower, can we? So let's just keep it to cases where the accusations are actually true. Then we can at least speak of people who did the right thing, or at least what they felt themselves to be right. Bringing this stuff up does seem heroic. When I should bring up Snowden, like OP did, I'm sure he's not happy he has to stay in Russia now, where the U.S.A. cannot touch him without violating the sovereign status of Russia.
In a few Dutch cases I've seen people who were once respected, who now have to live in a caravan, and who are completely dependent on what friends and family can miss when it comes to very trivial things as food, just because the accused party was not happy about the entire case, which happened to be true and even led to accepted motions of no-confidence, yet the whistle blower who brought it all to the light was thanks... well... like that... Stories like those are not really motivating to bring bad stuff to light, are they?
I don't like to speak of "heroes". And I am also not very fond of the term "traitor" either. Hushing crimes up can also be a criminal offense by itself. And if the bad stuff you did not bring up all because you were afraid of what other whistleblowers got, you can when everything is discovered also be in a bad situation.
I remember some people who talked to the Dutch news channels about huge violations in the Dutch laws about toxic emissions at a company somewhere near the Rotterdam harbor was made unrecognizable and his voice was distorted with a computer. Shows that the risk to talking to the press are high. In that sense they can be seen as "heroes".
And when it comes to traitors... Just because I am Dutch, does that mean I should hush up any bad stuff the Dutch authorities would do (if I knew about them) knowing they are bad for my countrymen and maybe also for authorities and/or civilians abroad, because I'd otherwise be a traitor? Not that I know of such things, but if I did, what should I do? That's a nasty question, isn't it?