Easy ReviewDOP-C02
Monitoring and Logging35

X-Ray

Trace requests, control sampling, instrument services, and investigate latency or failures.

X-Ray joins service records into request traces. Instrumentation records the work, propagated context connects it, and sampling decides which requests are recorded.

Traces, segments, and propagation

X-Ray follows recorded requests across a distributed application, meaning an application whose work spans services. A traceThe connected records of service work associated with a request. is the request’s connected record; segmentsA record of a service or resource handling a request. describe service work and subsegmentsA record of a smaller operation inside a segment, such as a downstream call. describe smaller operations within that work.

How it works

  1. For API Gateway REST APIs, a stage can sample incoming requests and add a missing trace header.
  2. Services send segments for their work. Instrumented clients add subsegments for calls to other services or databases.
  3. X-Ray collects segments associated with a request. For a dependency such as DynamoDB, it creates an inferred nodeA dependency that X-Ray reconstructs from an upstream client subsegment. from the client subsegment.

An inferred node is X-Ray’s reconstruction of a dependency from client observations. Lambda Active tracing follows upstream samplingThe selection of requests whose tracing data will be recorded. and produces segments for sampled requests.

Exam cues

  • If the question says a request crosses several services, think an X-Ray trace, because it groups the recorded segments for that request.
  • If the question says one service operation needs more detail, think a subsegment, because it records part of the work within a segment.
  • If the question says DynamoDB has an inferred node, think instrumented client subsegments, because X-Ray derives the node from the client record.

Remember

  • A segment document has a maximum size of 64 kB.
  • Incoming trace headers can come from clients; applications can remove them to avoid client-controlled trace IDs and sampling decisions.
  • X-Ray SDKs and daemon: maintenance mode since February 25, 2026; use OpenTelemetryAn observability framework for generating, collecting, and exporting traces and other telemetry. for new instrumentationCode or configuration that records application work for telemetry collection..

Trap: An inferred node does not mean the dependency emitted its own trace segment. X-Ray derives it from the client subsegment.

One trace across API Gateway, Lambda and DynamoDB
request1trace header2SDK call3ClientiAPI Gatewayactive tracing on stageiLambdaActive tracingiDynamoDBinferred nodei
  1. The request enters API Gateway, which decides whether to sample it and adds the tracing header.

  2. Lambda receives the header and, with Active tracing, sends its segments when the request is sampled, so the nodes connect into one trace.

  3. An instrumented SDK client adds a subsegment for the DynamoDB call, which shows its latency and errors.

Box details (4)
Client

A request with no tracing header gets one from the first X-Ray-integrated service it hits.

API Gateway

Makes the sampling decision using your sampling rules and adds X-Amzn-Trace-Id with Sampled=1 or 0. REST APIs only.

Lambda

With Active tracing, Lambda sends service and function segments for sampled requests and follows the upstream sampling decision.

DynamoDB

DynamoDB sends no segment itself. An instrumented AWS SDK client records a subsegment, and X-Ray draws the node from it.

From the AWS docs (9)
  • An X-Ray trace collects segments associated with one request and shows its path through services.
  • A segment records one resource or service handling a request, including timing and response information.
  • A subsegment describes part of a segment, such as an outgoing service call, SQL query, or custom block of code.
  • X-Ray derives inferred segments and graph nodes for services such as DynamoDB from instrumented client subsegments.
  • API Gateway REST API stages can make sampling decisions and add trace headers to requests without one.
  • Lambda Active tracing sends segments for sampled requests and follows the upstream sampling decision.
  • An X-Ray segment document can be at most 64 kB.
  • Trace headers can come from clients; an application can remove incoming headers to avoid client-supplied trace IDs or sampling choices.
  • On February 25, 2026, the AWS X-Ray SDKs and daemon entered maintenance mode, with releases limited to security fixes; AWS recommends OpenTelemetry-based instrumentation instead.

Sampling rules

SamplingThe selection of requests whose tracing data will be recorded. chooses which requests to record, limiting traceThe connected records of service work associated with a request. volume. The reservoirThe fixed matching request count recorded each second before applying the sampling rate. covers a fixed request count each second; the rate applies to additional matching requests.

How it works

  1. At a service that has no upstream decision, compare request details with sampling rules. Match fields such as service name, HTTP method, and URL path.
  2. Evaluate custom rules in ascending priority order. The first match decides the reservoir and rate.
  3. For clients configured to fetch remote rules, X-Ray divides reservoir quotas among instances. Local JSON files apply separately on each instance.
  4. Propagate the decision. Downstream services honor the parent decision even if their own rules would choose differently.

Exam cues

  • If the question says record a specific route while debugging, think a matching entry-service rule with rate 100 percent, because that is where a new sampling decision applies.
  • If the question says service B ignores a stricter rule, think upstream sampling, because B honors its parent’s decision.
  • If the question says sampling increases as instances scale out, think local reservoirs, because each local rule file samples independently.

Remember

  • Default SDK sampling: first request each second plus five percent of additional requests.
  • Custom rule priority: 1 through 9999; the lowest matching value wins.
  • Console rate: 0 through 100 percent. Local SDK JSON rate: 0 through 1.
  • Remote rule changes need no code deployment when the client fetches them.
  • API Gateway sampling service name: api-name/stage.
  • Lambda native sampling is not configurable per function.
  • Sampling is best effort; short-term observed rates can differ.

Trap: Active tracing on Lambda does not turn an upstream Sampled=0 decision into a recorded request. Change sampling at the entry service.

From the AWS docs (15)
  • The default X-Ray SDK sampling rule records the first request each second and five percent of additional requests.
  • A sampling reservoir is the fixed number of matching requests per second recorded before the additional sampling rate applies.
  • Custom X-Ray sampling rule priorities range from 1 to 9999.
  • X-Ray evaluates sampling rules in ascending priority order and uses the first match.
  • The X-Ray console expresses sampling rate as a percentage from 0 to 100.
  • Local X-Ray SDK sampling JSON uses a rate value from 0 to 1.
  • Sampling rules can match service name, service type, host, HTTP method, URL path, and supported resource or attribute criteria.
  • For clients using remote rules, X-Ray distributes reservoir quotas among service instances and rule changes do not require code deployment.
  • Local SDK sampling rule files apply independently on each instance, adding instance reservoirs together; changes require redeployment.
  • X-Ray sampling is parent-based: downstream services honor an upstream decision even if their own matching rule differs.
  • A service applies a custom sampling rule only when no sampling decision has yet been made, such as at an entry point or worker starting a new trace.
  • Lambda native X-Ray sampling cannot be configured on the function; absent an upstream decision its sampling rate is one request per second plus five percent of additional requests.
  • Lambda Active tracing uses the upstream header decision when one is provided.
  • X-Ray applies sampling on a best-effort basis, so observed rates can differ from configured rates over short periods.
  • For X-Ray sampling rules, API Gateway service names use the form api-name/stage.

Annotations, metadata, and groups

AnnotationsAn indexed key-value pair that can be used to find traces. make selected traceThe connected records of service work associated with a request. values searchable. MetadataAdditional unindexed trace information that can include objects and arrays. stores extra details for inspection. Groups save a filter over incoming traces so a team can view a relevant application slice and its metrics.

How it works

  1. Record values needed for search as annotations, indexed key-value pairs. Use metadata for objects or arrays that only need inspection.
  2. Build a filter expressionA condition that selects traces using indexed request information., a condition that selects traces. Combine annotation conditions with response-time or status conditions using AND or OR.
  3. Save the filter as a group. X-Ray creates its service graphA representation of services and the calls that connect them. and trace summaries, and publishes matching-trace counts to CloudWatch every minute.
  4. To detect unusual fault rates, enable InsightsAn unexpected increase in server faults detected from trace data. for the group. To route changes to automation, also enable Notifications and create an EventBridge rule.
Field or feature Purpose Search behavior
Annotation Selected string, number, or Boolean value Indexed for filters
Metadata Additional details, including objects and arrays Stored without indexing
Group A saved filter over incoming traces Selects traces and supplies group metrics

An insight tracks a detected fault-rate anomaly and its impact. Insight notifications reach EventBridge with source aws.xray and detail-type AWS X-Ray Insight Update. A rule can route them to SNS notifications or a Lambda function. Delivery is best effort.

Exam cues

  • If the question says find traces by an application reference, think annotation, because metadata is not indexed.
  • If the question says maintain a graph and metrics for a selected application slice, think group, because it applies a saved filter to incoming traces.
  • If the question says notify when fault rates become unusual, think group Insights plus Notifications and EventBridge, because Insights detects the anomaly and notifications expose its updates.

Remember

  • X-Ray indexes up to 50 annotations per trace.
  • Annotation values are strings, numbers, or Booleans.
  • Group metrics are published every minute.
  • A changed group filter affects subsequent traces, not stored history.
  • Insights and Notifications are separate group settings.

Trap: Enabling Insights alone does not enable EventBridge notifications. Enable Notifications on that insights-enabled group as well.

Route group insight updates to notifications
12X-Ray groupInsights + NotificationsEventBridgematch insight updatesSNSnotification target
  1. An insights-enabled group with Notifications emits an insight update to EventBridge.

  2. A matching rule sends the event to its configured SNS target.

From the AWS docs (13)
  • X-Ray annotations are indexed key-value pairs used in filter expressions.
  • Annotation values support strings, numbers, and Booleans, but not objects or arrays.
  • X-Ray indexes up to 50 annotations per trace.
  • X-Ray metadata can contain values including objects and arrays, but X-Ray does not index it.
  • Filter expressions can search annotation values and combine conditions with AND or OR.
  • Annotations can be used to filter traces in the console or through GetTraceSummaries.
  • An X-Ray group selects incoming traces through a filter expression and has its own service graph and trace summaries.
  • X-Ray publishes CloudWatch metrics for counts of traces matching a group every minute.
  • Changing a group expression affects subsequent traces only; create a new group to avoid a graph combining old and new selections.
  • Enable Insights for each X-Ray group to detect anomalous fault rates and track their impact.
  • Enable Notifications on an insights-enabled group to emit insight events to EventBridge on a best-effort basis.
  • X-Ray insight events use source aws.xray and detail-type AWS X-Ray Insight Update.
  • EventBridge rules can route X-Ray insight notifications to targets including SNS or Lambda.

Service instrumentation

InstrumentationCode or configuration that records application work for telemetry collection. records application work so X-Ray can connect and analyze it. It includes tracing libraries and configuration for incoming requests and outgoing calls. A collectorA process that receives telemetry and forwards it to a configured destination. or agent receives those records and forwards them to the tracing service.

How it works

  1. Instrument the application with OpenTelemetryAn observability framework for generating, collecting, and exporting traces and other telemetry., the framework AWS recommends for producing tracing data. Existing applications may use X-Ray tracing libraries, also called X-Ray SDKs.
  2. Choose the collection path. The X-Ray daemon receives SDK segmentsA record of a service or resource handling a request. over UDPThe network protocol used to send raw segment data to the X-Ray daemon., the network protocol used for segment delivery, on port 2000. OpenTelemetry collectors use their own configured receivers. The CloudWatch agent can also collect traces from EC2 and on-premisesServers hosted in an organization's own data center. servers.
  3. Give the uploader permission to send traces. An ECS daemon uses the task roleThe AWS identity that authorizes API calls made by ECS application containers., the identity assigned to application containers. Lambda uses its execution roleThe AWS identity that grants a Lambda function access to AWS services..
  4. Enable managed tracing where needed: Active for Lambda, and stage tracing plus redeployment for API Gateway REST APIs.
Platform Configuration to recognize
Lambda Active tracing; execution-role upload permissions; managed daemon
API Gateway REST API Stage tracing and redeployment
ECS with existing X-Ray SDK Daemon sidecarA supporting container that runs alongside an application container., UDP 2000, task-role write access
EC2 or on-premises Instrumentation plus authorized collector, agent, or daemon
Elastic Beanstalk XRayEnabled runs the daemon

A sidecar is a supporting container alongside the application. In the documented ECS bridge setup, link the daemon and set AWS_XRAY_DAEMON_ADDRESS. The awsvpc setup omits the link, hostPort, and address variable. These are different container networking configurations.

Since February 25, 2026, the X-Ray SDKs and daemon are in maintenance with security fixes only. AWS recommends OpenTelemetry. This support notice concerns the instrumentation components.

Exam cues

  • If the question says API Gateway has traces but Lambda does not, think Lambda Active tracing and role permissions, because default PassThrough forwards context without automatic segments.
  • If the question says an ECS daemon cannot upload, think task-role permissions, because that role authorizes its API calls.
  • If the question says choose new application instrumentation, think OpenTelemetry, because AWS recommends it following SDK and daemon maintenance.

Remember

  • Lambda permissions: xray:PutTraceSegments and xray:PutTelemetryRecords, included in AWSXRayDaemonWriteAccess.
  • CloudFormation Lambda: TracingConfig with Mode: Active. SAM: Tracing: Active.
  • X-Ray daemon receiver: UDP 2000. This is not a universal OpenTelemetry receiver setting.
  • API Gateway X-Ray support is for REST APIs.

Trap: PassThrough does not automatically emit Lambda traces even when the upstream header requests samplingThe selection of requests whose tracing data will be recorded.. Enable Active tracing for native Lambda segments.

Existing SDK trace upload from an ECS task
ECS task12ApplicationX-Ray SDK segmentsDaemon sidecarUDP 2000 receiverX-Raytask role authorizes API
  1. The instrumented application sends raw segments to the daemon over UDP 2000.

  2. The daemon relays the segments to the X-Ray API using the task role.

From the AWS docs (18)
  • Instrumentation adds tracing code or configuration that records application work for collection.
  • AWS recommends OpenTelemetry for application instrumentation and supports sending its traces to X-Ray.
  • X-Ray SDKs and daemon entered maintenance on February 25, 2026; subsequent releases address security issues only.
  • The X-Ray daemon receives raw segment data on UDP port 2000 and relays it to the X-Ray API.
  • OpenTelemetry collectors and the CloudWatch agent are alternatives to the X-Ray daemon; they have their own configured trace receivers.
  • Lambda runs the X-Ray daemon for sampled invocations.
  • Elastic Beanstalk can run the X-Ray daemon using the XRayEnabled option.
  • The CloudWatch agent can collect OpenTelemetry or X-Ray SDK traces from EC2 and on-premises servers and send them to X-Ray.
  • Lambda Active tracing automatically sends segments for sampled requests.
  • Lambda defaults to PassThrough, which forwards context but does not automatically send traces, even if the upstream decision samples the request.
  • Lambda requires xray:PutTraceSegments and xray:PutTelemetryRecords on its execution role; AWSXRayDaemonWriteAccess includes them.
  • Lambda CloudFormation configuration uses TracingConfig with Mode: Active; SAM functions use Tracing: Active.
  • An ECS application can run an X-Ray daemon container alongside the application and authorize trace uploads through the task role.
  • For the documented ECS bridge setup, link the app to the daemon and set AWS_XRAY_DAEMON_ADDRESS to its address.
  • The documented ECS awsvpc setup omits the bridge link, hostPort, and AWS_XRAY_DAEMON_ADDRESS.
  • API Gateway supports X-Ray for REST APIs; enable tracing on the stage and redeploy the API.
  • API Gateway can record a segment for a request already sampled upstream even with stage active tracing disabled.
  • The X-Ray daemon requires AWS permissions to upload segment documents to X-Ray.

Trace analysis and retention

X-Ray analysis connects an application’s symptoms to the service work recorded for a request. The trace mapA representation of services and the calls that connect them. shows dependencies and their health; the timeline shows where a selected request spent its time.

How it works

  1. Select a service node or connection with high latencyThe elapsed time observed for a request or service call. or failures on the trace map.
  2. Narrow the traceThe connected records of service work associated with a request. list by URL, response code, or other summary fields. Search by trace ID when investigating a known request.
  3. Open a trace and inspect the segmentA record of a service or resource handling a request. and subsegmentA record of a smaller operation inside a segment, such as a downstream call. timeline for the slow operation or failing call.
  4. Open associated CloudWatch logs where the node supports them. Use service() or edge() filters when a downstream error was handled before the final response.
Classification HTTP response Service-map color
Error 4xx client response Yellow
Fault 5xx server response Red
Throttle 429 Purple

Successful calls appear green on the service map. An error handled inside the application can be absent from a trace-level error search even though its downstream call failed.

Exam cues

  • If the question says locate the slow downstream operation, think trace timeline, because segment and subsegment durations show the recorded work.
  • If the question says a dependency failed but the application returned success, think service() or edge() filters, because trace-level status can hide a handled downstream failure.
  • If the question says an analyst only needs to inspect traces, think AWSXrayReadOnlyAccess, because it is the read-only X-Ray managed policy.

Remember

  • Trace data retention: 30 days.
  • Service graph retention: 30 days.
  • Error: 4xx. Fault: 5xx. Throttle: 429.
  • Associated logs are available for supported node types, not every node.

Trap: A successful final response does not prove every downstream call succeeded. Inspect service or edge conditions and the trace timeline for handled failures.

From the AWS docs (12)
  • The X-Ray trace map identifies services with errors, high-latency connections, and unsuccessful requests.
  • Trace details show a service-node map and a timeline of segments and subsegments.
  • The X-Ray console can filter traces by response code, URL, and other trace-summary data, or find a trace by its ID.
  • X-Ray categorizes HTTP 4xx responses as client errors.
  • X-Ray categorizes HTTP 5xx responses as server faults.
  • X-Ray categorizes HTTP 429 responses as throttling errors.
  • The X-Ray service map uses green for success, yellow for client errors, red for server faults, and purple for throttling.
  • X-Ray retains trace data for 30 days.
  • X-Ray retains service graph data for 30 days.
  • AWSXrayReadOnlyAccess is the AWS managed policy for read-only X-Ray access.
  • Supported trace-map nodes can link to associated CloudWatch logs; this is not supported for every node type.
  • A trace-level error filter can miss errors handled by an upstream application; service() and edge() filters can search downstream issues.

Trace propagation and diagnostics

X-Ray trace contextThe identifiers and sampling decision that connect recorded work to a request. connects work across instrumented HTTP services. SegmentsA record of a service or resource handling a request. and subsegmentsA record of a smaller operation inside a segment, such as a downstream call. also give different views of a call, helping you identify where recorded work belongs.

How it works

  1. Instrumented HTTP services pass trace context in the X-Amzn-Trace-Id header. Root identifies the traceThe connected records of service work associated with a request., Parent identifies the upstream segment or subsegment, and Sampled carries the upstream recording decision.
  2. A subsegment describes part of a segment, such as an outgoing call, SQL query, or custom code block. X-Ray uses instrumented client subsegments to create inferred nodes for services such as DynamoDB.
  3. Compare the upstream client subsegment with the downstream service segment. The client view includes round-trip latencyThe elapsed time observed for a request or service call., while the service segment records the downstream service’s view of the call.
  4. In Lambda traces, AWS::Lambda records execution environment preparation and AWS::Lambda::Function records function work. Traces from instrumented SQS producers can also be linked to downstream Lambda consumer traces.

Exam cues

  • If the question says downstream HTTP work appears in a separate trace, think trace-header propagation, because Root and Parent carry the trace and upstream context.
  • If the question says DynamoDB appears as an inferred nodeA dependency that X-Ray reconstructs from an upstream client subsegment., think instrumented client subsegment, because X-Ray derives the node from the client record.
  • If the question says Lambda preparation and function work need separate inspection, think AWS::Lambda and AWS::Lambda::Function, because they record those respective activities.
  • If the question says an instrumented SQS producer sends messages to a Lambda consumer, think linked traces, because X-Ray can connect the producer and consumer work.

Remember

  • Sampled carries the upstream recording decision.
  • The upstream client subsegment includes round-trip latency; the downstream segment records the service view.
  • X-Ray does not support Lambda event source mappings for MSK, self-managed Kafka, Amazon MQ, or DocumentDB.

Trap: An inferred DynamoDB node does not come from a DynamoDB segment. Inspect the instrumented client subsegment for the call.

From the AWS docs (11)
  • The X-Amzn-Trace-Id header carries trace context between instrumented HTTP services.
  • Root in an X-Ray trace header identifies the trace.
  • Parent in an X-Ray trace header identifies the upstream segment or subsegment that connects the downstream request.
  • Sampled in an X-Ray trace header carries the upstream recording decision.
  • The AWS::Lambda trace segment records Lambda service work preparing the execution environment.
  • The AWS::Lambda::Function trace segment records function work.
  • Traces from instrumented SQS message producers can be linked automatically to downstream Lambda consumer traces.
  • X-Ray does not support Lambda event source mappings for MSK, self-managed Kafka, Amazon MQ, or DocumentDB.
  • A subsegment describes part of a segment, such as an outgoing service call, SQL query, or custom block of code.
  • X-Ray derives inferred segments and graph nodes for services such as DynamoDB from instrumented client subsegments.
  • A downstream segment records the service view of a call; the upstream subsegment records the client view, including round-trip latency.

Flashcards

tap to flip
Answer

·

All 35 cards as a list

What problem does AWS X-Ray solve for a request that crosses several services?

It joins the recorded work into a trace so you can inspect the request path, timing, and responses across services.

How do X-Ray traces, segments, and subsegments differ?

A trace groups one request. A segment describes a service handling it. A subsegment describes part of that work, such as a downstream call; client subsegments can also produce inferred nodes.

A new service needs distributed tracing that reaches AWS X-Ray (2026 onward). Should it add the X-Ray SDK and daemon?

No. Since February 2026 they are in maintenance mode; use OpenTelemetry-based instrumentation.

What does the default X-Ray SDK sampling rule record?

The first request each second and five percent of additional requests. Sampling means a missing trace is not by itself an instrumentation failure.

A team needs all requests for a particular route eligible for X-Ray recording while debugging. How should it configure centralized sampling?

Create a matching high-priority rule at the entry service and set the console rate to 100 percent. Clients using remote rules pick up the change without a code deployment; application of sampling remains best effort. For API Gateway, match the service name as api-name/stage.

Why use remote X-Ray sampling rules rather than a local JSON rule file across many application instances?

X-Ray distributes the rule reservoir across instances and allows updates without redeployment. Local files apply separately per instance, so their reservoirs add together.

Service B has a low-rate X-Ray sampling rule but still records calls sampled by service A. Why?

Parent-based sampling honors A's upstream decision. Adjust the rule where the request first receives its sampling decision.

Can a Lambda function configure its native X-Ray sampling rate?

No. Lambda follows an upstream sampling decision or uses one request per second plus five percent of additional requests. Adjust an entry service rule to control its upstream traffic.

A Lambda request arrives with an upstream X-Ray Sampled=0 decision. Does Active tracing override it?

No. Active tracing follows the upstream sampling decision.

What do reservoir and rate mean in an X-Ray sampling rule?

Reservoir is the fixed matching request count per second. Rate is the proportion recorded after that count is exhausted.

A team needs to filter X-Ray traces by an order reference. Should it record an annotation or metadata?

An annotation. X-Ray indexes annotations for filters; metadata can hold objects and arrays but is not indexed.

A team records an opaque customer reference and wants slow X-Ray traces for that reference. Which feature should it use?

Record the reference as an annotation and combine its filter with a response-time condition in the console or GetTraceSummaries.

What does an X-Ray group provide?

A saved filter over incoming traces, a service graph and trace summaries, and CloudWatch metrics published every minute for matching traces.

A team needs automated notifications when X-Ray detects an unusual fault rate. What should it configure?

Enable Insights and Notifications on the relevant group, then match EventBridge events with source aws.xray and detail-type AWS X-Ray Insight Update. Route them to a target such as SNS.

An X-Ray group changes its filter, but the graph still contains the old population. What explains this, and how can the team get a clean graph?

The change applies only to subsequent traces. Create a new group to avoid combining old and new selections.

Can an X-Ray annotation contain a JSON object, and how many annotations are indexed per trace?

No. Annotation values are strings, numbers, or Booleans. X-Ray indexes up to 50 annotations per trace; objects belong in metadata.

An ECS application using the X-Ray SDK needs to upload traces. What should the team deploy and authorize?

Run the X-Ray daemon alongside the app, expose UDP 2000, and give the ECS task role X-Ray write permissions. OpenTelemetry is the recommended instrumentation path for new work.

How should a team enable native X-Ray tracing for a Lambda function?

Set Active tracing and grant xray:PutTraceSegments and xray:PutTelemetryRecords on the execution role. AWSXRayDaemonWriteAccess includes those permissions; Lambda runs the daemon.

API Gateway has a sampled request trace but the invoked Lambda function has no automatic segments. What Lambda setting should the team check?

Check for default PassThrough mode and enable Active tracing. PassThrough forwards context without automatically sending traces, even when the upstream request was sampled.

A team needs X-Ray sampling and traces from an API Gateway REST API stage. What configuration is required?

Enable X-Ray tracing on the stage and redeploy the API. X-Ray support here is for REST APIs. An already sampled upstream request can still generate a segment with stage active tracing disabled.

How can an instrumented EC2 or on-premises application send traces to X-Ray?

Use an OpenTelemetry collection path or the CloudWatch agent. Existing X-Ray SDK applications can send raw segments to the X-Ray daemon on UDP 2000. The daemon needs permission to upload.

An ECS team uses the X-Ray daemon in bridge mode. How does its configuration differ from the documented awsvpc example?

Bridge mode uses a container link and AWS_XRAY_DAEMON_ADDRESS. The awsvpc example omits that link, address variable, and hostPort. The task role authorizes trace uploads.

A Lambda function forwards trace context but does not automatically send sampled traces to AWS X-Ray. What tracing mode should the team configure?

Enable Active tracing. The default PassThrough mode forwards context without automatically sending traces.

Must an OpenTelemetry collector use the X-Ray daemon UDP 2000 protocol?

No. UDP 2000 describes the X-Ray daemon receiver. An OpenTelemetry collector uses its configured receivers; choose a matching exporter and collection path.

How does X-Ray classify HTTP failures, and what colors indicate them on the service map?

Client errors are 4xx and yellow; server faults are 5xx and red; throttling is 429 and purple. Successful calls are green.

A checkout request is slow across several services. How should the team investigate it with X-Ray?

Select a high-latency node or connection on the trace map, filter the trace list, and inspect a trace timeline for the slow segment or subsegment. Open associated logs where supported.

An application has intermittent server errors. How can AWS X-Ray help an operator narrow down their source?

Use the trace map to identify services with errors, then inspect a trace timeline of segments and subsegments.

A service handles downstream failures and returns success, so an X-Ray error filter misses the failing dependency. How should the team refine its search?

Use service() or edge() conditions for downstream issues. A trace-level error condition does not necessarily capture an error handled before the final response.

An analyst needs to inspect one failed X-Ray request with a known trace ID. What should the analyst open?

Search by trace ID, select the matching trace, and inspect its service map and segment timeline.

An upstream application handles a downstream error, so an AWS X-Ray trace-level error filter misses it. How can an operator find the downstream issue?

Use service() or edge() filters to search for downstream issues.

An X-Ray request crosses instrumented HTTP services but downstream work appears in a separate trace. What should the team check?

Check propagation of X-Amzn-Trace-Id and its Root, Parent, and Sampled fields. The shared trace ID and parent context connect the work.

What do the AWS::Lambda and AWS::Lambda::Function segments describe in an X-Ray trace?

AWS::Lambda describes service work preparing the execution environment. AWS::Lambda::Function describes the function work.

An instrumented producer sends SQS messages to a Lambda function with Active tracing. Can X-Ray connect producer and consumer work?

Yes. X-Ray links producer traces to downstream Lambda consumer traces. This support does not extend to MSK, self-managed Kafka, Amazon MQ, or DocumentDB event source mappings.

An ECS application sees DynamoDB as an inferred node in X-Ray. Where can the team inspect its call latency?

Inspect the instrumented AWS SDK client subsegment in the trace timeline. DynamoDB does not supply its own segment; X-Ray derives its node from that subsegment.

Why can an X-Ray client subsegment and a downstream service segment report different durations for the same call?

They measure different viewpoints. The upstream client includes round-trip latency; the downstream service measures its own processing.

You finished every topic of DOP-C02!

Your badge turned gold. Next step: book the exam on AWS. Once you pass, add yourself to Who passed.

Share

Share that you finished this certification

I finished every topic of AWS Certified DevOps Engineer - Professional (DOP-C02) on Easy Review. Come study too!