Exam DOP-C02 All QuestionsBrowse all questions from this exam
Question 1

A company has a mobile application that makes HTTP API calls to an Application Load Balancer (ALB). The ALB routes requests to an AWS Lambda function. Many different versions of the application are in use at any given time, including versions that are in testing by a subset of users. The version of the application is defined in the user-agent header that is sent with all requests to the API.

After a series of recent changes to the API, the company has observed issues with the application. The company needs to gather a metric for each API operation by response code for each version of the application that is in use. A DevOps engineer has modified the Lambda function to extract the API operation name, version information from the user-agent header and response code.

Which additional set of actions should the DevOps engineer take to gather the required metrics?

    Correct Answer: A

    The best approach for gathering metrics with minimal complexity is to modify the Lambda function to log the API operation name, response code, and version number to Amazon CloudWatch Logs. Then, configure a CloudWatch Logs metric filter to increment a metric for each API operation. By specifying response code and application version as dimensions, this method efficiently captures the necessary metrics and leverages existing AWS services directly, making it a simple and effective solution for the given requirements.

Discussion
OrganizedChaos25

Anyone take the exam recently? Are these questions still valid?

d262e67Option: A

CloudWatch Logs Insights is a powerful tool for analyzing log data, but it's more suited for ad-hoc exploration and troubleshooting rather than continuous metric collection and monitoring.

wem

Option A seems to be the most straightforward and effective method. By writing the required information as a log line to CloudWatch Logs and configuring a metric filter to increment metrics based on this data, the company can efficiently gather the metrics it needs with minimal complexity. This approach leverages existing AWS services in a simple and direct manner, aligning well with the company's requirements.

c3518fcOption: A

The other options are either incomplete or involve unnecessary complexity: Option B requires using CloudWatch Logs Insights queries, which may introduce additional complexity and potential performance overhead. Option C involves modifying the ALB access logs, which may not provide the required level of granularity or flexibility for capturing the application version information. Option D requires integrating AWS X-Ray, which is primarily designed for distributed tracing and may not be necessary for this specific use case of gathering metrics by response code and application version. Therefore, option A is the most appropriate and straightforward solution for the given requirements.

chamorro

Did anyone take the exam recently? what is the % of accuracy?

conacal

I pass the exam today. A and C these questions still valid.

iamunstopable

I passed this morning with 830 score 88% Questions comes out word for word from this CO2 Dump

Amazon_Dumps_comOption: A

A is Valid ( AAAAA )

davidmillerforsureOption: A

A is correct ( t.ly/AWSCertifiedDevOpsEngineerProfessional )

nothinmuchOption: B

The answer is b based on the scenario. When to Choose Which Choose A (Metric Filters) if you need basic metrics with straightforward patterns (e.g., counting occurrences of specific API operations and response codes). Choose B (Insights Queries) if you require more complex metric calculations, such as: Aggregations (averages, sums, etc.) over time Filtering metrics based on conditions within the logs Creating custom metrics not directly defined in log lines

Gowtham5798

The correct answer is A.

thanhnv142

A is correct: Because only need to gather metric but not parse log or advanced analyzing the log.

thanhnv142

A definitely

hoakhanh281

Cloudwatch log metrics filter can apply on pattern and populate metrics, CW insight significant to get it. B should be correct one

DucSiu

The company needs to gather a metric for each API operation by response code for each version of the application that is in use => A

iamunstopable

I passed this exam today 11th/12/2023. Scored 830 about 58% questions comes from CO2 word for word.

zijoOption: B

Answer A has a weird mention of incrementing the metric for no reason. CloudWatch Logs Insights lets you interactively search and analyze your log data in Amazon CloudWatch Logs. So CloudWatch Insights can be used to query the API metadata already captured by the Lambda function.

zijo

I stand to be corrected here. The metric filter can be incremented. And since the question mentions gathering metrics it will be Option A and not B