OPS04-BP03 Implement user activity telemetry
Instrument your application code to emit information about user activity. Examples of user activity include click streams or started, abandoned, and completed transactions. Use this information to help understand how the application is used, patterns of usage, and to determine when a response is required. Capturing real user activity allows you to build synthetic activity that can be used to monitor and test your workload in production.
Desired outcome:
-
Your workload emits telemetry about user activity across all applications.
-
You leverage synthetic user activity to monitor your application during off-peak hours.
Common anti-patterns:
-
Your developers have deployed a new feature without user telemetry. You cannot tell if your customers are using the feature without asking them.
-
After a deployment to your front-end application, you see increased utilization. Because you lack user activity telemetry, it is difficult to identify the exact issue.
-
An issue occurs in your application during off-peak hours. You do not notice the issue until the morning when your users come online because you have not configured synthetic user activity.
Benefits of establishing this best practice:
-
Understand common user patterns or unexpected behaviors to optimize functionality of the application to fit your business goals.
-
Monitor the application from the perspective of your users to detect problems with user experience, such as broken links or slow click responses
-
Identify the root cause of issues by tracing the steps your impacted user has taken.
-
Synthetic user activity can provide early warning signs of performance degradation during off-peak hours, allowing you to take corrective action before actual users are affected.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
Design your application code to emit information about user activity. Use this information to help understand how the application is used, patterns of usage, and to determine when a response is required. Utilize synthetic user activity to provide insight into application performance during off-peak hours.
Customer example
AnyCompany Retail implements user activity telemetry at several layers in their application. The front-end telemetry tracks pointer and movement events while the backend microservices emit telemetry tracking events like adding an item to the user's cart and checking out. Together they provide observability into the user experience. AnyCompany Retail also uses synthetic user telemetry to catch problems when there are fewer users on the workload.
Implementation steps
-
Instrument your application to emit telemetry (metrics, events, logs, and traces) about user activity. Once instrumented, front-end components emit telemetry automatically as the user interacts with the user interface. Backend applications emit telemetry on user events and transactions.
-
Amazon CloudWatch RUM can provide insight into end user experience for front-end applications.
-
You can use the AWS Distro for Open Telemetry
to instrument and capture telemetry from your applications. -
Amazon Pinpoint can analyze user behavior through campaigns, providing insight on user engagement.
-
Customers with Enterprise Support can request the Building a Monitoring Strategy Workshop
from their Technical Account Manager. This workshop helps you build an observability strategy for your workload.
-
-
Establish synthetic user activity to monitor your application. Synthetic user activity simulates user actions to validate that your application is working properly.
-
Amazon CloudWatch Synthetics can simulate user activity using canaries.
-
Level of effort for the implementation plan: High. It may take significant development effort to fully instrument your application to collect user activity telemetry.
Resources
Related best practices:
-
OPS04-BP01 Implement application telemetry - Application telemetry is required in order to build in user activity telemetry.
-
OPS04-BP02 Implement and configure workload telemetry - Some user activity telemetry may also be considered workload telemetry.
Related documents:
Related videos:
Related examples:
Related services: