Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chetan9518
Copy link

Summary

This PR removes the legacy class-based EnvironmentVariablesService from the Tracer package and replaces it with functional getEnv helpers from @aws-lambda-powertools/commons.

Changes

  • Removed EnvironmentVariablesService class
  • Replaced all class-based env access with functional helpers (e.g. getEnv, getXRayTraceIdFromEnv)
  • Removed EnvironmentVariablesService.test.ts (no longer needed)
  • Confirmed all tests pass and builds succeed

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.

@pull-request-size pull-request-size bot added the size/L PRs between 100-499 LOC label Jul 7, 2025
@boring-cyborg boring-cyborg bot added tests PRs that add or change tests tracer This item relates to the Tracer Utility labels Jul 7, 2025
Copy link

boring-cyborg bot commented Jul 7, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

Copy link

sonarqubecloud bot commented Jul 7, 2025

@dreamorosi
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L PRs between 100-499 LOC tests PRs that add or change tests tracer This item relates to the Tracer Utility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants