Challenge: Adding Logs and Traces

Test yourself by adding logs and traces to a Lambda function.

The playground contains a Lambda function that takes an object with two integer numbers as its input. The numbers are added, and the result is returned as the output. Currently, we don’t have any way to monitor the application. We need to add the following changes:

  • Capture the input event.

  • Catch and capture any errors in the logs.

  • Capture the method call, its response, and any errors by using traces.

Get hands-on with 1200+ tech skills courses.