aws-observability / aws-otel-lambda

AWS Distro for OpenTelemetry - AWS Lambda
https://aws-otel.github.io/
Apache License 2.0
146 stars 55 forks source link

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

Open MartinDybdahlM opened 6 months ago

MartinDybdahlM commented 6 months ago

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.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 90 days with no activity. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled

marinipete commented 2 months ago

Any update on this ?

magistersart commented 1 month ago

Any updates? I can't instrument my Lambdas with this layer, as I am strictly bound to ESM