Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions langfuse/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,6 @@
IngestionEvent_ObservationCreate,
IngestionEvent_ObservationUpdate,
IngestionEvent_ScoreCreate,
IngestionEvent_SdkLog,
IngestionEvent_SpanCreate,
IngestionEvent_SpanUpdate,
IngestionEvent_TraceCreate,
Expand All @@ -320,8 +319,6 @@
OptionalObservationBody,
ScoreBody,
ScoreEvent,
SdkLogBody,
SdkLogEvent,
TraceBody,
TraceEvent,
UpdateEventBody,
Expand Down Expand Up @@ -427,9 +424,15 @@
UpdateScoreConfigRequest,
)
from .scores import (
CreateScoreBatchError,
CreateScoreBatchRequest,
CreateScoreBatchResponse,
CreateScoreBatchResults,
CreateScoreRequest,
CreateScoreResponse,
CreateScoreSource,
CreateScoresRequest,
CreateScoresResponse,
GetScoresResponse,
GetScoresResponseData,
GetScoresResponseDataBoolean,
Expand Down Expand Up @@ -549,11 +552,17 @@
"CreateModelRequest": ".models",
"CreateObservationEvent": ".ingestion",
"CreatePromptRequest": ".prompts",
"CreateScoreBatchError": ".scores",
"CreateScoreBatchRequest": ".scores",
"CreateScoreBatchResponse": ".scores",
"CreateScoreBatchResults": ".scores",
"CreateScoreConfigRequest": ".score_configs",
"CreateScoreRequest": ".scores",
"CreateScoreResponse": ".scores",
"CreateScoreSource": ".scores",
"CreateScoreValue": ".commons",
"CreateScoresRequest": ".scores",
"CreateScoresResponse": ".scores",
"CreateSpanBody": ".ingestion",
"CreateSpanEvent": ".ingestion",
"CreateTextPromptRequest": ".prompts",
Expand Down Expand Up @@ -671,7 +680,6 @@
"IngestionEvent_ObservationCreate": ".ingestion",
"IngestionEvent_ObservationUpdate": ".ingestion",
"IngestionEvent_ScoreCreate": ".ingestion",
"IngestionEvent_SdkLog": ".ingestion",
"IngestionEvent_SpanCreate": ".ingestion",
"IngestionEvent_SpanUpdate": ".ingestion",
"IngestionEvent_TraceCreate": ".ingestion",
Expand Down Expand Up @@ -822,8 +830,6 @@
"Score_Correction": ".commons",
"Score_Numeric": ".commons",
"Score_Text": ".commons",
"SdkLogBody": ".ingestion",
"SdkLogEvent": ".ingestion",
"ServiceProviderConfig": ".scim",
"ServiceUnavailableError": ".health",
"Session": ".commons",
Expand Down Expand Up @@ -1005,11 +1011,17 @@ def __dir__():
"CreateModelRequest",
"CreateObservationEvent",
"CreatePromptRequest",
"CreateScoreBatchError",
"CreateScoreBatchRequest",
"CreateScoreBatchResponse",
"CreateScoreBatchResults",
"CreateScoreConfigRequest",
"CreateScoreRequest",
"CreateScoreResponse",
"CreateScoreSource",
"CreateScoreValue",
"CreateScoresRequest",
"CreateScoresResponse",
"CreateSpanBody",
"CreateSpanEvent",
"CreateTextPromptRequest",
Expand Down Expand Up @@ -1127,7 +1139,6 @@ def __dir__():
"IngestionEvent_ObservationCreate",
"IngestionEvent_ObservationUpdate",
"IngestionEvent_ScoreCreate",
"IngestionEvent_SdkLog",
"IngestionEvent_SpanCreate",
"IngestionEvent_SpanUpdate",
"IngestionEvent_TraceCreate",
Expand Down Expand Up @@ -1278,8 +1289,6 @@ def __dir__():
"Score_Correction",
"Score_Numeric",
"Score_Text",
"SdkLogBody",
"SdkLogEvent",
"ServiceProviderConfig",
"ServiceUnavailableError",
"Session",
Expand Down
9 changes: 0 additions & 9 deletions langfuse/api/ingestion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
IngestionEvent_ObservationCreate,
IngestionEvent_ObservationUpdate,
IngestionEvent_ScoreCreate,
IngestionEvent_SdkLog,
IngestionEvent_SpanCreate,
IngestionEvent_SpanUpdate,
IngestionEvent_TraceCreate,
Expand All @@ -38,8 +37,6 @@
OptionalObservationBody,
ScoreBody,
ScoreEvent,
SdkLogBody,
SdkLogEvent,
TraceBody,
TraceEvent,
UpdateEventBody,
Expand Down Expand Up @@ -67,7 +64,6 @@
"IngestionEvent_ObservationCreate": ".types",
"IngestionEvent_ObservationUpdate": ".types",
"IngestionEvent_ScoreCreate": ".types",
"IngestionEvent_SdkLog": ".types",
"IngestionEvent_SpanCreate": ".types",
"IngestionEvent_SpanUpdate": ".types",
"IngestionEvent_TraceCreate": ".types",
Expand All @@ -82,8 +78,6 @@
"OptionalObservationBody": ".types",
"ScoreBody": ".types",
"ScoreEvent": ".types",
"SdkLogBody": ".types",
"SdkLogEvent": ".types",
"TraceBody": ".types",
"TraceEvent": ".types",
"UpdateEventBody": ".types",
Expand Down Expand Up @@ -140,7 +134,6 @@ def __dir__():
"IngestionEvent_ObservationCreate",
"IngestionEvent_ObservationUpdate",
"IngestionEvent_ScoreCreate",
"IngestionEvent_SdkLog",
"IngestionEvent_SpanCreate",
"IngestionEvent_SpanUpdate",
"IngestionEvent_TraceCreate",
Expand All @@ -155,8 +148,6 @@ def __dir__():
"OptionalObservationBody",
"ScoreBody",
"ScoreEvent",
"SdkLogBody",
"SdkLogEvent",
"TraceBody",
"TraceEvent",
"UpdateEventBody",
Expand Down
28 changes: 22 additions & 6 deletions langfuse/api/ingestion/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def with_raw_response(self) -> RawIngestionClient:
return self._raw_client

@typing_extensions.deprecated(
"On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.",
"On Langfuse Cloud, this is the deprecated Langfuse v3 ingestion API and it is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types. To write scores, prefer `POST /api/public/scores`; see the [Scores API docs](https://langfuse.com/docs/api-and-data-platform/features/scores-api). To write traces and observations, always prefer upgrading to the current Python and JS SDKs; if you use custom auto-instrumentation, send them to the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` (for example with curl); see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). To read data back, use the v4 read APIs; see the [Observations API docs](https://langfuse.com/docs/api-and-data-platform/features/observations-api) and the [Metrics API docs](https://langfuse.com/docs/metrics/features/metrics-api). The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`; all other public APIs may have data delays of several minutes. Self-hosted deployments are unaffected by the November 16 date; this behavior begins only when they enable v4-only write mode.",
category=None,
)
def batch(
Expand All @@ -42,7 +42,15 @@ def batch(
"""
**Legacy endpoint for batch ingestion for Langfuse Observability.**

-> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry
This is the deprecated Langfuse v3 ingestion API. It is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types.

To write scores, prefer `POST /api/public/scores`: https://langfuse.com/docs/api-and-data-platform/features/scores-api

To write traces and observations, always prefer upgrading to the current Python and JS SDKs. If you use custom auto-instrumentation, send them to the OpenTelemetry endpoint (`POST /api/public/otel/v1/traces`), for example with curl: https://langfuse.com/integrations/native/opentelemetry

To read data back, use the v4 read APIs: https://langfuse.com/docs/api-and-data-platform/features/observations-api and https://langfuse.com/docs/metrics/features/metrics-api

The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`. All other public APIs may have data delays of several minutes.

Within each batch, there can be multiple events.
Each event has a type, an id, a timestamp, metadata and a body.
Expand All @@ -59,7 +67,7 @@ def batch(
Parameters
----------
batch : typing.Sequence[IngestionEvent]
Batch of tracing events to be ingested. Discriminated by attribute `type`.
Batch of events to be ingested, discriminated by attribute `type`. From November 16, 2026 on Langfuse Cloud, only `score-create` events are accepted; all other event types are rejected.

metadata : typing.Optional[typing.Any]
Optional. Metadata field used by the Langfuse SDKs for debugging.
Expand Down Expand Up @@ -134,7 +142,7 @@ def with_raw_response(self) -> AsyncRawIngestionClient:
return self._raw_client

@typing_extensions.deprecated(
"On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.",
"On Langfuse Cloud, this is the deprecated Langfuse v3 ingestion API and it is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types. To write scores, prefer `POST /api/public/scores`; see the [Scores API docs](https://langfuse.com/docs/api-and-data-platform/features/scores-api). To write traces and observations, always prefer upgrading to the current Python and JS SDKs; if you use custom auto-instrumentation, send them to the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` (for example with curl); see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). To read data back, use the v4 read APIs; see the [Observations API docs](https://langfuse.com/docs/api-and-data-platform/features/observations-api) and the [Metrics API docs](https://langfuse.com/docs/metrics/features/metrics-api). The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`; all other public APIs may have data delays of several minutes. Self-hosted deployments are unaffected by the November 16 date; this behavior begins only when they enable v4-only write mode.",
category=None,
)
async def batch(
Expand All @@ -147,7 +155,15 @@ async def batch(
"""
**Legacy endpoint for batch ingestion for Langfuse Observability.**

-> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry
This is the deprecated Langfuse v3 ingestion API. It is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types.

To write scores, prefer `POST /api/public/scores`: https://langfuse.com/docs/api-and-data-platform/features/scores-api

To write traces and observations, always prefer upgrading to the current Python and JS SDKs. If you use custom auto-instrumentation, send them to the OpenTelemetry endpoint (`POST /api/public/otel/v1/traces`), for example with curl: https://langfuse.com/integrations/native/opentelemetry

To read data back, use the v4 read APIs: https://langfuse.com/docs/api-and-data-platform/features/observations-api and https://langfuse.com/docs/metrics/features/metrics-api

The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`. All other public APIs may have data delays of several minutes.

Within each batch, there can be multiple events.
Each event has a type, an id, a timestamp, metadata and a body.
Expand All @@ -164,7 +180,7 @@ async def batch(
Parameters
----------
batch : typing.Sequence[IngestionEvent]
Batch of tracing events to be ingested. Discriminated by attribute `type`.
Batch of events to be ingested, discriminated by attribute `type`. From November 16, 2026 on Langfuse Cloud, only `score-create` events are accepted; all other event types are rejected.

metadata : typing.Optional[typing.Any]
Optional. Metadata field used by the Langfuse SDKs for debugging.
Expand Down
28 changes: 22 additions & 6 deletions langfuse/api/ingestion/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper

@typing_extensions.deprecated(
"On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.",
"On Langfuse Cloud, this is the deprecated Langfuse v3 ingestion API and it is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types. To write scores, prefer `POST /api/public/scores`; see the [Scores API docs](https://langfuse.com/docs/api-and-data-platform/features/scores-api). To write traces and observations, always prefer upgrading to the current Python and JS SDKs; if you use custom auto-instrumentation, send them to the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` (for example with curl); see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). To read data back, use the v4 read APIs; see the [Observations API docs](https://langfuse.com/docs/api-and-data-platform/features/observations-api) and the [Metrics API docs](https://langfuse.com/docs/metrics/features/metrics-api). The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`; all other public APIs may have data delays of several minutes. Self-hosted deployments are unaffected by the November 16 date; this behavior begins only when they enable v4-only write mode.",
category=None,
)
def batch(
Expand All @@ -40,7 +40,15 @@ def batch(
"""
**Legacy endpoint for batch ingestion for Langfuse Observability.**

-> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry
This is the deprecated Langfuse v3 ingestion API. It is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types.

To write scores, prefer `POST /api/public/scores`: https://langfuse.com/docs/api-and-data-platform/features/scores-api

To write traces and observations, always prefer upgrading to the current Python and JS SDKs. If you use custom auto-instrumentation, send them to the OpenTelemetry endpoint (`POST /api/public/otel/v1/traces`), for example with curl: https://langfuse.com/integrations/native/opentelemetry

To read data back, use the v4 read APIs: https://langfuse.com/docs/api-and-data-platform/features/observations-api and https://langfuse.com/docs/metrics/features/metrics-api

The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`. All other public APIs may have data delays of several minutes.

Within each batch, there can be multiple events.
Each event has a type, an id, a timestamp, metadata and a body.
Expand All @@ -57,7 +65,7 @@ def batch(
Parameters
----------
batch : typing.Sequence[IngestionEvent]
Batch of tracing events to be ingested. Discriminated by attribute `type`.
Batch of events to be ingested, discriminated by attribute `type`. From November 16, 2026 on Langfuse Cloud, only `score-create` events are accepted; all other event types are rejected.

metadata : typing.Optional[typing.Any]
Optional. Metadata field used by the Langfuse SDKs for debugging.
Expand Down Expand Up @@ -167,7 +175,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper

@typing_extensions.deprecated(
"On Langfuse Cloud, Langfuse v3 is deprecated and this endpoint will be removed on November 16, 2026. Send data via the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` instead, see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). Self-hosted deployments are unaffected by this date; the endpoint becomes unavailable when they upgrade to Langfuse v4.",
"On Langfuse Cloud, this is the deprecated Langfuse v3 ingestion API and it is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types. To write scores, prefer `POST /api/public/scores`; see the [Scores API docs](https://langfuse.com/docs/api-and-data-platform/features/scores-api). To write traces and observations, always prefer upgrading to the current Python and JS SDKs; if you use custom auto-instrumentation, send them to the OpenTelemetry endpoint at `POST /api/public/otel/v1/traces` (for example with curl); see the [OpenTelemetry integration docs](https://langfuse.com/integrations/native/opentelemetry). To read data back, use the v4 read APIs; see the [Observations API docs](https://langfuse.com/docs/api-and-data-platform/features/observations-api) and the [Metrics API docs](https://langfuse.com/docs/metrics/features/metrics-api). The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`; all other public APIs may have data delays of several minutes. Self-hosted deployments are unaffected by the November 16 date; this behavior begins only when they enable v4-only write mode.",
category=None,
)
async def batch(
Expand All @@ -180,7 +188,15 @@ async def batch(
"""
**Legacy endpoint for batch ingestion for Langfuse Observability.**

-> Please use the OpenTelemetry endpoint (`/api/public/otel/v1/traces`). Learn more: https://langfuse.com/integrations/native/opentelemetry
This is the deprecated Langfuse v3 ingestion API. It is shut down on November 16, 2026, except for score events: from that date it accepts only `score-create` events and rejects all other event types.

To write scores, prefer `POST /api/public/scores`: https://langfuse.com/docs/api-and-data-platform/features/scores-api

To write traces and observations, always prefer upgrading to the current Python and JS SDKs. If you use custom auto-instrumentation, send them to the OpenTelemetry endpoint (`POST /api/public/otel/v1/traces`), for example with curl: https://langfuse.com/integrations/native/opentelemetry

To read data back, use the v4 read APIs: https://langfuse.com/docs/api-and-data-platform/features/observations-api and https://langfuse.com/docs/metrics/features/metrics-api

The only path to live data is OpenTelemetry ingestion combined with `GET /api/public/v2/observations` and `GET /api/public/v2/metrics`. All other public APIs may have data delays of several minutes.

Within each batch, there can be multiple events.
Each event has a type, an id, a timestamp, metadata and a body.
Expand All @@ -197,7 +213,7 @@ async def batch(
Parameters
----------
batch : typing.Sequence[IngestionEvent]
Batch of tracing events to be ingested. Discriminated by attribute `type`.
Batch of events to be ingested, discriminated by attribute `type`. From November 16, 2026 on Langfuse Cloud, only `score-create` events are accepted; all other event types are rejected.

metadata : typing.Optional[typing.Any]
Optional. Metadata field used by the Langfuse SDKs for debugging.
Expand Down
Loading
Loading