Price AWS X-Ray from request volume and sampling rate, and find the sampling percentage that fits a tracing budget.
X-Ray bills per trace recorded, not per segment, so a trace crossing eight services costs the same as one crossing two — the variable you control is the sampling rate. Retrieval is a second, much cheaper meter that counts every trace the console or Trace Map loads, which is why an always-open service map on a busy account is not free. Inverting the arithmetic gives the sampling rate a fixed budget can afford. Confirm current prices for your region. Sampling is the only real lever on tracing cost, and choosing it blind means either paying to record traces nobody will look at or sampling so thinly that the one failing request is never captured.
X-Ray Trace Cost
traces recorded = requests × sampling rate; cost = (recorded − free tier) ÷ 1 M × record price + (retrieved − free tier) ÷ 1 M × retrieval price.
Budget-driven sampling
budget sampling rate = (budget ÷ cost per trace + free traces) ÷ requests, where cost per trace = record price + retrieval share × retrieval price, both per trace.
traces recorded = requests × sampling rate; cost = (recorded − free tier) ÷ 1 M × record price + (retrieved − free tier) ÷ 1 M × retrieval price. X-Ray bills per trace recorded, not per segment, so a trace crossing eight services costs the same as one crossing two — the variable you control is the sampling rate. Retrieval is a second, much cheaper meter that counts every trace the console or Trace Map loads, which is why an always-open service map on a busy account is not free. Inverting the arithmetic gives the sampling rate a fixed budget can afford. Confirm current prices for your region.
Sampling is the only real lever on tracing cost, and choosing it blind means either paying to record traces nobody will look at or sampling so thinly that the one failing request is never captured.
This calculator takes 7 inputs: Requests per month, Sampling rate, Share of traces retrieved or scanned, Tracing budget per month, Price per million traces recorded, Price per million traces retrieved or scanned, Apply the monthly free tier. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
The X-Ray default reservoir of one request per second per rule plus 5% of the remainder works well for most services: it guarantees continuous coverage on quiet endpoints and caps cost on busy ones. Raise it temporarily during an incident, and add a dedicated high-rate rule for a low-traffic critical path.
No. The charge is per trace recorded, so fan-out across services and Lambda functions does not multiply the cost — which makes X-Ray comparatively cheap for deep serverless call chains where each hop would otherwise be a separate billed item.