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

Support for ES6 imports and exports when using aws-otel-nodejs lambda layer #875

Open
MartinDybdahlM opened this issue Mar 11, 2024 · 0 comments

Comments

@MartinDybdahlM
Copy link

Is your feature request related to a problem? Please describe.
One possible issue that we have encountered while using the aws-otel-nodejs lambda layer is the incompatibility with Middy, a middleware engine for lambda handlers. Middy has recently dropped support for CommonJs, which means we cannot use module.exports as required by the aws-otel documentation.

Describe the solution you'd like
Support for ES6 modules (imports/exports) to enable ESModules rather than CommonJS so we can use the import and export syntax in your Node.js applications, instead of exporting modules.

Describe alternatives you've considered
Another option we have is to follow the open telemetry example for JavaScript serverless functions and write our own code to integrate it, instead of relying on the lambda layer.

Additional context
ESM is recognized as the official standard by NodeJs' docs.

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