By

Monitoring AWS Lambda functions with Atatus APM

The serveless computing becomes super popular among developers. AWS Lambda functions is one of the best serverless compute service. Using Atatus APM, You can start monitoring your functions on AWS Lambda.

What exactly is AWS Lambda?

Every organization face lot of complexities in setting up servers, databases, queues and much more systems to match the business needs. Only devops team know how painful it is to provision and maintain the servers.

AWS Lambda solves this problem by allowing developers to implement any functionality without the need to provision and maintain servers. A Lambda function can be uploaded and configured, and then can be executed without setting up your own servers.

What to measure?

With Atatus APM, you’ll be able to alert on and visualize the following metrics for Lambda functions:

  • Execution time of the requests
  • Database and external service response time
  • Requests count
  • Failure count (4XX and 5XX)
  • Errors and its stack trace to debug

How to measure with Atatus APM?

The integration with Atatus is just a 3 lines of code as follows

const atatus = require('atatus-node');
atatus.start({ apiKey: global.process.env.ATATUS_API_KEY });

// Before sending response back
atatus.stop({ reportBeforeStop: true });

Now you can visualize how your stack is performing in the Atatus dashboard. Regarding exceptions, all unhanded exceptions from Lambda functions will be automatically captured by Atatus. If you want to manually capture any errors, Just use notifyError method.

atatus.notifyError(new Error("Database connection is failed!"));

If you’re new to Atatus, Start today with free 14 day trial – no credit card required.

Written by
Developer

With Atatus, Get to know exactly how your users are experiencing your app.

Start your free 14-day trial