DOP-C02 Exam QuestionsBrowse all questions from this exam

DOP-C02 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?

Show Answer
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

17 comments
Sign in to comment
OrganizedChaos25
May 2, 2023

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

wem
Nov 18, 2023

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.

d262e67Option: A
Dec 29, 2023

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.

iamunstopable
Dec 11, 2023

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

conacal
Apr 8, 2024

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

chamorro
Apr 8, 2024

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

c3518fcOption: A
May 9, 2024

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.

zijoOption: B
Nov 9, 2023

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
Nov 28, 2023

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

iamunstopable
Dec 11, 2023

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

DucSiu
Dec 12, 2023

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

hoakhanh281
Jan 1, 2024

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

thanhnv142
Jan 27, 2024

A definitely

thanhnv142
Jan 28, 2024

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

Gowtham5798
Jan 31, 2024

The correct answer is A.

nothinmuchOption: B
Feb 25, 2024

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

davidmillerforsureOption: A
Jul 16, 2024

A is correct ( t.ly/AWSCertifiedDevOpsEngineerProfessional )

Amazon_Dumps_comOption: A
Jul 19, 2024

A is Valid ( AAAAA )