Skip to content

Commit

Permalink
fix: default lazy provider
Browse files Browse the repository at this point in the history
  • Loading branch information
heitorlessa committed Mar 1, 2021
1 parent f429a74 commit 2095142
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aws_lambda_powertools/tracing/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@ def _add_full_exception_as_metadata(
def _disable_tracer_provider():
"""Forcefully disables tracing"""
logger.debug("Disabling tracer provider...")
aws_xray_sdk.global_sdk_config.set_sdk_enabled(False)
aws_xray_sdk.global_sdk_config.set_sdk_enabled(False) # noqa: F821

@staticmethod
def _is_tracer_disabled() -> bool:
Expand Down Expand Up @@ -729,7 +729,7 @@ def __build_config(
is_disabled = disabled if disabled is not None else self._is_tracer_disabled()
is_service = service if service is not None else os.getenv(constants.SERVICE_NAME_ENV)

self._config["provider"] = provider if provider is not None else self._config["provider"]
self._config["provider"] = provider or self._config["provider"] or aws_xray_sdk.core.xray_recorder
self._config["auto_patch"] = auto_patch if auto_patch is not None else self._config["auto_patch"]
self._config["service"] = is_service or self._config["service"]
self._config["disabled"] = is_disabled or self._config["disabled"]
Expand Down

0 comments on commit 2095142

Please sign in to comment.