Use these CloudWatch features to improve AWS app monitoring
Amazon CloudWatch ServiceLens, Synthetics and Contributor Insights give users more ways to monitor their AWS applications. Find out how these features work before you get started.
Admins and developers can monitor their infrastructure and application components in AWS with Amazon CloudWatch. Although this service is known for its metrics, alarms and logs, it offers a wider set of capabilities that help customers gain deep visibility into their systems to ensure the health of their applications.
CloudWatch ServiceLens, Synthetics and Contributor Insights are recent additions that expand the scope of AWS application monitoring. IT teams that want to set up advanced application monitoring can implement these CloudWatch features for early detection and fast remediation of application issues in AWS.
Explore how these features build on current monitoring capabilities and learn how to get started with these AWS monitoring features.
ServiceLens centralizes AWS application monitoring
ServiceLens organizes AWS X-Ray traces, as well as data from CloudWatch Metrics, CloudWatch Alarms and CloudWatch Logs, so the information can be visualized in a single place. In order to understand ServiceLens, IT teams have to be familiar with AWS X-Ray, which collects data for requests handled by applications. This includes which systems initiate them, their targets, and any latencies and status codes.
To use ServiceLens, enable the X-Ray agent in your compute infrastructure -- EC2 instances, Fargate containers or Lambda functions. Previously, X-Ray traces were only available in an isolated way and it was difficult to correlate a particular behavior in X-Ray with other system data, such as CloudWatch metrics or logs. By organizing all of this data in a single place, ServiceLens delivers a wider context to developers and allows for better monitoring and troubleshooting of applications in AWS.
While ServiceLens itself is free, users pay for associated X-Ray usage as well as any use of CloudWatch Metrics and CloudWatch Logs. X-Ray charges $5 per 1 million traces recorded, $0.50 per million traces scanned and $0.50 per million traces retrieved.
An application that receives one trace per second -- approximately 2.6 million traces per month -- and records 100% of these traces would incur approximately $13 a month in charges for recorded traces. If all traces were eventually scanned and retrieved, this would amount to an extra $2.60 per month for scanned and retrieved traces, for a total of $15.60 per month. Keep in mind that the percentage of recorded traces can be configured in X-Ray, so users can record fewer traces if cost becomes an issue.
Synthetics tests for the user perspective
With CloudWatch Synthetics, developers can configure canaries that trigger and monitor common user interactions on web applications. For example, developers can configure calls to application APIs at a configurable frequency. These canaries evaluate the data and status codes returned by the API. They also trigger CloudWatch alarms according to the response.
Users can configure more complex flows that resemble real-life interactions, such as navigating through multiple web pages and executing specific tasks. For example, an online retailer can configure canaries that navigate through a product catalog and select specific products. The interactions in Synthetics canaries are defined using Node.js scripts, which allows for flexibility in terms of the user behavior they replicate and how responses are evaluated.
With these canaries, Synthetics brings a user experience perspective to AWS application monitoring in CloudWatch. Previously, CloudWatch users could only focus on system metrics, traces and logs. While these are essential troubleshooting pieces, they don't detect specific issues from an end-user and business experience perspective.
CloudWatch Synthetics costs $0.0012 per canary run. A canary that sends one interaction per minute would cost approximately $52 every 30 days. Even though this is a useful feature, application owners need to be aware that costs can add up if they configure canaries that result in a high frequency of executions.
Contributor Insights analyzes CloudWatch patterns
Application owners can identify common patterns affecting system behavior with this CloudWatch feature. Contributor Insights analyzes log events sent to CloudWatch Logs and identifies the top influencers on app performance. For instance, if a server with a particular host IP makes a high percentage of calls to an application, Contributor Insights will detect it.
Users can then filter the types of log entries to analyze. For example, if a team is interested in log records that show errors or high latencies, it can set Contributor Insights to only return log entries with a particular value for a specific field -- e.g. latency over 500 milliseconds or a 500 status code. Data from Contributor Insights can then be matched against other available metrics published by CloudWatch, which is useful for troubleshooting and optimization tasks.
To get started, select one or more CloudWatch Logs groups and specify the fields contained in each log record. Then, choose the conditions to filter fields by and the actions to take when a threshold is exceeded, such as triggering a CloudWatch alarm. Contributor Insights delivers visualizations that help identify the top items relevant to your application. Results can also be added to a CloudWatch dashboard.
Contributor Insights is useful to find patterns that are not necessarily obvious or require a time-consuming analysis of data available in CloudWatch Logs. Even though this feature is similar to CloudWatch Logs metric filters, it provides greater data aggregation and discovery since that feature simply converts text patterns from CloudWatch Logs into CloudWatch Metrics. With metric filters, users still have to find the right metric aggregation and analyze them, while Contributor Insights simplifies the whole discovery and visualization of relevant patterns in an application.
Contributor Insights integrates with DynamoDB and provides visibility into the most accessed keys and items for tables and global secondary indexes. Developers can enable this feature in the DynamoDB console. If DynamoDB throttling is an issue for an application, this will show the most throttled keys and items in a table or global secondary index, which is a great feature for troubleshooting and optimization activities.
Pricing for Contributor Insights is $0.50 per rule per month and $0.02 per one million log events that match the rule per month. If you had an application that matched one rule per second, you'd pay $0.55 per month for that single rule.