DOP-C02 Monitoring and Logging Practice Question
A company uses AWS Lambda functions behind an Amazon API Gateway REST API. The DevOps team wants to monitor the end-to-end latency of API requests, including the time spent in API Gateway and Lambda. Which approach provides the most granular breakdown?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Enable AWS X-Ray tracing on API Gateway and Lambda.
AWS X-Ray provides end-to-end tracing with detailed segments for API Gateway and Lambda, allowing per-request breakdown of latency across each component. Option A (Lambda Insights) offers OS-level metrics like CPU and memory, not request-level latency breakdown. Option C (VPC Flow Logs) captures network traffic metadata but not application layer latency. Option D (combining CloudWatch metrics) only gives aggregate statistics and cannot break down latency per request or within a single request's path.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable Lambda Insights to get per-request latency breakdown.
Why it's wrong here
Lambda Insights reports function-level CPU, memory and cold-start metrics; it cannot attribute time spent inside API Gateway, so the end-to-end breakdown is incomplete. It is tempting because Lambda Insights is the correct tool for diagnosing a single function's own performance, but the stem requires correlating both stages of the request path.
- ✓
Enable AWS X-Ray tracing on API Gateway and Lambda.
Why this is correct
X-Ray propagates a trace ID through API Gateway and the downstream Lambda invocation, producing segment-level timings for each component. This granular breakdown isolates API Gateway overhead from Lambda init and execution duration, satisfying the requirement to measure end-to-end latency across both services.
- ✗
Enable VPC Flow Logs to capture network round-trip times.
Why it's wrong here
VPC Flow Logs record accepted and rejected IP traffic metadata with no timing fields, so they cannot measure round-trip latency at all. It is tempting because flow logs are the correct choice for diagnosing connectivity, security group denials and traffic volume between Lambda and its dependencies, but they carry no per-request duration data.
- ✗
Use CloudWatch metrics for API Gateway and Lambda, then add them together.
Why it's wrong here
Summing separate API Gateway and Lambda CloudWatch metrics loses per-request correlation, because each service aggregates independently and the integration latency is already reported by API Gateway. It is tempting because these metrics are free and readily available, and they suffice for coarse dashboards, but they cannot isolate a single slow invocation's breakdown.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.