-
Notifications
You must be signed in to change notification settings - Fork 154
Bug: importing Tracer
from powertools v2 causes SyntaxError
#2163
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
Comments
Thanks for opening your first issue here! We'll come back to you as soon as we can. |
Tracer
from powertools v2 causes SyntaxError
Tracer
from powertools v2 causes SyntaxError
Hi, thank you for reporting the issue and for also providing a workaround. I was able to reproduce it on my end and I am working on a fix. |
The PR with the fix is up and ready for review, within the next ~8hrs the next maintainer should come online and be able to review it. Once that's done we'll be able to make a release with the fix. Thanks for your patience and apologies for the inconvenience. |
This issue is now closed. Please be mindful that future comments are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so. |
This is now released under v2.0.2 version! |
Expected Behaviour
No error thrown
Current Behaviour
When running my ESM Lambda's locally, just importing
Tracer
will cause the following error any time I hit one of my routes.Code snippet
It looks like the issue is how
Segment
and/orSubsegment
are being imported fromaws-xray-sdk-core
in the transpiled js code.node -e "import { Tracer } from '@aws-lambda-powertools/tracer';" --input-type=module
Steps to Reproduce
Create
tracer.mjs
and put this in it.Run
node tracer.mjs
You should see something like this:
Possible Solution
Powertools for AWS Lambda (TypeScript) version
2.0.1
AWS Lambda function runtime
20.x
Packaging format used
npm
Execution logs
No response
The text was updated successfully, but these errors were encountered: