Environment variables are a way to store configuration and secrets outside of your code. The following tables display the mandatory variables and runtime specific variables that you can set to monitor your Lambda functions with New Relic.
Mandatory environment variables
Regardless of your runtime, you must set the following environment variables to monitor your Lambda functions with New Relic:
Variable Name | Description |
---|---|
| Specifies your New Relic account ID |
| Specifies the handler wrapper used to find your function's actual handler |
| Specifies your New Relic ingest key, overriding Secrets Manager |
| Specifies your New Relic account ID or parent ID, if it exists |
Additional environment variables
Based on your runtime, you can set the following environment variables to further configure the New Relic Lambda monitoring:
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Required: Enable ESM functions that use async/await and not callbacks by setting this to |
|
|
| Generate traces by enabling Distributed Tracing |
|
|
| Use environment variables in Lambda by setting this to |
| Set the application name, though it is not used in the New Relic UI | ||
|
|
| Enable agent logging by setting this to |
|
|
| Set the agent log level |
|
|
| Set the agent log path to |
|
|
| Disable to reduce cold start duration by setting this to |
You can find more environment variables in our Node.js configuration documentation.
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Generate traces by enabling Distributed Tracing |
|
|
| Use environment variables in Lambda by setting this to |
| Set the application name, though it is not used in the New Relic UI | ||
|
|
| Set the agent log path to |
|
|
| Set the agent log level |
|
|
| Enable serverless mode by setting this to |
|
|
| Improve cold start times by setting this to |
You can find more environment variables in our Python configuration documentation.
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Generate traces by enabling Distributed Tracing |
| Set your New Relic account ID | ||
|
|
| Enable the agent log level by setting this to |
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Generate traces by enabling Distributed Tracing |
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Generate traces by enabling Distributed Tracing |
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Required: Enable profiling by setting this to |
|
| Required: Set this to | |
|
| Required: Set this to | |
|
| Required: Set this to | |
|
|
| Generate traces by enabling Distributed Tracing |
| Set the application name, though it is not used in the New Relic UI | ||
|
|
| Disable agent logging by setting this to |
|
|
| Set this to |
|
|
| Set the agent log level |
You can find more environment variables in our .NET configuration documentation and layerless instrumentation method.
Environment variable | Default value | Options | Description |
---|---|---|---|
|
|
| Disable the extension by setting this to |
|
| Set a custom secret name in AWS Secrets Manager | |
| 10s | Set the timeout duration for | |
|
|
| Disable |
|
|
| Set the log level for |
|
|
| Send function logs by setting this to |
|
|
| Send extension logs by setting this to |
|
|
| Set the logs endpoint |
|
|
| Set the telemetry endpoint |
| Bypass checks by supplying them as comma-separated values within a string. Use |
See more environment variables for the New Relic extension in our documentation.