APM

Also known as: Application performance monitoring

On this page 7

APM, or application performance monitoring, is the practice and tooling for measuring how an application performs from the perspective of its requests and users, combining response time, error rate and throughput with code-level traces that show where time is spent. In cloud observability, APM is the application-focused layer that sits above infrastructure monitoring: it answers whether a service is fast and correct, and which function, query or downstream call is responsible when it is not.

Modern APM grew out of agents that instrumented Java and .NET runtimes and has converged with distributed tracing, so that a single request can be followed across dozens of microservices, queues and managed cloud services. Today it is usually built on the same telemetry pipeline as metrics and logs, often through OpenTelemetry instrumentation.

How APM collects application telemetry

APM works by instrumenting the application runtime so that every incoming request creates a timed record of its execution. An agent or SDK hooks into web frameworks, HTTP clients, database drivers and message libraries, starting a span when an operation begins and closing it when the operation ends. Spans carry attributes such as the route, status code, SQL statement shape and host.

The spans of one request share a trace ID, which is propagated across process boundaries in headers such as the W3C Trace Context traceparent header. A collector or vendor backend assembles the spans into a trace, derives RED metrics (rate, errors, duration) per endpoint, and builds a service map from observed caller and callee relationships.

The table below summarizes the main instrumentation approaches and their trade-offs.

ApproachHow it worksMain trade-off
Auto-instrumentation agentBytecode or runtime hooks inject timing codeFast rollout, less control over detail
Manual SDK instrumentationDevelopers create spans in codePrecise business context, more effort
eBPF-based captureKernel probes observe network and syscallsNo code changes, limited in-process visibility
Service mesh telemetrySidecar or proxy records each hopUniform coverage, no function-level detail
Real user monitoringBrowser or mobile script times page loadsTrue user view, front-end only
Instrumentation approaches used by APM

Core APM signals and typical values

An APM tool reduces raw traces to a small set of service-level signals that can be charted, compared and alerted on. The most useful are latency percentiles rather than averages, because a mean of 120 ms can hide a p99 of several seconds that a meaningful share of users experience.

Typical values depend heavily on the workload, so the ranges below are orientation points rather than targets.

SignalWhat it measuresTypical range for a web API
ThroughputRequests per second or minuteTens to tens of thousands per second
Latency p50Median response timeAbout 10-200 ms
Latency p99Slowest 1% of requestsOften 3-10 times the median
Error rateShare of failed requestsUsually well under 1%
Apdex scoreSatisfied versus tolerating users0 to 1, above 0.9 considered good
SaturationPool, thread or queue usageWarning above about 80%
Key APM signals

These signals align closely with the golden signals of latency, traffic, errors and saturation, and they are the natural raw material for a service level indicator. A well-configured APM setup therefore feeds service level objectives and error budgets directly instead of maintaining a separate measurement path.

APM compared with neighboring observability practices

APM overlaps with several other observability terms, and the boundaries are practical rather than strict. The key distinction is scope: APM is centered on the application and its requests, while the other practices either supply raw signals or examine a different layer.

PracticePrimary questionRelation to APM
Infrastructure monitoringAre hosts and containers healthySupplies context, not request detail
Distributed tracingWhich path did one request takeCore data source of modern APM
Log managementWhat exactly happened in an eventLinked from traces for root cause
Continuous profilingWhich code consumes CPU or memoryComplements traces at function level
Synthetic monitoringDoes a scripted check succeedTests availability without real users
How APM relates to other practices

Commercial suites such as Datadog bundle all of these into one product, while open-source stacks often combine Prometheus for metrics, a tracing backend and Grafana for dashboards. Both models deliver APM; the difference lies in integration effort, cost model and data ownership.

Choosing and configuring an APM setup

The most important configuration decision is the sampling strategy, because tracing every request of a busy service is expensive to transmit and store. Head-based sampling decides at the start of a request, usually at a fixed rate such as 1-10%, while tail-based sampling waits until the trace is complete and keeps all slow or failed traces plus a fraction of normal ones.

The following decision table connects common situations with a reasonable starting choice.

SituationRecommended choiceReason
New polyglot microservicesOpenTelemetry SDKs and collectorVendor-neutral, one format for all languages
Legacy monolithAuto-instrumentation agentCoverage without code changes
High-volume APITail-based samplingKeeps rare errors, cuts storage cost
Strict data residencySelf-hosted backendTelemetry stays in controlled regions
Small team, many servicesManaged APM platformLess operational burden
Practical APM configuration choices

Teams should also standardize service names, environment tags and version attributes from the start. Consistent resource attributes make it possible to compare a new deployment with the previous one and to detect a regression introduced by a release within minutes.

Limitations and common APM mistakes

APM is powerful but easy to misuse. The most frequent problems come from uncontrolled telemetry volume, poor alert design and the assumption that instrumentation automatically produces insight.

  • High-cardinality attributes such as user IDs on metrics multiply time series and costs; keep them on spans, not metric labels.
  • Alerting on averages hides tail latency; alert on percentiles or on burn rate against an objective.
  • Too many threshold alerts create alert fatigue and train responders to ignore pages.
  • Broken context propagation through queues or third-party gateways splits one request into disconnected traces.
  • Agent overhead is usually a few percent of CPU but can grow with verbose capture of SQL text or payloads.
  • Sensitive data in spans such as tokens or personal data in URLs creates compliance risk unless scrubbed at the collector.

APM also has a blind spot for problems that never reach instrumented code, for example DNS failures in a client network. Real user monitoring and synthetic checks close that gap from the outside.

Explained without jargon

APM is a way of watching an application the way a stopwatch watches a runner, but for every step of every request. When someone clicks a button, the tool records how long each part of the work took: the web server, the database, the payment service and anything else involved.

If the application becomes slow or starts failing, the team does not have to guess. APM shows exactly which step got slower or broke, much like a delivery tracking page shows at which depot a parcel is stuck.

A typical use case

An online retailer runs its checkout on about 30 containerized microservices in a public cloud. After a Friday release, the APM dashboard shows that checkout p99 latency jumped from 800 ms to 4.5 s, while the median barely changed and infrastructure graphs look normal.

The on-call engineer filters traces by the new release version and opens several slow examples. Each one shows the inventory service issuing one database query per cart item instead of a single batched query, a pattern introduced by the release. The team rolls back within 20 minutes, and the error budget for the checkout objective is preserved for the rest of the month.