Description
Summary
Currently both Logger and Tracer offer helper functions that can be used to create an instance of the utility. For example, instead of creating a Tracer instance directly with new Tracer()
, customers can import an helper function called createTracer
that does the same.
The function has likely not seen much usage since we have never received any report/feedback/issue about it, and given that it forwards the props to the class constructor and returns an instance as-is, it can be considered as redundant.
For this reasons we plan on removing the function in the next major release. To do so, we should mark it as deprecated.
Why is this needed?
So that customers can be informed beforehand of our intention to deprecate the helper.
Which area does this relate to?
Tracer
Solution
Add a @deprecated
note on the function, which will show the function as deprecated in the IDE without breaking any code.
Acknowledgment
- This request meets Powertools for AWS Lambda (TypeScript) Tenets
- Should this be considered in other Powertools for AWS Lambda languages? i.e. Python, Java, and .NET
Future readers
Please react with 👍 and your use case to help us understand customer demand.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status