OPS04-BP05 Implement transaction traceability - AWS Well-Architected Framework (2023-04-10)

OPS04-BP05 Implement transaction traceability

Implement your application code and configure your workload components to emit events, which are started as a result of single logical operations and consolidated across various boundaries of your workload. Generate maps to see how traces flow across your workload and services. Gain insight into the relationships between components, and identify and analyze issues. Use the collected information to determine when a response is required and to assist you in identifying the factors contributing to an issue.

Desired outcome:

  • Collect transaction traces across your workload to gain insight into the relationship between components.

  • Generate maps to gain a better understanding of how transactions and events flow across your workload.

Common anti-patterns:

  • You have implemented a serverless microservices architecture spanning multiple accounts. Your customers are experiencing intermittent performance issues. You are unable to discover which function or component is responsible because you lack transaction traceability.

  • There is a performance bottleneck in your workload. Because you lack transaction traceability, you are unable to see the relationship between your application components and identify the bottleneck.

  • The identifier used for traces is not globally unique, resulting in a tracing collision when analyzing workload behavior.

Benefits of establishing this best practice:

  • Understanding the flow of transactions across your workload provides insight into the expected behavior of your workload transactions.

  • You can see variations from expected behavior across your workload and you can respond if necessary.

  • You can pinpoint transactions by their unique generated identifier independent from where they were generated.

Level of risk exposed if this best practice is not established: Low

Implementation guidance

Design your application and workload to emit information about the flow of transactions across system components. Data to include in transactions are a globally unique transaction identifier, transaction stage, active component, and time to complete activity. Use this information to determine what is in progress, what is complete, and what the results of completed activities are.

Customer example

At AnyCompany Retail, all transactions have a globally unique UUID generated. This UUID is passed between microservices during transactions. The UUID is used to create transaction traces as users interact with the workload. A map of the workload topology is generated with the traces and is used to troubleshoot workload issues and improve performance.

Implementation steps

  1. Instrument the applications in your workload to emit transaction traces. This can be done by generating a unique identifier for each transaction and passing the identifier between applications.

    1. You can use auto-instrumentation in the AWS Distro for OpenTelemetry to implement traces in your existing applications without modifying your application code.

  2. Generate maps of your application topology. Use these maps to improve performance, gain insights, and aid in troubleshooting.

    1. AWS X-Ray can generate maps of the applications in your workload.

Level of effort for the implementation plan: Medium. Implementing transaction traces may require moderate development effort.

Resources

Related best practices:

Related documents:

Related videos:

Related examples:

Related services: