In the past, details such as make, model and serial number were destroyed after five days. Only handgun purchases were permanently recorded.
But supporters said that left a huge gap in the law and proposed AB809 to bring "much-needed uniformity," treating long-barreled firearms more like handguns.
Co-sponsors from the San Francisco-based Law Center to Prevent Gun Violence called it "critical" for tracing guns found at crime scenes. Also, the group said it will help police take guns from convicted felons, the mentally ill or others who are not permitted to have them.
Despite the notoriety of handguns, long guns factor in many crimes, the center said.
Many of the state's law enforcement chiefs agreed.
"I don't think you're going to stop violent crime with this but it will be another tool to help fight illegal weapon possession," said Sonoma County sheriff's Capt. Rob Giordano.
The National Rifle Association opposed AB809, saying it only burdens those who obey the law.
Gov. Jerry Brown signed it in 2011 following renewed debate about gun control. Earlier this year, within months of the massacre at Sandy Hook Elementary School, Brown vetoed seven other gun bills, including a ban on semi-automatic rifles with detachable magazines.
Ironically, firearm sales have spiked each time a new law is proposed, gun sellers said.
Fear that the government is trying to limit access to certain models or take guns altogether leads to a run on rifles, shotguns and pistols, said Gabriel Vaughn, owner of Sportsmans Arms.