You can upgrade your existing Lambda functions to the new unified monitoring experience with minimal effort. This transition allows you to monitor your Lambda functions with enhanced observability capabilities of New Relic. You can instrument all your existing Lambda functions in bulk, or you can choose to upgrade them one at a time. The upgrade process is non-intrusive and does not require any code changes to your existing functions.
This upgrade applies to Lambda functions instrumented with either New Relic Lambda layers or OpenTelemetry (ADOT) layers. Both layer types deliver the same APM UI experience.
Conseil
Lambda Managed Instance (LMI) users: No upgrade steps are required. LMI functions are automatically detected and configured to run in APM mode — even without setting NEW_RELIC_APM_LAMBDA_MODE = true. Note that Serverless mode is not supported for LMI; only APM mode is available. See Layered instrumentation for LMI setup details.
Prerequisites
- Your Lambda functions is already instrumented in New Relic.
- Your Lambda functions are running on either
python,nodejs,ruby,go, or.NETruntime. To view the list of supported versions of these runtimes, refer to compatibility and requirements docs.
Instrumentation methods
You can upgrade your existing Lambda functions using one of the following methods:
Conseil
New Relic recommends integrating your AWS account with New Relic using the AWS integration to automatically discover and monitor your Lambda functions. This allows you to leverage the full power of New Relic APM for your serverless functions.
Update using New Relic UI
You can upgrade your existing Lambda functions using the New Relic UI.
To upgrade your existing Lambda functions from New Relic platform, follow these steps:
- Go to one.newrelic.com > All capabilities > Serverless Functions > select your Lambda function entity.
- On the Summary page, click Instrument for APM.
- On the Lambda Function for APM page, provide the API key then click Continue.
- By default, current Lambda entity is selected for upgrade. You can also select other Lambda functions to upgrade. Click Generate New Relic CLI command.
- Copy the command and run it in your terminal or in your AWS terminal. The command will install the New Relic Lambda layer on your selected functions.
- Click Continue to test the installation. The test will check whether the New Relic Lambda layer is installed correctly and whether the function is sending data to New Relic.
- If the test is successful, you will see a success message. To view your Lambda function in the New Relic APM interface, click See your data in APM.
Update using CLIs
Update existing Lambda alerts and dashboards
After you upgrade your existing Lambda functions to APM + Serverless Convergence, it's crucial to update the NRQL queries in your alert conditions and dashboard widgets. This new upgrade changes the metric paths for your Lambda data. Modifying your queries is necessary to ensure your alerts and dashboards use these new paths and continue to provide accurate monitoring and notifications. This is required for any existing Lambda functions that you have transitioned to APM + Serverless Convergence.
For alerts, review your existing Lambda alert conditions. Update any NRQL queries that use metrics sourced from layers with the new metrics. For more information on how to update your alert conditions, refer to the Update an alert.
For dashboards, review your existing Lambda dashboard widgets. Update any NRQL queries that use metrics sourced from layers with the new metrics. For more information on how to update your dashboard widgets, refer to the manage dashboard.
Find and use data
After you instrument your AWS Lambda functions, you can find and use the data in the New Relic APM interface. Lambda functions instrumented via OpenTelemetry (ADOT layer) now display the same APM UI experience as functions instrumented with New Relic APM agents, including a consistent Summary page and normalized metrics in apm.* format.
To view your Lambda functions in the New Relic APM interface:
- Go to one.newrelic.com > APM & Services.
- Set the search criteria as
isLambdaFunction = true. - From the displayed list, select your Lambda function to view the data.
Important
The New Relic APM UI does not display historical data for Lambda functions that were instrumented before the APM + Serverless Convergence upgrade. To view the historical data, click see serverless functions on the APM Summary page.
Summary
The Summary page provides a quick view of the most important performance data for your Lambda function, including response time, throughput, and error rate. This page is available for both APM-instrumented and OpenTelemetry (ADOT)-instrumented Lambda functions.
CloudWatch metrics
The CloudWatch metrics tab displays Lambda performance data sourced from AWS CloudWatch via New Relic's metric synthesis layer. Charts include:
- Invocation counts
- Duration
- Throttles
- Error counts
This tab is available for both APM-instrumented and OpenTelemetry (ADOT)-instrumented Lambda functions.
Lambda metrics
The Lambda metrics tab displays performance data sourced directly from the New Relic Lambda layer. It is organized into two sections:
- Costs: Invocations and Memory usage charts.
- Performance: Cold starts, time outs, iterator age, and concurrent executions.
callout.note
For Lambda functions running in Lambda Managed Instance (LMI) mode, the Billed duration chart is not shown in the Costs section. LMI billing is based on EC2 cost, management fee, and vCPU usage — not Lambda execution duration.
Transactions
The Transactions tab lists Lambda transactions with performance data such as duration and throughput. The AWS Request ID column identifies each Lambda execution by its unique AWS request identifier, allowing you to drill down into a specific invocation's APM transaction trace for detailed information about that particular Lambda execution.
Distributed tracing
The Distributed tracing tab shows distributed traces that include the monitored Lambda function. For details, see Distributed tracing.
Errors
The Errors tab displays errors and exceptions for your Lambda function. You can filter by error rate, error percentage, or error class, and drill down into stack traces.
Logs
The Logs tab displays recent log messages from your Lambda function. For details, see Logs.
Rollback
If you need to revert your Lambda functions back to the previous serverless monitoring experience, you can do so by setting the NEW_RELIC_APM_LAMBDA_MODE environment variable to false.