aws-log-ingestion icon indicating copy to clipboard operation
aws-log-ingestion copied to clipboard

Set service_name from Log Group and hostname from Log Stream

Open jnoss opened this issue 3 years ago • 3 comments

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.

jnoss avatar Aug 13 '21 15:08 jnoss

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.

mrickard avatar Oct 19 '21 23:10 mrickard

CLA assistant check
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.

CLAassistant avatar Apr 28 '23 20:04 CLAassistant

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!

umaannamalai avatar Jul 12 '23 17:07 umaannamalai