Skip to content

Commit e3b4e5a

Browse files
committed
chore: remove barrel import to avoid Tracer-like situations
1 parent 97965da commit e3b4e5a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
from aws_lambda_powertools.logging.formatters.datadog import DatadogLogFormatter
1+
"""Built-in Logger formatters for Observability Providers that require custom config."""
22

3-
__all__ = ["DatadogLogFormatter"]
3+
# NOTE: we don't expose formatters directly (barrel import)
4+
# as we cannot know if they'll need additional dependencies in the future
5+
# so we isolate to avoid a performance hit and workarounds like lazy imports
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from aws_lambda_powertools import Logger
2-
from aws_lambda_powertools.logging.formatters import DatadogLogFormatter
2+
from aws_lambda_powertools.logging.formatters.datadog import DatadogLogFormatter
33

44
logger = Logger(service="payment", logger_formatter=DatadogLogFormatter())
55
logger.info("hello")

0 commit comments

Comments
 (0)