Skip to content

Commit 818cea6

Browse files
committed
push
1 parent 0d00545 commit 818cea6

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

langfuse/_client/client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ def set_current_trace_io(
13811381
output=output,
13821382
)
13831383

1384-
def publish_current_trace(self) -> None:
1384+
def set_current_trace_as_public(self) -> None:
13851385
"""Make the current trace publicly accessible via its URL.
13861386
13871387
When a trace is published, anyone with the trace link can view the full trace
@@ -1394,7 +1394,7 @@ def publish_current_trace(self) -> None:
13941394
"""
13951395
if not self._tracing_enabled:
13961396
langfuse_logger.debug(
1397-
"Operation skipped: publish_current_trace - Tracing is disabled or client is in no-op mode."
1397+
"Operation skipped: set_current_trace_as_public - Tracing is disabled or client is in no-op mode."
13981398
)
13991399
return
14001400

@@ -1412,7 +1412,7 @@ def publish_current_trace(self) -> None:
14121412
environment=self._environment,
14131413
)
14141414

1415-
span.publish_trace()
1415+
span.set_trace_as_public()
14161416

14171417
def create_event(
14181418
self,

langfuse/_client/span.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ def set_trace_io(
256256

257257
return self
258258

259-
def publish_trace(self) -> "LangfuseObservationWrapper":
259+
def set_trace_as_public(self) -> "LangfuseObservationWrapper":
260260
"""Make this trace publicly accessible via its URL.
261261
262262
When a trace is published, anyone with the trace link can view the full trace

tests/test_core_sdk.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def test_create_trace():
349349
metadata={"key": "value"},
350350
tags=["tag1", "tag2"],
351351
):
352-
span.publish_trace()
352+
span.set_trace_as_public()
353353
# Get trace ID for later verification
354354
trace_id = langfuse.get_current_trace_id()
355355

@@ -381,7 +381,7 @@ def test_create_update_trace():
381381
user_id="test",
382382
metadata={"key": "value"},
383383
):
384-
span.publish_trace()
384+
span.set_trace_as_public()
385385
# Get trace ID for later reference
386386
trace_id = span.trace_id
387387

@@ -390,7 +390,7 @@ def test_create_update_trace():
390390

391391
# Update trace properties with additional metadata
392392
with propagate_attributes(metadata={"key2": "value2"}):
393-
pass # Metadata update only, publish_trace is one-way
393+
pass # Metadata update only, set_trace_as_public is one-way
394394

395395
# Ensure data is sent to the API
396396
langfuse.flush()
@@ -420,7 +420,7 @@ def test_create_update_current_trace():
420420
metadata={"key": "value"},
421421
):
422422
langfuse.set_current_trace_io(input="test_input")
423-
langfuse.publish_current_trace()
423+
langfuse.set_current_trace_as_public()
424424
# Get trace ID for later reference
425425
trace_id = span.trace_id
426426

@@ -1876,7 +1876,7 @@ def test_create_trace_sampling_zero():
18761876
metadata={"key": "value"},
18771877
tags=["tag1", "tag2"],
18781878
):
1879-
span.publish_trace()
1879+
span.set_trace_as_public()
18801880
# Get trace ID for verification
18811881
trace_id = span.trace_id
18821882

0 commit comments

Comments
 (0)