MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / log_trace_url

Function log_trace_url

agentops/helpers/dashboard.py:36–54  ·  view source on GitHub ↗

Log the trace URL for the AgentOps dashboard. Args: span: The span to log the URL for. title: Optional title for the trace.

(span: Union[Span, ReadableSpan], title: Optional[str] = None)

Source from the content-addressed store, hash-verified

34
35
36def log_trace_url(span: Union[Span, ReadableSpan], title: Optional[str] = None) -> None:
37 """
38 Log the trace URL for the AgentOps dashboard.
39
40 Args:
41 span: The span to log the URL for.
42 title: Optional title for the trace.
43 """
44 from agentops import get_client
45
46 try:
47 client = get_client()
48 if not client.config.log_session_replay_url:
49 return
50 except Exception:
51 return
52
53 session_url = get_trace_url(span)
54 logger.info(colored(f"\x1b[34mSession Replay for {title} trace: {session_url}\x1b[0m", "blue"))

Callers 3

start_traceMethod · 0.90
_end_single_traceMethod · 0.90
test_log_trace_urlMethod · 0.90

Calls 2

get_clientFunction · 0.90
get_trace_urlFunction · 0.85

Tested by 1

test_log_trace_urlMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…