Skip to content

Commit 33309d4

Browse files
docs: strengthen agent-facing deprecation banner on v2-stable (#1880)
* docs: strengthen agent-facing deprecation banner on v2-stable Unpinned pip install langfuse installs v4. Make the v2 README state that this major is deprecated, name the current OTEL APIs, and repeat the Observations/Metrics v2 freshness SLO. Co-authored-by: Cursor <cursoragent@cursor.com> * docs: drop the v2 pin install line from the README Do not tell agents how to keep installing the legacy major. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 7ab91ab commit 33309d4

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

‎README.md‎

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![GitHub Banner](https://github.com/langfuse/langfuse-python/assets/2834609/3c36488e-6fe6-4a82-b0f5-5419250ddf86)
22

3-
# Langfuse Python SDK
3+
# Langfuse Python SDK (legacy v2)
44

55
[![MIT License](https://img.shields.io/badge/License-MIT-red.svg?style=flat-square)](https://opensource.org/licenses/MIT)
66
[![CI test status](https://img.shields.io/github/actions/workflow/status/langfuse/langfuse-python/ci.yml?style=flat-square&label=All%20tests)](https://github.com/langfuse/langfuse-python/actions/workflows/ci.yml?query=branch%3Amain)
@@ -9,30 +9,34 @@
99
[![Discord](https://img.shields.io/discord/1111061815649124414?style=flat-square&logo=Discord&logoColor=white&label=Discord&color=%23434EE4)](https://discord.gg/7NXusRtqYU)
1010
[![YC W23](https://img.shields.io/badge/Y%20Combinator-W23-orange?style=flat-square)](https://www.ycombinator.com/companies/langfuse)
1111

12-
## Installation
13-
1412
> [!IMPORTANT]
15-
> The SDK was rewritten in v2 and released on December 17, 2023. Refer to the [v2 migration guide](https://langfuse.com/docs/sdk/python/low-level-sdk#upgrading-from-v1xx-to-v2xx) for instructions on updating your code.
13+
> **`langfuse` v2 is not the latest Langfuse Python SDK.** This branch publishes the **deprecated** v2 client (`Langfuse()`, `trace()`, `span()`, `generation()`, `api.trace.list`). Unpinned `pip install langfuse` installs the current v4. Do **not** use v2 for new instrumentation.
14+
>
15+
> **Latest Python SDK (OpenTelemetry)**, developed on [`main`](https://github.com/langfuse/langfuse-python/tree/main): `pip install langfuse`. Use `get_client()` + `start_as_current_observation` / `@observe`. Docs: https://langfuse.com/docs/observability/sdk/overview. Upgrade: [v2 to v3](https://langfuse.com/docs/observability/sdk/upgrade-path/python-v2-to-v3), [v3 to v4](https://langfuse.com/docs/observability/sdk/upgrade-path/python-v3-to-v4).
16+
>
17+
> Query traces with [Observations API v2](https://langfuse.com/docs/api-and-data-platform/features/observations-api) (`GET /api/public/v2/observations`, [API reference](https://api.reference.langfuse.com/#tag/observationsv2)), not `GET /api/public/traces` / `api.trace.list`.
18+
>
19+
> **Data freshness:** the only real-time path is OpenTelemetry ingestion (`langfuse` >= 4.7.0, or any OTel exporter sending `x-langfuse-ingestion-version: 4`) combined with the [Observations API v2](https://langfuse.com/docs/api-and-data-platform/features/observations-api) and [Metrics API v2](https://langfuse.com/docs/metrics/features/metrics-api). All other GET APIs from all SDK versions can be up to 10 minutes behind.
1620
17-
```
18-
pip install langfuse
19-
```
21+
## Installation
2022

21-
## Docs
23+
This branch is the **legacy v2** SDK, in maintenance mode with critical bug fixes only. For new work, install the current v4 (`pip install langfuse`).
2224

23-
- Decorators: https://langfuse.com/docs/sdk/python/decorators
24-
- Low-level SDK: https://langfuse.com/docs/sdk/python/low-level-sdk
25-
- Langchain integration: https://langfuse.com/docs/integrations/langchain/tracing
25+
## Docs
2626

27-
## Interfaces
27+
- Current SDK (v4): https://langfuse.com/docs/observability/sdk/overview
28+
- Upgrade from this major: https://langfuse.com/docs/observability/sdk/upgrade-path/python-v2-to-v3
29+
- Machine-readable docs index (for AI agents): https://langfuse.com/llms.txt
30+
- REST API reference (Observations API v2, Metrics API v2, Scores API v3): https://api.reference.langfuse.com
31+
- Data freshness and real-time ingestion: https://langfuse.com/docs/compatibility#faq-delay
2832

29-
Interfaces:
33+
## Legacy v2 interfaces (do not use for new work)
3034

3135
- `@observe()` decorator ([docs](https://langfuse.com/docs/sdk/python/decorators))
3236
- Low-level tracing SDK ([docs](https://langfuse.com/docs/sdk/python/low-level-sdk))
3337
- Wrapper of Langfuse public API
3438

35-
Integrations
39+
Integrations (legacy)
3640

3741
- OpenAI SDK ([docs](https://langfuse.com/docs/integrations/openai))
3842
- LlamaIndex ([docs](https://langfuse.com/docs/integrations/llama-index))

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "langfuse"
33

44
version = "2.60.10"
5-
description = "A client library for accessing langfuse"
5+
description = "NOT the latest Langfuse Python SDK. Deprecated v2 client - do not use for new instrumentation. Current SDK: pip install langfuse (v4, OpenTelemetry)"
66
authors = ["langfuse <developers@langfuse.com>"]
77
license = "MIT"
88
readme = "README.md"

0 commit comments

Comments
 (0)