You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/containerized-images.mdx
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ redirects:
7
7
freshnessValidatedDate: never
8
8
---
9
9
10
-
If you're using a containerized image for a Lambda function and want to monitor your application, you'll need to add a pre-built [New Relic Lambda layer](https://gallery.ecr.aws/newrelic-lambda-layers-for-docker?page=1) to your Dockerfile that matches your function's runtime.
10
+
If you're using a containerized image for a Lambda function and want to monitor your application, you'll need to add a pre-built [New Relic Lambda layer](https://gallery.ecr.aws/newrelic-lambda-layers-for-docker?page=1) to your Dockerfile that matches your function's runtime.
11
11
12
12
Here's a diagram showing the process of adding New Relic to the Dockerfile so you can monitor your function:
13
13
@@ -122,6 +122,8 @@ Here's a guide to adding our pre-built layer to your code.
122
122
123
123
# CMD override to New Relic's handler wrapper
124
124
CMD [ "newrelic-lambda-wrapper.handler" ]
125
+
# If your lambda function is ESM, use the New Relic's Node.js ESM handler wrapper
Try out [working example](https://github.com/newrelic/newrelic-lambda-extension/tree/main/examples/sam/containerized-lambda/nodejs-sam-example) of a Node.js containerized Lambda function using SAM.
Copy file name to clipboardExpand all lines: src/content/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/env-variables-lambda.mdx
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -73,7 +73,7 @@ Based on your runtime, you can set the following environment variables to furthe
73
73
<td>`NEW_RELIC_USE_ESM`</td>
74
74
<td>`false`</td>
75
75
<td>`true`, `false`</td>
76
-
<td>**Required**: Enable ESM functions that use async/await and not callbacks by setting this to `true`</td>
76
+
<td>**DEPRECATED**: This will be removed from future versions of the Node.js lambda layer. Instead set your handler to `/opt/nodejs/node_modules/newrelic-esm-lambda-wrapper/index.handler`</td>
77
77
</tr>
78
78
<tr>
79
79
<td>`NODE_OPTIONS`</td>
@@ -293,7 +293,7 @@ You can find more environment variables in our [Python configuration documentati
Copy file name to clipboardExpand all lines: src/content/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/instrument-your-own.mdx
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -158,7 +158,7 @@ Depending on your needs, you can choose to either bypass the extension and only
158
158
// Add latest New Relic Lambda layer ARN from https://layers.newrelic-external.com
Note that for Go, you must make source code changes to your Lambda function to instrument it. Configuration changes are not enough.
@@ -263,4 +265,4 @@ Depending on your needs, you can choose to either bypass the extension and only
263
265
<DocTile title="Compatibility and requirement" path="/docs/serverless-function-monitoring/aws-lambda-monitoring/instrument-lambda-function/compatibility-requirement-lambda-monitoring">Learn more about supported runtimes and prerequisites</DocTile>
264
266
<DocTile title="Data and UI" path="/docs/serverless-function-monitoring/aws-lambda-monitoring/ui-data/understand-lambda-monitoring-ui/" >Learn how to use New Relic to monitor your AWS Lambda functions</DocTile>
265
267
<DocTile title="Troubleshooting" path="/docs/serverless-function-monitoring/aws-lambda-monitoring/troubleshooting" >Learn how to troubleshoot installation related issues</DocTile>
Copy file name to clipboardExpand all lines: src/content/docs/serverless-function-monitoring/aws-lambda-monitoring/troubleshooting/troubleshoot-enabling-serverless-monitoring-aws-lambda.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Besides these basic enablement problems, there are some additional problems that
31
31
32
32
* If you're instrumenting with layers: make sure in your function configuration that the New Relic layer is merged before other layers (though if your function uses webpack, the New Relic layer should be merged after the webpack layer).
33
33
* If you're instrumenting a Node.js function manually, make sure that [logging is enabled](/docs/apm/agents/nodejs-agent/installation-configuration/nodejs-agent-configuration/#logging_config), and that your function imports <DNT>**newrelic**</DNT> before it imports any dependencies you expect to monitor.
34
-
* If you're using ES Modules with a Node.js function, make sure that the environment variable `NEW_RELIC_USE_ESM` is set to `true`. Additionally, make sure you're using async/await or promises for handling asynchronous behavior in your function, as callback-based functions are not supported when using ES Modules.
34
+
* If you're using ES Modules with a Node.js function, make sure to change the handler function to `/opt/nodejs/node_modules/newrelic-esm-lambda-wrapper/index.handler`. Additionally, set the environment variable of `NODE_PATH` to `--experimental-loader newrelic/esm-loader.mjs`.
35
35
36
36
If none of these solutions help you, contact our [support team](https://support.newrelic.com/). The following information will help you when you talk to support technicians:
0 commit comments