The stock price of Datadog (DDOG 1.19%) hit all-time highs in November of 2021. But in 2022, it was all downhill as high-growth cloud stocks fell out of favor with investors in a rising interest rate environment. The company reported fourth-quarter 2022 earnings in mid-February of this year that failed to give investors much hope that things would improve in 2023. While it beat analysts' revenue and earnings estimates, its guidance did not meet expectations.

The near future looks rough. Many think the economy could sink into recession; the outlook for the company seems bleak, and its stock price continues to drop. So should you invest in Datadog, a company with a reputation as a high-quality, long-term investment, or should you wait and see how the economy shakes out?

Datadog faces significant short-term headwinds

As interest rates began rising in March 2022, spending on Datadog's products declined, and it worsened across that year. In the chart below, you can see year-over-year revenue growth fall off a cliff, quickly followed by the company becoming unprofitable. Growth investors are much less interested in unprofitable companies with decelerating revenue growth, so it's no wonder the stock price dropped.

DDOG Chart

DDOG data by YCharts.

For the first quarter of 2023, Datadog forecasts revenues between $466 million and $470 million. At the midpoint, $468 million represents 29% year-over-year revenue growth, a sharp decline from last year's 83% revenue growth and fourth-quarter 2022 year-over-year revenue growth of 44%.

During the company's fourth-quarter earnings call, Chief Executive Officer Olivier Pomel identified two headwinds: Larger-spending customers are allocating less cash toward cloud usage to conserve resources in an uncertain market, and the annual seasonal slowdown in the second half of December was more substantial than in the previous years. So the stock price could continue moving downward, especially since the company forecasted revenue growth slowing more than analysts like.

More worrying, management made its first-quarter 2023 projections well before the March 10 collapse of SVB Financial, which some people believe raises the odds of further slowing in the U.S. economy and possibly a recession. So Datadog's short-term prospects look bleak.

Datadog is an excellent long-term investment

This company is the lead dog in observability solutions, which helps information technology (IT) teams detect abnormalities, analyze issues, and resolve problems within applications and digital infrastructure. Observability was a $41 billion market in 2022.

An image shows the size of the observability market.

Image source: Datadog.

In the fourth quarter of 2022, Forrester Research named Datadog a leader in Artificial Intelligence for IT Operations. The same year, Gartner called it a leader in the Gartner Magic Quadrant for APM (application performance monitoring) and Observability.

The image shows Gartner's Magic Quadrant for Application Performance Monitoring and Observability.

Image source: Datadog.

The company landed 4,400 customers in 2022, up 23%, to bring the total to 23,200. More importantly, customers with annual recurring revenue (ARR) of at least $100,000, from which Datadog generates 85% of its ARR, rose 38% to 2,780. And customers with ARR of $1 million or more rose 47% to 317. This trend shows that the company is rapidly gaining larger customers.

Gross revenue retention (GRR), the percentage of recurring revenue retained from existing customers (including downgrades and cancellations), remained stable in the mid- to high 90s. This solid number indicates that Datadog keeps a high percentage of the customers it lands, which is especially important in this heavy cost-cutting environment. Many users consider its products vital to their IT operations.

The company also maintained a dollar-based net retention rate (DBNRR) of more than 130%, meaning that existing customers increased their purchasing and usage of Datadog's products by 30% in the fourth quarter of 2022. DBNRR measures a company's revenue from existing customers (including downgrades and cancellations) and the revenue generated from cross-selling or upselling additional products to the existing customer base.

Datadog's excellent GRR and DBNRR metrics mean its customers have become increasingly invested in its platform. With each new product customers buy, the effort and time they'd need to spend to switch to a competitor's products become increasingly untenable. Some investors call this effect a switching-cost moat and consider it a precursor to a company achieving and maintaining profitability.

Should you buy Datadog stock?

The market values Datadog's stock at a price-to-sales (P/S) ratio of 12.80, near the lowest valuation since early in 2020, as seen in the following chart.

DDOG PS Ratio Chart

DDOG PS Ratio data by YCharts.

Cloud computing adoption is one of the most significant secular trends driving Datadog's long-term revenue growth, and the evolution of the cloud has only just begun. According to Gartner, cloud spending at the end of 2022 was approximately $500 billion, or around 10% of global IT spending. The research company projects cloud spending to reach $1 trillion by 2026, or 17% of global IT spending.

If you are a long-term investor who believes that even a recession won't stop cloud migration or digital transformation, now is a great time to invest in Datadog's upside over the next three to five years.