SAN FRANCISCO — Barack Obama appeared to lob a thinly veiled jab at his replacement in the White House at a technology event here Wednesday, marking a rare public rebuke from the former president.

Speaking at a private event hosted by data company Splunk, Obama explained how he had approached the job, including some 3,000 political appointments, before offering this advice: “The other thing that is helpful is not watching TV or reading social media."

“Those are two things I would advise, if you're our president, not to do,” he said. “It creates a lot of noise and clouds your judgment.”

President Trump is, of course, frequently on Twitter and has been known to watch hours of cable news daily. In the roughly one-hour fireside chat, Obama never directly referred to Trump or his administration.

But that comment, along with another highlighting that the Obama administration avoided any indictments, seemed tailored to the largely liberal San Francisco audience.

“I’m proud of the fact we didn’t have indictments,” during his two terms in office, he said. “I’ve said that before, but that is pretty rare in modern day.”

Trump’s former national security adviser, Michael Flynn, pleaded guilty to lying to the FBI about contacts with a Russian ambassador — related to the investigation into Russian interference in the 2016 presidential election. Former Trump campaign chairman Paul Manafort was convicted of tax- and bank-fraud charges.

Obama has seldom weighed in on current politics since leaving office in 2017. Former presidents typically refrain from criticizing successors out of tradition, even if they are from different political parties.

This summer, Obama shared in a tweet a link to an op-ed that criticized Trump for comments he had made regarding four congresswomen of color, seeming to endorse it.

On Wednesday, Obama cautioned against what he called “opinion wrapped up as fact.”

Too much focus on polls or “the intensity of the passion of a very small subset of people,” he said, “will sway your decision-making in an unhealthy way."

The former president singled out climate change, political divisions globally and income inequality as three major issues that could cause significant problems if they’re not addressed properly.

Obama otherwise largely steered clear of any commentary on Washington. He spoke at length about parenting, noting he had “wept” after dropping off his daughters at college.