diff --git a/metaflow/metaflow_config.py b/metaflow/metaflow_config.py index a0f04e08500..d857fbb0d88 100644 --- a/metaflow/metaflow_config.py +++ b/metaflow/metaflow_config.py @@ -403,9 +403,7 @@ ZIPKIN_ENDPOINT = from_conf("ZIPKIN_ENDPOINT") CONSOLE_TRACE_ENABLED = from_conf("CONSOLE_TRACE_ENABLED", False) # internal env used for preventing the tracing module from loading during Conda bootstrapping. -BOOTSTRAPPING_CONDA_ENVIRONMENT = bool( - os.environ.get("BOOTSTRAPPING_CONDA_ENVIRONMENT", False) -) +DISABLE_TRACING = bool(os.environ.get("DISABLE_TRACING", False)) # MAX_ATTEMPTS is the maximum number of attempts, including the first # task, retries, and the final fallback task and its retries. diff --git a/metaflow/plugins/pypi/conda_environment.py b/metaflow/plugins/pypi/conda_environment.py index 6d21d5c9c24..9e0de9f0bee 100644 --- a/metaflow/plugins/pypi/conda_environment.py +++ b/metaflow/plugins/pypi/conda_environment.py @@ -324,7 +324,7 @@ def bootstrap_commands(self, step_name, datastore_type): # as the bootstrapping process uses the internal S3 client which would fail to import tracing # due to the required dependencies being bundled into the conda environment, # which is yet to be initialized at this point. - 'BOOTSTRAPPING_CONDA_ENVIRONMENT=True python -m metaflow.plugins.pypi.bootstrap "%s" %s "%s" linux-64' + 'DISABLE_TRACING=True python -m metaflow.plugins.pypi.bootstrap "%s" %s "%s" linux-64' % (self.flow.name, id_, self.datastore_type), "echo 'Environment bootstrapped.'", "export PATH=$PATH:$(pwd)/micromamba", diff --git a/metaflow/tracing/__init__.py b/metaflow/tracing/__init__.py index 5472c71258c..24603b8082e 100644 --- a/metaflow/tracing/__init__.py +++ b/metaflow/tracing/__init__.py @@ -2,7 +2,7 @@ OTEL_ENDPOINT, ZIPKIN_ENDPOINT, CONSOLE_TRACE_ENABLED, - BOOTSTRAPPING_CONDA_ENVIRONMENT, + DISABLE_TRACING, ) from functools import wraps import contextlib @@ -50,9 +50,7 @@ def wrapper_func(*args, **kwargs): return wrapper_func -if not BOOTSTRAPPING_CONDA_ENVIRONMENT and ( - CONSOLE_TRACE_ENABLED or OTEL_ENDPOINT or ZIPKIN_ENDPOINT -): +if not DISABLE_TRACING and (CONSOLE_TRACE_ENABLED or OTEL_ENDPOINT or ZIPKIN_ENDPOINT): try: # Overrides No-Op implementations if a specific provider is configured. from .tracing_modules import (