Skip to main content
In this lesson you’ll learn how to inspect and interpret AWS X-Ray traces for an instrumented application. This guide assumes your application is already deployed to AWS and is emitting traces using the X-Ray SDKs or integrations. Focus areas include the X-Ray service map, trace exploration, common query examples, and how to use X-Ray to pinpoint latency and errors. Search for X-Ray in the AWS Console. If you don’t see a standalone X-Ray item, open CloudWatch and look for the X-Ray section — X-Ray is surfaced within CloudWatch in the AWS Console.
X-Ray is surfaced in the AWS Console as part of CloudWatch. If you don’t see a standalone X-Ray item, open CloudWatch and look for the X-Ray section.
Overview
  • What you need: an application instrumented to send traces to X-Ray (via SDKs, the AWS Distro for OpenTelemetry, or integrations).
  • What you’ll use: the X-Ray console’s Service map and Traces views to visualize request flows, drill into trace segments, and identify latency or error hotspots.
  • Typical components visible in traces: load balancers (ALB/NLB), ECS/EKS/EC2 services, AWS services such as DynamoDB and SNS, and downstream HTTP calls.
Service map The Service map presents a graph of services, resources, and their relationships — a quick way to understand how requests flow through your application and which components interact. Example components in the Scorekeep application include:
  • A client (user or frontend) that sends HTTP requests.
  • A Scorekeep service running in an ECS container behind a load balancer.
  • Downstream AWS services: an SNS topic for notifications and several DynamoDB tables (state, session, moves, game data).
Use the time picker to adjust the time range (e.g., last 5 or 15 minutes, or a custom range). Clicking a node opens metrics for that node such as latency, request count, fault count (HTTP 5xx), error rate, and response-time distribution. From the node details, choose View traces to filter traces that involve that node. Table — Common nodes on the Service map Traces view The Traces view lists matching traces for the current query and time range. Selecting a specific trace shows the segments that compose it and a timeline view indicating where time was spent across segments. A simple trace example:
This trace shows:
  • The incoming HTTP request served by the load balancer.
  • Two DynamoDB GetItem operations against the scorekeep-game table.
  • The timeline reveals per-segment durations and the overall request latency so you can see which operations contribute most to the total time.
A screenshot of the AWS CloudWatch/X-Ray console showing a trace/segments timeline for a "Scorekeep" ECS container. It lists many DynamoDB GetItem/UpdateItem calls with 200 response codes and millisecond durations.
More complex traces Complex traces often contain multiple downstream calls (e.g., several DynamoDB requests plus an SNS Publish). Use service filters and combined queries to limit results to traces that involve specific resources. Examples of useful X-Ray service filters: When you open a matched trace, X-Ray shows each operation and its duration, making it straightforward to identify latency contributors and potential bottlenecks. Fault investigation When a trace contains an error or fault (for example an HTTP 500), X-Ray highlights the failing segment so you can quickly locate the problematic component. Example of a failing trace:
From this trace you can determine:
  • Which request failed (the PUT).
  • Which downstream segments ran before the failure.
  • Which component or call likely caused the error so you can focus logs/metrics and code debugging.
Removing filters shows all traces If you clear node-specific filters and run the query with no filters, X-Ray returns all collected traces for the selected time range. This is useful for baseline analysis and spotting anomalies across the entire application. Each trace entry includes:
  • The trace ID and start time
  • Per-segment response codes and durations (for example 3 ms, 2 ms)
  • A visualization of the response-time distribution so you can quickly spot outliers
Combining multiple services in a query You can construct combined queries to find traces that include any of several services. Example: show traces that include either the scorekeep-game DynamoDB table or the SNS topic.
Running a combined query returns matching traces and aggregates metrics such as response-time distributions, total traces, and error/fault counts for the selected time window.
A screenshot of the AWS CloudWatch/X-Ray Traces dashboard showing a response-time distribution graph at the top and a table of recent traces below with IDs, statuses, timestamps, response codes, durations and HTTP methods.
Quick tips
  • Instrumentation: Ensure your services propagate the X-Ray trace header so distributed traces are connected across services.
  • Sampling: X-Ray applies sampling; check sampling rules if you see fewer traces than expected.
  • Logs + Traces: Correlate X-Ray trace IDs with application logs to get detailed stack traces and payloads.
  • Metrics: Use the Service map to jump from high-level metrics (latency, errors) to individual traces for root-cause analysis.
Links and references Summary AWS X-Ray lets you visualize distributed traces, inspect service maps, and drill into the segments that make up each request. Use X-Ray to find which service or segment causes latency or failures, narrow your investigation to a small set of traces, and accelerate debugging and performance tuning. Hopefully this lesson helped you get comfortable using the X-Ray console to investigate distributed application behavior.

Watch Video