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
release (Optional[str]): Release version/hash of your application. Used for grouping analytics by release.
170
176
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.
171
177
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.
172
-
mask (Optional[MaskFunction]): Function to mask sensitive data in traces before sending to the API.
178
+
mask (Optional[MaskFunction]): Function to mask sensitive data synchronously when Langfuse SDK attributes are created. This applies only to attributes set through Langfuse SDK APIs.
179
+
mask_otel_spans (Optional[MaskOtelSpansFunction]): Synchronous export-stage hook that receives a batch of OpenTelemetry span snapshots and can return sparse attribute patches before spans are sent to Langfuse. This runs after export filtering and affects only spans exported by this Langfuse client, not spans already sent to other observability backends. It usually runs on the OpenTelemetry batch span processor worker thread; during flush and shutdown, it may run on the caller thread. The batch contents are governed by the OpenTelemetry export batch settings and are not guaranteed to contain a complete trace or request. If the hook raises or returns an invalid batch result, the whole export batch is dropped.
173
180
blocked_instrumentation_scopes (Optional[List[str]]): Deprecated. Use `should_export_span` instead. Equivalent behavior:
174
181
```python
175
182
from langfuse.span_filter import is_default_export_span
0 commit comments