Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Lambda Extension #1139

Open
rittneje opened this issue May 14, 2024 · 3 comments
Open

Support Lambda Extension #1139

rittneje opened this issue May 14, 2024 · 3 comments

Comments

@rittneje
Copy link

Is your feature request related to a problem? Please describe.

We are trying to switch from the old log group subscription approach to your Lambda extension. https://github.com/newrelic/newrelic-lambda-extension

It seems that the Python agent doesn't support it though. Even with the layer installed, it still outputs telemetry directly to the logs. And I don't see any mention of the special named pipe (/tmp/newrelic-telemetry) in this repo.

Feature Description

Automatically detect and use the named pipe from the extension, like the other language agents do.

Describe Alternatives

None.

Additional context

None.

Priority

Must Have. Until this is fixed, we are unable to get all of our Python lambda functions to use a unified log group.

@workato-integration
Copy link

@TimPansino
Copy link
Contributor

The Lambda functionality is published as layers over at https://github.com/newrelic/newrelic-lambda-layers. The layers include some additional code that is used to interface with the lambda extension. An outdated version of the additional functionality is published to PyPi as newrelic-lambda which contains the handler code needed to interface with the extension. Note that version has missing support for API gateway v2, and will be potentially missing some information from traces if used with API gateway v2.

It's easiest to set up lambda monitoring using our Lambda CLI. You can find an example for Python located here.

@hmstepanek
Copy link
Contributor

Log forwarding should be on by default however, maybe your lambda had it turned off since you were using a different forwarder before. See the following for the necessary configuration options:
https://docs.newrelic.com/docs/logs/logs-context/configure-logs-context-python/
Note logging and log forwarding can be set via an environment variable on your lambda if you are not using a configuration file (very likely). Additionally, this should already be configured for you using the process Tim linked above but make sure the following environment variable is set in your lambda as well: NEW_RELIC_SERVERLESS_MODE_ENABLED = true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants