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

Create a new Node.js wrapper for ESM #318

Open
bizob2828 opened this issue Mar 11, 2025 · 1 comment
Open

Create a new Node.js wrapper for ESM #318

bizob2828 opened this issue Mar 11, 2025 · 1 comment
Assignees

Comments

@bizob2828
Copy link
Member

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

We currently have one Node.js wrapper newrelic-lambda-wrapper.handler. To use it for ESM based lambdas, you have to set the env var of NEW_RELIC_USE_ESM. You also have to set NODE_OPTIONS='--experimental-loader newrelic/esm-loader.mjs. The problem with having 1 wrapper is it has to be entirely synchronous. This was fine up until our investigations of supporting lambda response streaming(newrelic/node-newrelic#2901). The lambda runtime detects response streaming from a symbol on the handler. Our agent is propagating this handler to the wrapped function but the layer wraps the wrapped function and the symbols are removed.

Feature Description

Publish 2 different lambda wrappers. Update README and docs phasing our NEW_RELIC_USE_ESM in favor of the new esm wrapper.

@workato-integration
Copy link

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

1 participant