https://github.com/firetail-io/firetail-js-lambda
Simple code example for the logging of lambda requests
https://github.com/firetail-io/firetail-js-lambda
Last synced: 4 months ago
JSON representation
Simple code example for the logging of lambda requests
- Host: GitHub
- URL: https://github.com/firetail-io/firetail-js-lambda
- Owner: FireTail-io
- License: gpl-3.0
- Created: 2023-01-25T11:27:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T12:27:03.000Z (over 1 year ago)
- Last Synced: 2025-02-28T14:41:45.348Z (4 months ago)
- Language: JavaScript
- Size: 288 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Firetail Javascript Lambda Middleware
### Overview
The purpose of this module is to correctly log out the AWS Lambda event and response payload to allow the firetail extension to then send it on to the firetail logging api
[](https://github.com/FireTail-io/firetail-js-lib/actions/workflows/codecov.yml) [](https://codecov.io/gh/FireTail-io/firetail-js-lambda) [](https://github.com/FireTail-io/firetail-js-lambda/blob/main/LICENSE.txt)
The [](https://www.npmjs.com/package/@public.firetail.io/firetail-js-lambda) is a function that wraps around an event handler function in a AWS Lambda to extract the event and response payloads into a base64 logging message.
### Installation
Install the module into your projectImplementing Middleware in lambda function
```js
import * as firetailWrapper from '@public.firetail.io/firetail-js-lambda'module.exports.myFn = firetailWrapper((event,context) => {
// do work here..
return {
statusCode:200,
body: JSON.stringify(data)
};
});
```