FAQAPMHow do I measure AWS Lambda functions?

Atatus APM automatically instruments AWS Lambda functions, but it sends metrics to our server in every 60 seconds. AWS Lambda NodeJS service might be executed faster than our send cycle. So at end of the every request, you need to call atatus.stop

import atatus from 'atatus-node’;
atatus.start({ apiKey: global.process.env.ATATUS_API_KEY });

// Your code

// Before sending the response, send the data to Atatus.
atatus.stop({ reportBeforeStop: true });