-
Notifications
You must be signed in to change notification settings - Fork 159
refactor(tracer): replace class-based env access with functional helpers #4146
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
refactor(tracer): replace class-based env access with functional helpers #4146
Conversation
Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need. |
Hi @chetan9518 thank you for opening this PR! I'll review it soon, in the meantime could you please leave a comment on the linked issue, so that I can assign it to you? GitHub doesn't allow me to assign issues if you haven't interacted with it first. Thank you. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for the PR.
I've left a few comments but it's looking good.
Before pushing the next commit, could you please run npm run lint:fix -w packages/tracer
from the root? I think some lines didn't get formatted correctly.
Also I noticed you left a comment under another issue, but not the one linked to this PR (#4137). Please leave a comment there so we can assign this to you - it really helps our tracking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR, I made some small changes so I'll wait for another reviewer before merging it - but it's ok for me.
Thanks!
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |
Summary
This PR removes the legacy class-based
EnvironmentVariablesService
from the Tracer package and replaces it with functionalgetEnv
helpers from@aws-lambda-powertools/commons
.Changes
EnvironmentVariablesService
classgetEnv
,getXRayTraceIdFromEnv
)EnvironmentVariablesService.test.ts
(no longer needed)Issue number: #4137
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.