Home / Function/ get_run_url() — langchain Function Reference

get_run_url() — langchain Function Reference

Architecture documentation for the get_run_url() function in langchain.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9dc932be_4116_cf2f_1376_f6fb09fcdc9a["get_run_url()"]
  178590bb_85ff_b79e_979a_46e5c3c5389f["LangChainTracer"]
  9dc932be_4116_cf2f_1376_f6fb09fcdc9a -->|defined in| 178590bb_85ff_b79e_979a_46e5c3c5389f
  style 9dc932be_4116_cf2f_1376_f6fb09fcdc9a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tracers/langchain.py lines 208–234

    def get_run_url(self) -> str:
        """Get the LangSmith root run URL.

        Returns:
            The LangSmith root run URL.

        Raises:
            ValueError: If no traced run is found.
            ValueError: If the run URL cannot be found.
        """
        if not self.latest_run:
            msg = "No traced run found."
            raise ValueError(msg)
        # If this is the first run in a project, the project may not yet be created.
        # This method is only really useful for debugging flows, so we will assume
        # there is some tolerace for latency.
        for attempt in Retrying(
            stop=stop_after_attempt(5),
            wait=wait_exponential_jitter(),
            retry=retry_if_exception_type(ls_utils.LangSmithError),
        ):
            with attempt:
                return self.client.get_run_url(
                    run=self.latest_run, project_name=self.project_name
                )
        msg = "Failed to get run URL."
        raise ValueError(msg)

Domain

Subdomains

Frequently Asked Questions

What does get_run_url() do?
get_run_url() is a function in the langchain codebase, defined in libs/core/langchain_core/tracers/langchain.py.
Where is get_run_url() defined?
get_run_url() is defined in libs/core/langchain_core/tracers/langchain.py at line 208.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free