Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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 days 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 (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-11-24T12:27:03.000Z (12 months ago)
- Last Synced: 2024-11-12T07:00:33.430Z (8 days 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
[![Code Coverage](https://github.com/FireTail-io/firetail-js-lambda/actions/workflows/codecov.yml/badge.svg)](https://github.com/FireTail-io/firetail-js-lib/actions/workflows/codecov.yml) [![codecov](https://codecov.io/gh/FireTail-io/firetail-js-lambda/branch/main/graph/badge.svg?token=BN44NPKV8H)](https://codecov.io/gh/FireTail-io/firetail-js-lambda) [![License](https://img.shields.io/pypi/l/firetail.svg)](https://github.com/FireTail-io/firetail-js-lambda/blob/main/LICENSE.txt)
The [![npm version](https://badge.fury.io/js/@public.firetail.io%2Ffiretail-js-lambda.svg)](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)
};
});
```