The year 2022 is shaping up to be quite challenging for the U.S. equity market. Surging inflation is expected to result in the Federal Reserve continuing to hike benchmark interest rates which can further stifle economic growth in the near term. Not surprisingly, both the S&P 500 and the Nasdaq Composite are down 17% and 24%, respectively, year to date.

While bear markets can be painful for many investors, they offer a window of opportunity for bargain-hunting investors searching for fundamentally strong businesses. Corporate spending in areas such as networking, security, and monitoring will be less affected during a recession, considering that these are business-critical services. Hence, companies such as Cloudflare (NET -2.03%) and Datadog (DDOG -1.80%) should continue to grow even during difficult market conditions.

Here's why these companies can prove to be attractive investment opportunities in July 2022.

1. Cloudflare

Shares of leading cloud-based content delivery network (CDN) and distributed denial-of-service (DDoS) cybersecurity player Cloudflare (NET -2.03%) are down by over 56% so far this year. Investors are nervous about free-cash-flow-negative stocks in difficult economic times. The company is also yet to be profitable, mainly due to significant share-based compensation expenses among other general and administrative expenditures. Despite these challenges, the extent of the share price correction seems unjustified.

Cloudflare's cloud-native edge-based network (data computation is performed at localized data centers that are closer to end users instead of at a centralized location) extends across 270 cities in more than 100 countries across the world. The company provides a highly efficient, scalable, cheap, and secure software-based networking solution to its clients, which helps improve the performance, reliability, and security of their business-critical applications and software infrastructure. The company also offers tools for developers to build and run custom programmable applications on the Cloudflare platform.

Cloudflare has managed to successfully implement a "freemium" pricing model. Here, basic networking and security services are offered for free to clients, and customers must opt for paid plans to access advanced features. The strategy seems to be working well, considering that the number of the company's paying customers has increased annually at a compounded average growth rate (CAGR) of 28% from 73,555 in the first quarter of 2019 to 154,109 in the first quarter of 2022 (ended March 31, 2022). The company's large customers (paying annualized revenues over $100,000) have grown annually at a much faster pace with a CAGR of 66% from 336 to 1,537 in the same frame.

Cloudflare reported a dollar-based net retention rate (DBNRR) of 127% in the first quarter. This means that paying customers as of the first quarter of 2021 spent 27% more on Cloudflare's solutions in the first quarter of 2022, including the impact of client churn. With clients opting for more of Cloudflare's products, the harder it has become for them to switch to the competition. The company's gross retention rate of over 90% highlights the stickiness of its customer base.

Cloudflare is currently targeting a total addressable market of $115 billion, which is expected to be worth $135 billion by 2024. Against this backdrop, with the company clocking in revenues of only $656 million in 2021, there remains significant potential for future growth in the coming quarters.

2. Datadog

Leading application performance monitoring and observability player Datadog's stock has fallen 40% so far this year. This fall can be attributed mainly to broader market declines. However, the company's fundamental story is intact.

Datadog has managed to grow its revenues year over year by over 65% since 2017. The company is targeting a market estimated to be $42 billion in 2022 and is expected to grow to $53 billion by 2025.

Datadog's customer count has grown year over year by 30.3% to 19,800 at the end of the first quarter (ended March 31, 2022). Currently, 81% of customers use more than two products, and 35% use more than four products. The company has reported an impressive rise in the number of large enterprise customers (paying annual recurring revenues of over $100,000 and $1 million). Additionally, existing clients have been consistently spending more on Datadog's solutions in subsequent years, which is evident from its DBNRR of over 130% for the past 19 consecutive quarters. The company's dollar-based gross revenue retention rate of over 95% also highlights its low customer churn. A sticky customer base that includes several large clients coupled with an effective upselling strategy can enable Datadog to withstand recessionary pressures.

Datadog is not yet a profitable company. However, the company is already cash-flow positive. The company is currently trading at 13.2 times forward sales, the lowest it has been since January 2021. Considering all these positives, this growth stock seems like a smart long-term investment.