newrelic-lambda-apm-wrapper

0.2.0 • Public • Published

Newrelic Lambda APM Wrapper

Currently, only wraps a background transaction.

Example

handler.js in lambda

const nr = require('newrelic');
const createBackgroundTransaction = require('newrelic-lambda-apm-wrapper').createBackgroundTransaction.bind(null, nr);
 
exports.someFunction = createBackgroundTransaction('SomeFunction', (event, context) => {
    // figure out some stuff
    return someWork(event)
        .then(result => {
            statusCode: 200,
            body: JSON.stringify(result)
        });
});

Readme

Keywords

none

Package Sidebar

Install

npm i newrelic-lambda-apm-wrapper

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • mrlannigan