Middle and high school can be a theater of cruelty, where insecure teenagers find reassurance by tormenting someone weaker and more vulnerable than they. Sometimes humiliation drives a young victim to suicide. Less often, a young man decides to revenge himself on his real or perceived persecutors with firearms. Because the consequences can be life and death, school districts are increasingly held responsible to prevent bullying and guard against violence, with potential liability when they do not.

Social media has made louder and more pervasive the cruel things that used to be said among teens in the cafeteria and written on the bathroom walls. But it has also made these things more visible to adult authority. Not only have social media posts been used as evidence after the fact, but school administrators increasingly pay attention to the stream of student chatter to anticipate and prevent trouble.

One suburban Los Angeles County school district has taken this development to its logical conclusion. Glendale Unified School District has hired a contractor to monitor the public Facebook, Twitter, YouTube and Instagram posts of its students aged 13 to 18, and to provide a daily report covering bullying, violence, presuicidal despair, drug and alcohol abuse, and vandalism. The district defends the program on the grounds of student safety. Not surprisingly, critics denounce the measure as “big brotherish,” and students are less than pleased.

We think that those who have criticized Glendale’s actions as an invasion of privacy are mistaken. What they are characterizing as privacy is actually its cousin, obscurity — the ability to speak and act in public with impunity because no one who matters will notice or remember what is said and done.

While the crowd is in public, to be lost in the crowd is to be invisible, and therefore safe. But social media deliberately negates obscurity. An open post on one’s Facebook page, or Twitter account, or YouTube, publishes to the universe of potential viewers what you said and did. That universe includes anyone who chooses to pay attention, including parents and teachers. Because social media creates a permanent record, and because computer searching is so inexpensive, the cost of attention has become cheap.

As long as scrutiny is limited to public postings, protected accounts are not hacked, and permission to access protected space is not coerced, Glendale doesn’t appear to be violating either the Fourth Amendment or federal statutes governing electronic privacy. Obscurity is another issue. The law is little developed on the issue of when the government can pay systematic attention to an individual’s public activities. Given the age of the students scrutinized, the in loco parentis responsibility of the school board and its potential liability for failure to protect students, we would not be surprised to see that it is authorized to observe its students’ public behavior that can impact school safety and discipline. We also would not be surprised to see the savvier among the students, who are probably ahead of the technological curve, shift the conversation to more private electronic forums.

That being said, we think there are limits on the school’s legitimate interests. Teenagers talk and act indiscreetly about all sorts of things — sex, politics and their opinion of adult authority not least among them. Pedagogues have often been known to respond to youthful experimentation in these areas without common sense. The school district has no legitimate need to know information that does not involve student safety or violations of law, and the attention and reports of its contractor should be limited to those topics.

Glendale is a small example of a much larger phenomenon. As technology and changing mores move us toward the end of obscurity, and it becomes much easier to collect information about public behavior, the courts are going to have to start asking questions not much asked before now: When may the government pay systematic attention, what is its legitimate need to do so, and to what end can it use what it collects?