logdna / logdna-cloudwatch

AWS Lambda for logging from CloudWatch into LogDNA
MIT License
12 stars 19 forks source link

add `LOG_RAW_EVENT` environment variable option to set `line` to raw `event.message` #22

Closed smusali closed 4 years ago

smusali commented 4 years ago

The growing number of customers have started requesting the possibility of sending the raw event messages in the line field instead of having a custom payload.

Handling the new environment variable is implemented in the same way as handling LOGDNA_EVENTLOG and LOGDNA_FILELOG in logdna/logdna-s3

In addition to that change, the following changes have been included in this Pull Request:

smusali commented 4 years ago

Any possibility to add some tests in here?

Also, looks like the CircleCI workflow isn't hooked up to the PR.

@matt-march, CircleCI has been hooked up but it does just linting check - will add tap tests today.

smusali commented 4 years ago

@jakedipity @matt-march, tested this new Lambda function, it works as expected.

This is when LOG_RAW_EVENT is not enabled: image

And this is when LOG_RAW_EVENT is enabled: image

I will add the unit tests in Tap today.

smusali commented 4 years ago

@matt-march, @jakedipity, added tap unit testing coverage as well: image

smusali commented 4 years ago

@jakedipity, @matt-march, can you do another round of review here? Thanks!

smusali commented 4 years ago

@jakedipity, @matt-march, can you do another round of review here? Thanks!