Collecting data on such massive scales is literally FB's whole business.
But with that also comes a responsibility that shouldn't simply be waved away with "But they are so big, it's so difficult!"
Because when it's about monetizing their massive amounts of, often illegally collected, data then FB seem to have no issues having everything in order and getting stuff to work, regardless of how "difficult" it might be.
Probably has to do with the fact that there's no money in protecting users data properly and FB seems to be pretty much immune from negative PR having any bad consequences.
Of course at FB scale you'd automate this by creating a set of canary accounts with unique passwords that you perform a search for in the ETL pipeline, or some other handy place. This will at least catch inadvertent plaintext password logging.
>Ensuring that sensitive data isn’t logged takes more than some occasional greps.
Right; it requires investment into process, requirements, testing, and oversight. Most importantly, it requires a company wide, top down mentality that your customer's privacy and protection is more important than your margins.
If you can't (won't) dedicate the resources required to ensure your customers data is protected then you have no business operating at such a scale.
Treat logs as liabilities: why can't you solve the issue I experienced yesterday?
You can't win. Either you log more than you think you need right now or you can't do engineering investigations on past data. You're going to end up somewhere in the middle realistically.
This explains a lot of the comments here. Facebook’s scale is not like anything most engineers have worked on. Facebook probably has logs in the 100s of terabytes. Ensuring that sensitive data isn’t logged takes more than some occasional greps.