Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: default lazy provider
  • Loading branch information
heitorlessa committed Mar 1, 2021
commit 2095142eaffd329bcc5d9e2a4e06b15250d58f52
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