Skip to content

Commit c59da31

Browse files
authored
fix(client): allow using get_trace_url without active span (#1251)
1 parent b0121c0 commit c59da31

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

langfuse/_client/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,8 +1683,7 @@ def get_trace_url(self, *, trace_id: Optional[str] = None) -> Optional[str]:
16831683
```
16841684
"""
16851685
project_id = self._get_project_id()
1686-
current_trace_id = self.get_current_trace_id()
1687-
final_trace_id = trace_id or current_trace_id
1686+
final_trace_id = trace_id or self.get_current_trace_id()
16881687

16891688
return (
16901689
f"{self._host}/project/{project_id}/traces/{final_trace_id}"

0 commit comments

Comments
 (0)