For years, many of the city’s homeless have opted to spend the night on sidewalks, street corners and subway cars rather than risk the perils of a shelter system that they say is often fraught with violence.

And up until two recent news reports by the New York Daily News and cable channel NY1, which detailed some of the violent incidents in the city’s vast shelter system, many of those incidents remained largely unknown to the public.

But that lack of transparency by the Department of Homeless Services could soon change.

On Wednesday, legislation will be discussed at a city council hearing that would require DHS to produce an annual report detailing and breaking down into categories “critical” violent and nonviolent incidents in homeless shelters throughout New York City as well as safety measures taken to address the issues.

Vania Andre, a spokesperson for Brooklyn Council Member Jumaane Williams, who sponsors the bill, said that they’re uncertain about all the factors that DHS tracks as "critical," since the agency recently adjusted its definition of such incidents to include crimes such as child abuse and neglect.

Andre added that DHS does not publicly release incident information — only aggregate numbers per 1,000 residents without detail — but thanks to a recent Daily News story, based upon a freedom of information law request, specific numbers and details on violent incidents in the city’s shelter system were uncovered for 2015.

That Daily News story painted a bleak picture of the shelter system with numerous residents describing dangerous and hostile environments, with nearly 1,700 critical incidents occurring annually including more than 800 classified as violent.

One resident of the Women’s HELP Center in East New York said that assaults of all kinds are commonplace. “I’ve seen all kinds of things at the shelter,” said a 39-year-old resident who would only give her name as “Smurf.”

“I’ve seen everything from fights and robberies to even some of the guards exchanging sex for cigarettes and other privileges,” she said.  

DHS security at its 600-plus buildings around the city utilizes a combination of peace officers and private security.

Andre said that the council bill includes metrics to better gauge the levels of security at various shelters. “We want to get more info at the hearing,” she said.

“Collecting data about the number of violent incidents that take place in the city’s shelters is the first step to remedying the problem,” said Council Member Williams. “If people do not feel safe, then the impact DHS could have on New Yorkers’ lives is thwarted. I look forward to seeing the NYPD and DHS working together to address this issue.”

Last month, the de Blasio administration announced an overhaul of homeless services designed to improve safety in homeless shelters with the NYPD taking a lead role in the retraining of all DHS security staff in addition to a plan to upgrade security at all shelter facilities.

The administration also announced a new and more extensive reporting system for incidents that occur in shelters as part of a 90-day review ordered by the mayor.

“DHS has a responsibility to ensure the safety and security of all its clients,” said DHS spokesperson Nicole Cueto. “That is why we instituted a top-down review of how we report and track all types of incidents at facilities involving residents and staff.”

Commenting on homelessness in general, Becky Blanton, a Virginia-based journalist and author of “The Homeless Entrepreneur,” who was homeless herself from 2006 to 2009, said that living in shelters is not for the faint of heart.

“Shelters really are horrific,” Blanton said. “People think shelters are hotels, but the truth is, prisoners have it better!”