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 049a6da
Browse filesBrowse the repository at this point in the historyBrowse files
* chore!: require Python 3.11 or newer
Python 3.10 reaches end of life in October 2026. Raise requires-python
to >=3.11, target py311 in ruff, drop 3.10 from the CI unit matrix, and
remove the pre-3.11 fallbacks for asyncio.create_task(context=...) and
typing.NotRequired.
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* feat(openai)!: drop support for OpenAI SDK versions below 1.0
The OpenAI integration now always uses the v1 client shapes. Remove the
pre-1.0 method definitions and every _is_openai_v1() branch, and raise
the dev dependency floor to openai>=1.0.0.
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* feat(otel)!: send x-langfuse-ingestion-version: 4 by default
The default OTLP exporter now sends x-langfuse-ingestion-version: 4 so
servers in dual-write or preview mode process exported spans directly.
It is a no-op on events_only deployments, and additional_headers can
still override it.
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* feat(client)!: remove blocked_instrumentation_scopes
blocked_instrumentation_scopes was deprecated in favor of
should_export_span. Remove it from Langfuse, the resource manager and
the span processor, and drop the leftover is_active entry from the
create_prompt docstring. LANGFUSE_HOST and host keep working, but now
log a deprecation warning when they decide the base URL.
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* fix(observe): keep detecting legacy-marked coroutine functions
inspect.iscoroutinefunction ignores asyncio's _is_coroutine marker,
which asgiref's markcoroutinefunction sets on Python < 3.12. Accept
both so such functions keep the async wrapper and their observation
ends after the coroutine runs.
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* test(otel): pin that a mixed-case ingestion-version override wins
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* feat(client): keep host and LANGFUSE_HOST working without a warning
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
* chore: re-run CI
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Hassieb Pakzad <hassiebp@users.noreply.github.com>
blocked_instrumentation_scopes (Optional[List[str]]): Deprecated. Use `should_export_span` instead. Equivalent behavior:
255
-
```python
256
-
from langfuse.span_filter import is_default_export_span
257
-
blocked = {"sqlite", "requests"}
258
-
259
-
should_export_span = lambda span: (
260
-
is_default_export_span(span)
261
-
and (
262
-
span.instrumentation_scope is None
263
-
or span.instrumentation_scope.name not in blocked
264
-
)
265
-
)
266
-
```
267
253
should_export_span (Optional[Callable[[ReadableSpan], bool]]): Callback to decide whether to export a span. If omitted, Langfuse uses the default filter (Langfuse SDK spans, spans with `gen_ai.*` attributes, and known LLM instrumentation scopes).
268
254
additional_headers (Optional[Dict[str, str]]): Additional headers to include in all API requests and in the default OTLPSpanExporter requests. These headers will be merged with default headers. Note: If httpx_client is provided, additional_headers must be set directly on your custom httpx_client as well. If `span_exporter` is provided, these headers are not wired into that exporter and must be configured on the exporter instance directly.
269
255
tracer_provider(Optional[TracerProvider]): OpenTelemetry TracerProvider to use for Langfuse. This can be useful to set to have disconnected tracing between Langfuse and other OpenTelemetry-span emitting libraries. Note: To track active spans, the context is still shared between TracerProviders. This may lead to broken trace trees.
is_active [DEPRECATED] : A flag indicating whether the prompt is active or not. This is deprecated and will be removed in a future release. Please use the 'production' label instead.
4141
4112
labels: The labels of the prompt. Defaults to None. To create a default-served prompt, add the 'production' label.
4142
4113
tags: The tags of the prompt. Defaults to None. Will be applied to all versions of the prompt.
4143
4114
config: Additional structured data to be saved with the prompt. Defaults to None.
0 commit comments