DVA-C02 Question 377
Select 3You are developing a microservices-based application hosted on AWS. Each service publishes custom application metrics, such as order processing time, to Amazon CloudWatch. Recently, you noticed a delay in processing orders and want to troubleshoot by analyzing these custom metrics. What is the correct approach to ensure you can monitor these metrics effectively and identify the issue?
- A
Use the CloudWatch PutMetricData API to publish custom metrics from your application.
- B
Create a CloudWatch dashboard to visualize the custom metrics and identify patterns.
- C
Enable detailed monitoring on the EC2 instances hosting the application to automatically track custom metrics.
- D
Use CloudWatch Logs Insights to query your custom metrics directly from the logs.
- E
Set up CloudWatch Alarms on the custom metrics to notify you of any anomalies in order processing time.
Show answer and explanation
Correct answers: A, B, E
Explanation
To monitor custom application metrics effectively, you must first publish them to CloudWatch using the PutMetricData API. Visualizing these metrics on a CloudWatch dashboard helps identify patterns or anomalies. Additionally, setting up CloudWatch Alarms provides proactive notifications of issues, such as delays in order processing. Detailed monitoring on EC2 and CloudWatch Logs Insights are not relevant for managing custom metrics.
- A. Correct.
Correct. The CloudWatch PutMetricData API is the primary method for sending custom metrics from your application to CloudWatch.
- B. Correct.
Correct. CloudWatch dashboards allow you to visualize and correlate custom metrics, making it easier to identify delays or anomalies.
- C. Incorrect.
Incorrect. Detailed monitoring on EC2 instances tracks AWS system-level metrics, not custom application metrics. Custom metrics still need to be explicitly published.
- D. Incorrect.
Incorrect. CloudWatch Logs Insights is used for querying log data, not metrics. Application metrics must be sent to CloudWatch Metrics for monitoring.
- E. Correct.
Correct. Setting up CloudWatch Alarms on custom metrics allows you to proactively monitor and respond to anomalies, such as increased order processing time.