newrelic / serverless-newrelic-lambda-layers

A Serverless plugin to install New Relic's AWS Lambda layers without requiring a code change.
Apache License 2.0
56 stars 51 forks source link

lazy initialization lambda with NR Layer #376

Closed haooliveira84 closed 11 months ago

haooliveira84 commented 1 year ago

Guys, In one lambda service, I am using version 3.4.3 of this plugin. In other I am using version 3.5.0 (latest). Both services are using NodeJs inside AWS. Independent of plugin version if layer version is: arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18XARM64:40

But since a few days ago we realized that the initializing is lazing in lambda could start

workato-integration[bot] commented 1 year ago

https://issues.newrelic.com/browse/NR-151574

mrickard commented 1 year ago

@haooliveira84 Are you using ESM?

haooliveira84 commented 1 year ago

@mrickard we don't

haooliveira84 commented 1 year ago

In my test I've identified that versions of layer above arn:aws:lambda:us-east-1:451483290750:layer:NewRelicNodeJS18XARM64:30 there is this behavior

haooliveira84 commented 1 year ago

I think this issue can be related with https://github.com/newrelic/newrelic-lambda-layers/issues/174

mrickard commented 11 months ago

@haooliveira84 We've released a new version of the Node wrapper for Lambda layers, and in testing this significantly reduces instrumentation time on cold starts.