Skip to content

Commit

Permalink
remove tracking url template
Browse files Browse the repository at this point in the history
  • Loading branch information
darinyu committed Nov 28, 2023
1 parent a8f27ce commit e737057
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 32 deletions.
1 change: 0 additions & 1 deletion metaflow/metaflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@
CONSOLE_TRACE_ENABLED = from_conf("CONSOLE_TRACE_ENABLED", False)
# internal env used for preventing the tracing module from loading during Conda bootstrapping.
DISABLE_TRACING = bool(os.environ.get("DISABLE_TRACING", False))
DEBUG_TRACING = bool(os.environ.get("DEBUG_TRACING", False))

# MAX_ATTEMPTS is the maximum number of attempts, including the first
# task, retries, and the final fallback task and its retries.
Expand Down
9 changes: 1 addition & 8 deletions metaflow/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from . import get_namespace
from .metadata import MetaDatum
from .metaflow_config import MAX_ATTEMPTS, UI_URL, TRACING_URL_TEMPLATE
from .metaflow_config import MAX_ATTEMPTS, UI_URL
from .exception import (
MetaflowException,
MetaflowInternalError,
Expand Down Expand Up @@ -217,13 +217,6 @@ def execute(self):
"Workflow starting (run-id %s):" % self._run_id, system_msg=True
)

tracing_url = tracing.get_tracing_url()
if tracing_url:
self._logger(
"Tracing URL will appear in the following %s. " % tracing_url,
system_msg=True,
)

self._metadata.start_run_heartbeat(self._flow.name, self._run_id)

if self._params_task:
Expand Down
13 changes: 1 addition & 12 deletions metaflow/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from .unbounded_foreach import UBF_CONTROL
from .util import all_equal, get_username, resolve_identity, unicode_type
from .current import current
from metaflow.tracing import get_trace_id, get_tracing_url
from metaflow.tracing import get_trace_id
from collections import namedtuple

ForeachFrame = namedtuple("ForeachFrame", ["step", "var", "num_splits", "index"])
Expand Down Expand Up @@ -434,17 +434,6 @@ def run_step(
tags=metadata_tags,
)
)
# Add tracing url to metadata if available.
tracing_url = get_tracing_url()
if tracing_url:
metadata.append(
MetaDatum(
field="tracing-url",
value=tracing_url,
type="tracing-url",
tags=metadata_tags,
)
)

self.metadata.register_metadata(
run_id,
Expand Down
11 changes: 0 additions & 11 deletions metaflow/tracing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from metaflow.metaflow_config import (
OTEL_ENDPOINT,
ZIPKIN_ENDPOINT,
TRACING_URL_TEMPLATE,
CONSOLE_TRACE_ENABLED,
DISABLE_TRACING,
DEBUG_TRACING,
Expand Down Expand Up @@ -40,16 +39,6 @@ def get_trace_id() -> str:
return ""


def get_tracing_url() -> str:
# Do not return anything if tracing is disabled.
if DISABLE_TRACING:
return ""
# Do not return anything if no trace id is available.
if not (TRACING_URL_TEMPLATE and get_trace_id()):
return ""
return TRACING_URL_TEMPLATE.format(trace_id=get_trace_id())


@contextlib.contextmanager
def traced(name, attrs={}):
yield
Expand Down

0 comments on commit e737057

Please sign in to comment.