This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Optionally add prefix to each log line to see the origin #9
Open
peterlundberg
wants to merge
23
commits into
LogentriesCommunity:master
Choose a base branch
from
funnel-io:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…E_PREFIX_WITH_LAMBDA_SOURCE)
…s-cloudwatch into merge-base-changes Conflicts: README.md le_cloudwatch.py le_config.py
Prefix support + latest certify + upstream changes
This handles trailing \n in log lines without encoding them to LINE_SEPERATORS and also any unintended inital spaces
Add include filtering option
Not a lot of feedback here ;) We are considering dropping our fork https://github.com/funnel-io/le-aws-cloudwatch as we no longer have use for it or want to maintain it. The changes with certify upgrades and improved configurability could be of use to others? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When multiple cloudwatch log groups are subscribed to by the same instance of this lambda it is very useful to see what line came from which log. A similar technique is commonly used when forwarding logging from Docker containers.
With this change the name of the lambda function (or rather last part of the logGroup) and the last part of the logStream is provided as a prefix to each line sent to logentries. Thus one can see which lambda and lambda "instance" lines are from. Eg with show timestamp in LE UI and logging from
/aws/lambda/pelu-hello-world-test
:The PR is unfortunately larger than perhaps desirable as it is from a fork we use and contains a few other changes/fixes as well. It would be great to be able to share this work with others in the community.
To summarize:
prefix
environment option to be able to get a<functionname stream>
prefix on all lines so can see what logged each line.\n
chars before sending)Makefile
to simplify upgrade / zip if desiredeu
if not set in environment