Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Amazon DOP-C02 Exam - Topic 3 Question 47 Discussion

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?
A) Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
B) Modify the Lambda function to write the API operation name, response code, and version number as a log line to an Amazon CloudWatch Logs log group. Configure a CloudWatch Logs Insights query to populate CloudWatch metrics from the log lines. Specify response code and application version as dimensions for the metric.
C) Configure the ALB access logs to write to an Amazon CloudWatch Logs log group. Modify the Lambda function to respond to the ALB with the API operation name, response code, and version number as response metadata. Configure a CloudWatch Logs metric filter that increments a metric for each API operation name. Specify response code and application version as dimensions for the metric.
D) Configure AWS X-Ray integration on the Lambda function. Modify the Lambda function to create an X-Ray subsegment with the API operation name, response code, and version number. Configure X-Ray insights to extract an aggregated metric for each API operation name and to publish the metric to Amazon CloudWatch. Specify response code and application version as dimensions for the metric.

Amazon DOP-C02 Exam - Topic 3 Question 47 Discussion

Actual exam question for Amazon's DOP-C02 exam
Question #: 47
Topic #: 3
[All DOP-C02 Questions]

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 Suggested Answer Hide Answer

Contribute your Thoughts:

0/2000 characters
Sharika
5 months ago
Wait, can we really extract metrics from logs like that? Sounds a bit complex!
upvoted 0 times
...
Rikki
6 months ago
D sounds cool, but X-Ray might be overkill for just metrics.
upvoted 0 times
...
Kati
6 months ago
C is interesting, but do we really need ALB logs for this?
upvoted 0 times
...
Eden
6 months ago
I think B is better since it uses CloudWatch Insights for more flexibility.
upvoted 0 times
...
Anisha
6 months ago
Option A seems straightforward for logging metrics.
upvoted 0 times
...
Leanora
6 months ago
I recall that we had a similar question about logging with Lambda functions, and I think option B could be a good choice since it uses CloudWatch Insights, which we covered in our last session.
upvoted 0 times
...
Flo
7 months ago
I feel like option D with AWS X-Ray might be overkill for just gathering metrics, but it does sound like a solid approach for tracing. I’m not entirely sure though.
upvoted 0 times
...
Teddy
7 months ago
I think option A sounds familiar because it involves writing logs and then filtering them, which we practiced in class. But I’m a bit confused about the dimensions part.
upvoted 0 times
...
Hollis
7 months ago
I remember we discussed using CloudWatch Logs for tracking metrics, but I'm not sure if we should use metric filters or Insights queries for this scenario.
upvoted 0 times
...
Melodie
7 months ago
I feel confident I can solve this. The key is to identify the most efficient and scalable way to gather the metrics across different application versions.
upvoted 0 times
...
Dalene
7 months ago
This looks like a tricky one. I'll need to draw out the architecture and think through the implications of each approach to make sure I select the best option.
upvoted 0 times
...
Alesia
8 months ago
Okay, let's think this through step-by-step. The question is asking for the additional actions the DevOps engineer should take, so I need to evaluate each option carefully.
upvoted 0 times
...
Vallie
8 months ago
Hmm, I'm a bit confused about the different options. I'll need to carefully read through each one and understand the differences before deciding.
upvoted 0 times
...
Lucille
8 months ago
This question seems straightforward. I think I can handle it - the key is to identify the right set of actions to gather the required metrics.
upvoted 0 times
...
Earleen
1 year ago
Haha, 'response metadata'? That sounds like a great way to confuse everyone. I'd steer clear of that one!
upvoted 0 times
...
Arlen
1 year ago
Wait, did you say 'response metadata'? I think I'd rather go with an option that doesn't involve that. Yikes!
upvoted 0 times
...
Nieves
1 year ago
Option A seems a bit too manual for my liking. I'd prefer a more automated solution like B or D.
upvoted 0 times
...
Edelmira
1 year ago
I don't know, I'm leaning towards C. Getting the data directly from the ALB access logs and then using a metric filter seems like the simplest option.
upvoted 0 times
Thora
11 months ago
Let's go with D then, it seems like the best option for gathering the required metrics.
upvoted 0 times
...
Weldon
11 months ago
I agree, D seems like it could give us more comprehensive metrics.
upvoted 0 times
...
Audry
12 months ago
I think C could work, but D might provide more detailed insights.
upvoted 0 times
...
...
Lasandra
1 year ago
I'd go with D. Using X-Ray to capture the data and then have CloudWatch pull the metrics from there seems like a more robust solution.
upvoted 0 times
Tonette
11 months ago
Yeah, X-Ray integration seems like the most comprehensive approach for gathering the required metrics.
upvoted 0 times
...
Lucina
11 months ago
D sounds good, X-Ray can provide detailed insights into the API operations and versions.
upvoted 0 times
...
Ahmed
12 months ago
I agree, using X-Ray for capturing the data and CloudWatch for metrics sounds like a solid plan.
upvoted 0 times
...
Louvenia
1 year ago
D) Configure AWS X-Ray integration on the Lambda function. Modify the Lambda function to create an X-Ray subsegment with the API operation name, response code, and version number. Configure X-Ray insights to extract an aggregated metric for each API operation name and to publish the metric to Amazon CloudWatch. Specify response code and application version as dimensions for the metric.
upvoted 0 times
...
...
Georgeanna
1 year ago
Hmm, I think option B is the way to go. Writing the data to CloudWatch Logs and then using Insights to populate the metrics sounds like a pretty straightforward approach.
upvoted 0 times
Ling
12 months ago
Option B does sound like a straightforward approach. It's a good way to gather the required metrics.
upvoted 0 times
...
Eladia
12 months ago
Yeah, writing the data to CloudWatch Logs and then using Insights to populate the metrics seems efficient.
upvoted 0 times
...
Vanna
12 months ago
Option B does sound like a straightforward approach. It's important to have a clear method for collecting and analyzing the data.
upvoted 0 times
...
Bok
1 year ago
Yeah, writing the data to CloudWatch Logs and then querying it with Insights seems like an efficient way to gather the required metrics.
upvoted 0 times
...
Fletcher
1 year ago
I agree, option B seems like a good choice. Using CloudWatch Logs and Insights for metrics makes sense.
upvoted 0 times
...
Tu
1 year ago
I agree, option B seems like a good choice. Using CloudWatch Logs and Insights for metrics makes sense.
upvoted 0 times
...
...
Lauran
1 year ago
I'm not sure about option A. I think option D with AWS X-Ray integration could provide more detailed insights and a better way to track the metrics we need.
upvoted 0 times
...
Stanford
1 year ago
I agree with Lottie. Option A provides a clear path to gather the metrics we need, and using CloudWatch Logs for this purpose makes sense.
upvoted 0 times
...
Lottie
1 year ago
I think option A is the best choice. Writing logs to CloudWatch Logs and using metric filters seems like a straightforward way to gather the required metrics.
upvoted 0 times
...

Save Cancel