Skip to content

Maintenance: remove createTracer & createLogger helpers #1721

Closed
@dreamorosi

Description

@dreamorosi

Summary

As part of this issue we will remove the two helper functions found in Tracer and Logger. These two helpers allow to create a new instance of their respective Powertools utilities, i.e. createTracer() returns an instance of Tracer.

The existence of these functions was undocumented and never mentioned anywhere outside the tests, however if there are customers who are using these helpers can simply switch to instantiating the utilities directly:

-- const logger = createLogger();
++ const logger = new Logger();

Why is this needed?

We have decided to remove these helpers because over the past two years we haven't seen any usage. Likewise, while the helpers are available only for Logger and Tracer, we haven't seen demand for adding them to other utilities.

Removing these helpers will also decrease the code shipped.

Which area does this relate to?

Tracer, Logger

Solution

No response

Acknowledgment

Future readers

Please react with 👍 and your use case to help us understand customer demand.

Metadata

Metadata

Assignees

Labels

completedThis item is complete and has been merged/shippedinternalPRs that introduce changes in governance, tech debt and chores (linting setup, baseline, etc.)loggerThis item relates to the Logger UtilitytracerThis item relates to the Tracer Utility

Type

No type

Projects

Status

Shipped

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions