Docs
Tracing
Trace URL

Trace URLs

Each trace has a unique URL that you can use to share it with others or to access it directly.

Get trace url

Sometimes, it is useful to get the trace URL directly in the SDK. E.g. to add it to your logs or interactively look at it when running experiments in notebooks.

Decorators

from langfuse.decorators import langfuse_context, observe
 
@observe()
def fn():
    langfuse_context.get_current_trace_url()
 
fn()

Low-level SDK

trace = langfuse.trace(...)
trace.get_trace_url()

Share trace via url

By default, only members of your Langfuse project can view a trace.

You can make a trace public to share it via a public link. This allows others to view the trace without needing to log in or be members of your Langfuse project.

Example: https://cloud.langfuse.com/project/clkpwwm0m000gmm094odg11gi/traces/2d6b96f2-0a4d-4366-99a5-1ad558c66e99 (opens in a new tab)

Was this page useful?

Questions? We're here to help

Subscribe to updates