Investing in initial public offerings isn't as simple as it seems. As famed value investor Benjamin Graham explained: In the short run, the stock market is a voting machine, tallying up which tickers are most popular. In the long run, it's a weighing machine, measuring which businesses have collected more money.

The problem with IPOs is that demand almost always outstrips supply of shares. This creates a situation where stocks explode after going public -- as a "new" stock is very popular -- only to come back to earth a quarter or two later. So shying away from recent IPOs is generally wise.

But this month, I've made an exception. I recently purchased shares of PagerDuty (PD -1.38%) -- which hit the public markets just last month. Once you get past the name, there's a lot to like.

Trees growing on stacks of coins with the letters IPO on them

Image source: Getty Images.

What PagerDuty does

This company was born out of necessity. A decade ago, Alex Solomon was an engineer at Amazon. He and his colleagues were constantly on call (in other words, on "pager duty") to fix bugs in the code employees used internally. He realized that often, the wrong people were being alerted at the wrong times -- wasting lots of time and energy.

He wanted to build a service that could collect all of the signals being sent by a company's software and make sense of it. That way, IT teams could get a much better idea of where problems were arising, so they could efficiently focus their efforts there.

PagerDuty now has five different products to help IT teams monitor the performance of their technology: On-Call Management, Modern Incident Response, Visibility, Event Intelligence, and Analytics. Subscription plans can range from as low as $10 per user per month to as high as $139 per user per month.

Don't take my word for it

I'm not an IT person. Instead of evaluating PagerDuty's technology myself, I think it's instructive to look at how much customers do -- or don't -- like its solutions.

There are a couple of different ways to measure this. The first is by measuring the total number of PagerDuty clients that pay at least $100,000 in annual recurring revenue:

Chart showing PagerDuty customers paying at least $100,000 in annual recurring revenue

Data source: Filings with the Securities and Exchange Commission. Chart by author.

Note that each bar above shows an increase by quarter, not year. That means the roster of customers paying over $100,000 per year has increased at an annualized rate of 53%.

But that's not all: The company is able to continually upsell its existing clients. It does this by offering new tools (like the five above) and getting companies to sign up more users.

The best way to monitor this is by the company's dollar-based net retention. This takes the total amount of recurring revenue collected in year one, and compares it to the recurring revenue collected from the same cohort in year two. By factoring out new customers, this tells investors whether companies continue to use PagerDuty and -- if they do -- if they are adding more solutions over time.

In general, investors want to see net dollar retention near 100% -- which means current customers stay on board -- but the higher the better. Here again, the picture looks very bright:

Chart showing net dollar retention at PagerDuty over time

Data source: SEC filings. Chart by author

Most companies would kill for metrics like this. In general, PagerDuty customers are not only staying with the company, but also paying between 35% and 40% more every year. You can imagine how quickly that high-margin revenue compounds.

Protected by double moats

But here's what I'm most excited about: The competition may never catch up to PagerDuty. I say that because the company has two widening moats forming around it.

The first is high switching costs. We've already established that PagerDuty's customers are adding more tools and users as time goes by. As PagerDuty's solutions become more and more ingrained in its customers' businesses, the costs (money, time, data migration, and retraining headaches) of switching to a rival become too high. As long as the product continues working -- and the price is reasonable -- these customers are locked in for the long haul.

But that's not the only benefit. Solomon -- who still owns 5.8% of shares and serves as chief technology officer -- says the company could one day serve a much bigger function: predicting "the weather" of the Internet. By this, he means that using machine learning and artificial intelligence -- and applying them across all the company's customers -- PagerDuty could predict internet problems around the world before they even happen.

This helps give PagerDuty a sneaky network effect. Each additional customer provides more data; over the long run, this will make the service more valuable. Given its head start in the niche, I think other companies will find it tough to match what PagerDuty has to offer.

Investor takeaway

By no means do I think you should "back up the truck" with PagerDuty. Personally, I bought enough shares to account for just under 2% of my overall portfolio.

If the company continues executing as it has in the recent past, I expect that allocation to grow: both because the stock goes up, and because I buy more and more over time. If you're interested in a Software-as-a-Service (SaaS) company with a growing moat, and one that's still valued at less than $4 billion, you should consider doing the same.