A protester with the group 'Raging Grannies' holds a sign during a demonstration outside of Facebook headquarters on April 5, 2018 in Menlo Park, California.

Investors should not let Facebook's earnings disaster last week scare them out of the entire technology sector, Goldman Sachs' David Kostin says.

"While FB's decline [last] week highlights the risk inherent in a narrow-breadth market, market performance in its wake supports our strategic preference for Technology and growth stocks," Kostin, the bank's chief U.S. equity strategist, said in a note Friday. "Although Tech sector valuations stand near cycle highs, they remain low relative to long-term history."

Market breadth refers to the number of advancing issues in a market versus declining ones. A large number of advancing issues is a bullish signal for market sentiment. Lately, breadth has been narrowing with fewer stocks pushing the broader market higher. In fact, the top 10 contributors of gains in the S&P 500 have accounted for two-thirds of the index's overall returns this year, Kostin said.

But Kostin said that from a historical perspective, "market breadth has not yet narrowed enough to signal investing danger," noting that: "Unlike past episodes of narrow market breadth, the earnings environment today appears healthy and broad-based. The top 10 S&P 500 stocks currently account for 20% of index earnings, roughly the same as in each of the last few years, and slightly below the 30-year average of 21%."

Facebook shares posted their worst day ever Thursday — falling 19 percent — a day after reporting weaker-than-expected revenue and disappointing global daily active users, a key metric for the company.

The social media company's steep decline put pressure on the broader tech sector, which is down 3.6 percent since the release of its quarterly results through Friday's close. Tech shares added to their losses Monday, dropping 1.3 percent as Facebook and Netflix both fell more than 3 percent. Amazon and Google parent Alphabet also declined 0.6 percent and 1.4 percent, respectively.

Tech's fall has raised concern about the market's narrow leadership since most of this year's returns in the S&P 500 come from large-cap tech names like Facebook. In fact, the social network's losses led to hedge funds losing nearly $6 billion. Facebook was hedge funds' favorite stock before the drop, according to a previous report by Goldman.

Still, tech stocks are the best performers year to date. Through Friday's close, the sector is up 14.1 percent while the overall index has gained just 5.4 percent in 2018.

Kostin said that while the sector is still a favorite among hedge funds, "1Q position filings showed that tilts in the sector are smaller now than they were in 2016 and 2017. Other positioning data including our Sentiment Indicator suggest overall portfolio length has declined significantly in recent months, reducing concerns of crowding."

He also said, "The pricing power of many Tech firms should help insulate them from the margin risks posed by escalating trade conflict."