aws-log-ingestion
aws-log-ingestion copied to clipboard
Set service_name from Log Group and hostname from Log Stream
This PR uses the name of the CloudWatch Log Group and Log Stream to set the Service Name and hostname attributes in New Relic Logs. This is useful for applications that do not set those in their own logs.
Details:
- New Relic Logs attribute
service_name
will be set to the CloudWatch Log Group (trailing portion/
delimited), and - New Relic Logs attribute
hostname
will be set to the trailing portion of the CloudWatch Log Stream (/
or]
delimited, the ECS task ID for ECS logs or identifier for an instance of a Lambda).
Without this change, both of those fields are N/A in New Relic Logs if the application is not setting them in the log message.
Thank you again, @jnoss ! And apologies for the delay in getting to this PR. At this point, I'd be happy to accept this once you've rebased against the current master branch.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Hi @jnoss! Would you be able to sign the CLA for this? If you could do so, then we should be able to merge this after the branch has been rebased. Thanks for opening this PR!