Engineering · · 6 min read

You cannot fix what you cannot see: why APM matters.

Your servers say everything is fine. Your customers say checkout is slow. Application performance monitoring is how you find out who is right, and why.

By Precision Code Studios, Engineering team

Every engineering team eventually has the same bad morning. A customer writes to say the app is painfully slow. Someone opens the dashboards: processors idle, memory fine, every server green. Nothing is wrong, and yet something obviously is. The team spends the next four hours guessing.

Application performance monitoring, or APM, exists to end the guessing. It watches the software the way a user experiences it, request by request, and shows where the time and the errors actually come from.

What APM actually is

Infrastructure monitoring tells you whether your machines are healthy. APM tells you whether your product is. It does that by collecting a few kinds of evidence and tying them together.

  • Traces. The life story of a single request as it passes through every service, queue and database it touches, with a timing for each step.
  • Metrics. Numbers over time: how many requests, how fast, how many failed, how close to capacity.
  • Logs. The detailed record of what the code said it was doing, linked back to the request that caused it.
  • Real-user and synthetic monitoring. What actual visitors experience in their browsers and phones, plus scripted checks that test key journeys around the clock.
A trace of one checkout request: five steps as horizontal bars, with a slow database query highlighted as taking most of the time
An illustrative trace. Nobody has to guess which step is slow.

Why it matters more every year

A decade ago an application was often one program and one database, and a slow page had a short list of suspects. Today a single tap can cross a dozen services, a cache, a message queue, three third-party APIs and a cloud function. Each is fast on its own. The delay hides in the gaps between them, and only a trace can see across the gaps.

  • Users feel slowness before you see errors. A page that takes six seconds never raises an alarm. It just quietly loses the sale.
  • Finding the fault is most of the outage. Fixes are usually quick once the cause is known. APM attacks the long part: the search.
  • It replaces opinion with evidence. Performance debates end quickly when everyone can look at the same trace.
  • It pays for itself in cloud spend. The same data that explains a slow request shows which services are oversized and which queries burn money.

What good looks like

Buying a tool is the easy part. Teams that get real value from APM tend to share a few habits. They watch four signals for every service: latency, traffic, errors and saturation. They agree on a target for each important journey, such as checkout completing within two seconds for nearly all users, and they alert when that promise is at risk rather than when a processor gets busy.

Choosing a tool

The market falls into three camps. Commercial suites such as Datadog, New Relic and Dynatrace do nearly everything and are quick to adopt. Cloud providers offer their own, including Azure Application Insights, AWS X-Ray with CloudWatch, and Google Cloud's operations suite, which fit naturally if you already live in that cloud. And open-source stacks built on tools such as Prometheus, Grafana, Jaeger and Elastic give you control in exchange for running them yourself.

Whichever you choose, instrument your code with OpenTelemetry, the vendor-neutral standard for traces, metrics and logs. It means the expensive part, the instrumentation, belongs to you, and changing vendors later is a configuration change rather than a rewrite.

Where to start

  • Pick one journey that earns money. Sign-up, search or checkout. Instrument that end to end before anything else.
  • Turn on tracing across every hop. A trace that stops at the first service boundary answers nothing.
  • Set one honest target and one alert. Alert on what users feel. Delete alerts nobody acts on.
  • Review it weekly. Ten minutes looking at the slowest requests finds problems long before customers report them.

Software that nobody can see into is software run on hope. APM is how a team earns the right to say, with evidence, that the product is fast, and how it finds out first when it is not.

Keep reading

All insights