You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8063f84
Browse filesBrowse the repository at this point in the historyBrowse files
Remove the deprecated Langfuse.set_current_trace_io() and
span.set_trace_io(), the langfuse.trace.input/output attributes, and
their media handling. On Langfuse v4 a trace's input and output come
from its root observation: set them with update() on the root span or
update_current_span().
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
Copy file name to clipboardExpand all lines: langfuse/_client/client.py
+1-51Lines changed: 1 addition & 51 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,6 @@
38
38
_agnosticcontextmanager,
39
39
)
40
40
frompackaging.versionimportVersion
41
-
fromtyping_extensionsimportdeprecated
42
41
43
42
fromlangfuse._client.attributesimport (
44
43
LangfuseOtelSpanAttributes,
@@ -213,7 +212,7 @@ class Langfuse:
213
212
release (Optional[str]): Release version/hash of your application. Used for grouping analytics by release.
214
213
media_upload_thread_count (Optional[int]): Number of background threads for handling media uploads. Defaults to 1. Can also be set via LANGFUSE_MEDIA_UPLOAD_THREAD_COUNT environment variable.
215
214
sample_rate (Optional[float]): Sampling rate for traces (0.0 to 1.0). Defaults to 1.0 (100% of traces are sampled). Can also be set via LANGFUSE_SAMPLE_RATE environment variable.
216
-
mask (Optional[MaskFunction]): Function to mask sensitive data synchronously when Langfuse SDK attributes are created. This applies only to data set through Langfuse SDK APIs such as `start_observation()`, `update()`, and `set_trace_io()`.
215
+
mask (Optional[MaskFunction]): Function to mask sensitive data synchronously when Langfuse SDK attributes are created. This applies only to data set through Langfuse SDK APIs such as `start_observation()`and `update()`.
217
216
mask_otel_spans (Optional[MaskOtelSpansFunction]): Synchronous export-stage hook for masking raw OpenTelemetry span attributes before this Langfuse client sends them to Langfuse. Use this for spans created by third-party OpenTelemetry instrumentations, or when you need to inspect final span attributes after export filtering and Langfuse media handling. It does not modify spans already exported through other OpenTelemetry exporters.
218
217
219
218
The hook receives one OpenTelemetry export batch. A batch is not guaranteed to contain a complete trace, request, or Langfuse observation tree. The hook usually runs on the OpenTelemetry batch span processor worker thread; during `flush()` and shutdown it may run on the caller thread. Keep it synchronous, deterministic, and fast.
0 commit comments