newrelic / newrelic-lambda-layers

Source code and utilities to build and publish New Relic's public AWS Lambda layers.
https://newrelic.com/products/serverless-aws-lambda
Apache License 2.0
34 stars 42 forks source link

Missing entity name for lambda logs #257

Open alankritjoshi opened 3 days ago

alankritjoshi commented 3 days ago

Description

I don't see the logs associated with any entities so I can't create workloads to specify them or namespace the events or metrics.

Steps to Reproduce

Expected Behaviour

Relevant Logs / Console output

e.g.,

{
  "aws.lambda_request_id": "b39b3a-c0d1-4e49-8-9a4b5fba80",
  "faas.arn": "arn:aws:lambda:us-east-1:*:function:*-personal-acquisition-job-trigger-lambda-4fb569f",
  "faas.execution": "b3979-c0d1-4e49-88-9a4b5fba80",
  "faas.name": "personal-acquisition-job-trigger-lambda-4fb569f",
  "level": "INFO",
  "logger": "root",
  "message": "Received SNS message: 5566f-1e78-5acd-869e-5ed548",
  "newrelic.source": "api.logs",
  "plugin": "newrelic-lambda-extension:2.3.12",
  "requestId": "b39b3a-c0d1-4e49-8-9a4b5fba80",
  "timestamp": 1719716305000,
  "trace.id": ""
}

Your Environment

Chrome, MacOS

Additional context

workato-integration[bot] commented 3 days ago

https://new-relic.atlassian.net/browse/NR-286735

chaudharysaket commented 2 days ago

Hi @alankritjoshi The instrumented lambda can forward the logs to New Relic either via Extension or log-ingestion subscription.

Thank you

alankritjoshi commented 1 day ago

I'm using the extension and I've the env var set to true. So I'm able to see the logs in the global view.

My question is how do I ensure that the logs are tied to an Entity? If an entity is associated, it would help me create a workload for these logs.

alankritjoshi commented 22 hours ago

Additionally, related question, how do I scope down the events and metrics that I create with this layer and extension? Right now those show up in global scope too.