diff --git a/langfuse/api/__init__.py b/langfuse/api/__init__.py index ec4d25b20..016ba5c78 100644 --- a/langfuse/api/__init__.py +++ b/langfuse/api/__init__.py @@ -304,7 +304,6 @@ IngestionEvent_ObservationCreate, IngestionEvent_ObservationUpdate, IngestionEvent_ScoreCreate, - IngestionEvent_SdkLog, IngestionEvent_SpanCreate, IngestionEvent_SpanUpdate, IngestionEvent_TraceCreate, @@ -319,8 +318,6 @@ OptionalObservationBody, ScoreBody, ScoreEvent, - SdkLogBody, - SdkLogEvent, TraceBody, TraceEvent, UpdateEventBody, @@ -669,7 +666,6 @@ "IngestionEvent_ObservationCreate": ".ingestion", "IngestionEvent_ObservationUpdate": ".ingestion", "IngestionEvent_ScoreCreate": ".ingestion", - "IngestionEvent_SdkLog": ".ingestion", "IngestionEvent_SpanCreate": ".ingestion", "IngestionEvent_SpanUpdate": ".ingestion", "IngestionEvent_TraceCreate": ".ingestion", @@ -820,8 +816,6 @@ "Score_Correction": ".commons", "Score_Numeric": ".commons", "Score_Text": ".commons", - "SdkLogBody": ".ingestion", - "SdkLogEvent": ".ingestion", "ServiceProviderConfig": ".scim", "ServiceUnavailableError": ".health", "Session": ".commons", @@ -1124,7 +1118,6 @@ def __dir__(): "IngestionEvent_ObservationCreate", "IngestionEvent_ObservationUpdate", "IngestionEvent_ScoreCreate", - "IngestionEvent_SdkLog", "IngestionEvent_SpanCreate", "IngestionEvent_SpanUpdate", "IngestionEvent_TraceCreate", @@ -1275,8 +1268,6 @@ def __dir__(): "Score_Correction", "Score_Numeric", "Score_Text", - "SdkLogBody", - "SdkLogEvent", "ServiceProviderConfig", "ServiceUnavailableError", "Session", diff --git a/langfuse/api/comments/client.py b/langfuse/api/comments/client.py index 138c58b8f..f1f8036a3 100644 --- a/langfuse/api/comments/client.py +++ b/langfuse/api/comments/client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing from ..commons.types.comment import Comment @@ -36,6 +37,7 @@ def create( object_id: str, content: str, author_user_id: typing.Optional[str] = OMIT, + object_start_time: typing.Optional[dt.datetime] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateCommentResponse: """ @@ -58,6 +60,9 @@ def create( author_user_id : typing.Optional[str] The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. + object_start_time : typing.Optional[dt.datetime] + The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -90,6 +95,7 @@ def create( object_id=object_id, content=content, author_user_id=author_user_id, + object_start_time=object_start_time, request_options=request_options, ) return _response.data @@ -221,6 +227,7 @@ async def create( object_id: str, content: str, author_user_id: typing.Optional[str] = OMIT, + object_start_time: typing.Optional[dt.datetime] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> CreateCommentResponse: """ @@ -243,6 +250,9 @@ async def create( author_user_id : typing.Optional[str] The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. + object_start_time : typing.Optional[dt.datetime] + The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -283,6 +293,7 @@ async def main() -> None: object_id=object_id, content=content, author_user_id=author_user_id, + object_start_time=object_start_time, request_options=request_options, ) return _response.data diff --git a/langfuse/api/comments/raw_client.py b/langfuse/api/comments/raw_client.py index 811a7335c..276337be4 100644 --- a/langfuse/api/comments/raw_client.py +++ b/langfuse/api/comments/raw_client.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing from json.decoder import JSONDecodeError @@ -34,6 +35,7 @@ def create( object_id: str, content: str, author_user_id: typing.Optional[str] = OMIT, + object_start_time: typing.Optional[dt.datetime] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[CreateCommentResponse]: """ @@ -56,6 +58,9 @@ def create( author_user_id : typing.Optional[str] The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. + object_start_time : typing.Optional[dt.datetime] + The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -72,6 +77,7 @@ def create( "objectId": object_id, "content": content, "authorUserId": author_user_id, + "objectStartTime": object_start_time, }, request_options=request_options, omit=OMIT, @@ -398,6 +404,7 @@ async def create( object_id: str, content: str, author_user_id: typing.Optional[str] = OMIT, + object_start_time: typing.Optional[dt.datetime] = OMIT, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[CreateCommentResponse]: """ @@ -420,6 +427,9 @@ async def create( author_user_id : typing.Optional[str] The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. + object_start_time : typing.Optional[dt.datetime] + The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -436,6 +446,7 @@ async def create( "objectId": object_id, "content": content, "authorUserId": author_user_id, + "objectStartTime": object_start_time, }, request_options=request_options, omit=OMIT, diff --git a/langfuse/api/comments/types/create_comment_request.py b/langfuse/api/comments/types/create_comment_request.py index 53a756ca9..0d92a905b 100644 --- a/langfuse/api/comments/types/create_comment_request.py +++ b/langfuse/api/comments/types/create_comment_request.py @@ -1,5 +1,6 @@ # This file was auto-generated by Fern from our API Definition. +import datetime as dt import typing import pydantic @@ -42,6 +43,13 @@ class CreateCommentRequest(UniversalBaseModel): The id of the user who created the comment. Must be a member of the organization that owns the project, otherwise an error will be thrown. """ + object_start_time: typing_extensions.Annotated[ + typing.Optional[dt.datetime], FieldMetadata(alias="objectStartTime") + ] = pydantic.Field(default=None) + """ + The start time of the referenced object (for observations, the observation's start time). Optional performance hint - when provided, Langfuse narrows the lookup to validate the reference faster. It only affects speed - an incorrect or omitted value never changes the result. + """ + model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( extra="allow", frozen=True ) diff --git a/langfuse/api/ingestion/__init__.py b/langfuse/api/ingestion/__init__.py index 5cd4ba3bd..7a0d7c762 100644 --- a/langfuse/api/ingestion/__init__.py +++ b/langfuse/api/ingestion/__init__.py @@ -23,7 +23,6 @@ IngestionEvent_ObservationCreate, IngestionEvent_ObservationUpdate, IngestionEvent_ScoreCreate, - IngestionEvent_SdkLog, IngestionEvent_SpanCreate, IngestionEvent_SpanUpdate, IngestionEvent_TraceCreate, @@ -38,8 +37,6 @@ OptionalObservationBody, ScoreBody, ScoreEvent, - SdkLogBody, - SdkLogEvent, TraceBody, TraceEvent, UpdateEventBody, @@ -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", @@ -82,8 +78,6 @@ "OptionalObservationBody": ".types", "ScoreBody": ".types", "ScoreEvent": ".types", - "SdkLogBody": ".types", - "SdkLogEvent": ".types", "TraceBody": ".types", "TraceEvent": ".types", "UpdateEventBody": ".types", @@ -140,7 +134,6 @@ def __dir__(): "IngestionEvent_ObservationCreate", "IngestionEvent_ObservationUpdate", "IngestionEvent_ScoreCreate", - "IngestionEvent_SdkLog", "IngestionEvent_SpanCreate", "IngestionEvent_SpanUpdate", "IngestionEvent_TraceCreate", @@ -155,8 +148,6 @@ def __dir__(): "OptionalObservationBody", "ScoreBody", "ScoreEvent", - "SdkLogBody", - "SdkLogEvent", "TraceBody", "TraceEvent", "UpdateEventBody", diff --git a/langfuse/api/ingestion/client.py b/langfuse/api/ingestion/client.py index c6ea6d805..4e78c2e2a 100644 --- a/langfuse/api/ingestion/client.py +++ b/langfuse/api/ingestion/client.py @@ -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( @@ -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. @@ -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. @@ -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( @@ -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. @@ -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. diff --git a/langfuse/api/ingestion/raw_client.py b/langfuse/api/ingestion/raw_client.py index 67d22c556..95b01adb3 100644 --- a/langfuse/api/ingestion/raw_client.py +++ b/langfuse/api/ingestion/raw_client.py @@ -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( @@ -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. @@ -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. @@ -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( @@ -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. @@ -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. diff --git a/langfuse/api/ingestion/types/__init__.py b/langfuse/api/ingestion/types/__init__.py index 4addfd9c7..4fd3b0e7e 100644 --- a/langfuse/api/ingestion/types/__init__.py +++ b/langfuse/api/ingestion/types/__init__.py @@ -23,7 +23,6 @@ IngestionEvent_ObservationCreate, IngestionEvent_ObservationUpdate, IngestionEvent_ScoreCreate, - IngestionEvent_SdkLog, IngestionEvent_SpanCreate, IngestionEvent_SpanUpdate, IngestionEvent_TraceCreate, @@ -39,8 +38,6 @@ from .optional_observation_body import OptionalObservationBody from .score_body import ScoreBody from .score_event import ScoreEvent - from .sdk_log_body import SdkLogBody - from .sdk_log_event import SdkLogEvent from .trace_body import TraceBody from .trace_event import TraceEvent from .update_event_body import UpdateEventBody @@ -67,7 +64,6 @@ "IngestionEvent_ObservationCreate": ".ingestion_event", "IngestionEvent_ObservationUpdate": ".ingestion_event", "IngestionEvent_ScoreCreate": ".ingestion_event", - "IngestionEvent_SdkLog": ".ingestion_event", "IngestionEvent_SpanCreate": ".ingestion_event", "IngestionEvent_SpanUpdate": ".ingestion_event", "IngestionEvent_TraceCreate": ".ingestion_event", @@ -82,8 +78,6 @@ "OptionalObservationBody": ".optional_observation_body", "ScoreBody": ".score_body", "ScoreEvent": ".score_event", - "SdkLogBody": ".sdk_log_body", - "SdkLogEvent": ".sdk_log_event", "TraceBody": ".trace_body", "TraceEvent": ".trace_event", "UpdateEventBody": ".update_event_body", @@ -140,7 +134,6 @@ def __dir__(): "IngestionEvent_ObservationCreate", "IngestionEvent_ObservationUpdate", "IngestionEvent_ScoreCreate", - "IngestionEvent_SdkLog", "IngestionEvent_SpanCreate", "IngestionEvent_SpanUpdate", "IngestionEvent_TraceCreate", @@ -155,8 +148,6 @@ def __dir__(): "OptionalObservationBody", "ScoreBody", "ScoreEvent", - "SdkLogBody", - "SdkLogEvent", "TraceBody", "TraceEvent", "UpdateEventBody", diff --git a/langfuse/api/ingestion/types/create_event_event.py b/langfuse/api/ingestion/types/create_event_event.py index e0cc820e1..a0b80a166 100644 --- a/langfuse/api/ingestion/types/create_event_event.py +++ b/langfuse/api/ingestion/types/create_event_event.py @@ -8,6 +8,10 @@ class CreateEventEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: CreateEventBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/create_generation_event.py b/langfuse/api/ingestion/types/create_generation_event.py index d62d6cc41..9ee974a10 100644 --- a/langfuse/api/ingestion/types/create_generation_event.py +++ b/langfuse/api/ingestion/types/create_generation_event.py @@ -8,6 +8,10 @@ class CreateGenerationEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: CreateGenerationBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/create_observation_event.py b/langfuse/api/ingestion/types/create_observation_event.py index 06d927f36..68f0c73f1 100644 --- a/langfuse/api/ingestion/types/create_observation_event.py +++ b/langfuse/api/ingestion/types/create_observation_event.py @@ -8,6 +8,10 @@ class CreateObservationEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: ObservationBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/create_span_event.py b/langfuse/api/ingestion/types/create_span_event.py index 6e60cf1fe..9b40bcf6b 100644 --- a/langfuse/api/ingestion/types/create_span_event.py +++ b/langfuse/api/ingestion/types/create_span_event.py @@ -8,6 +8,10 @@ class CreateSpanEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: CreateSpanBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/ingestion_event.py b/langfuse/api/ingestion/types/ingestion_event.py index 03202e635..3ee88e030 100644 --- a/langfuse/api/ingestion/types/ingestion_event.py +++ b/langfuse/api/ingestion/types/ingestion_event.py @@ -12,7 +12,6 @@ from .create_span_body import CreateSpanBody from .observation_body import ObservationBody from .score_body import ScoreBody -from .sdk_log_body import SdkLogBody from .trace_body import TraceBody from .update_generation_body import UpdateGenerationBody from .update_span_body import UpdateSpanBody @@ -102,18 +101,6 @@ class IngestionEvent_EventCreate(UniversalBaseModel): ) -class IngestionEvent_SdkLog(UniversalBaseModel): - type: typing.Literal["sdk-log"] = "sdk-log" - body: SdkLogBody - id: str - timestamp: str - metadata: typing.Optional[typing.Any] = None - - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="allow", frozen=True - ) - - class IngestionEvent_ObservationCreate(UniversalBaseModel): type: typing.Literal["observation-create"] = "observation-create" body: ObservationBody @@ -147,7 +134,6 @@ class IngestionEvent_ObservationUpdate(UniversalBaseModel): IngestionEvent_GenerationCreate, IngestionEvent_GenerationUpdate, IngestionEvent_EventCreate, - IngestionEvent_SdkLog, IngestionEvent_ObservationCreate, IngestionEvent_ObservationUpdate, ], diff --git a/langfuse/api/ingestion/types/ingestion_response.py b/langfuse/api/ingestion/types/ingestion_response.py index b9781fab5..063b9a773 100644 --- a/langfuse/api/ingestion/types/ingestion_response.py +++ b/langfuse/api/ingestion/types/ingestion_response.py @@ -3,7 +3,10 @@ import typing import pydantic +import typing_extensions +from ...commons.types.deprecation import Deprecation from ...core.pydantic_utilities import UniversalBaseModel +from ...core.serialization import FieldMetadata from .ingestion_error import IngestionError from .ingestion_success import IngestionSuccess @@ -11,6 +14,9 @@ class IngestionResponse(UniversalBaseModel): successes: typing.List[IngestionSuccess] errors: typing.List[IngestionError] + deprecation: typing_extensions.Annotated[ + typing.Optional[Deprecation], FieldMetadata(alias="_deprecation") + ] = None model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( extra="allow", frozen=True diff --git a/langfuse/api/ingestion/types/sdk_log_body.py b/langfuse/api/ingestion/types/sdk_log_body.py deleted file mode 100644 index d5b46f118..000000000 --- a/langfuse/api/ingestion/types/sdk_log_body.py +++ /dev/null @@ -1,14 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from ...core.pydantic_utilities import UniversalBaseModel - - -class SdkLogBody(UniversalBaseModel): - log: typing.Any - - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="allow", frozen=True - ) diff --git a/langfuse/api/ingestion/types/sdk_log_event.py b/langfuse/api/ingestion/types/sdk_log_event.py deleted file mode 100644 index ca303af55..000000000 --- a/langfuse/api/ingestion/types/sdk_log_event.py +++ /dev/null @@ -1,15 +0,0 @@ -# This file was auto-generated by Fern from our API Definition. - -import typing - -import pydantic -from .base_event import BaseEvent -from .sdk_log_body import SdkLogBody - - -class SdkLogEvent(BaseEvent): - body: SdkLogBody - - model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( - extra="allow", frozen=True - ) diff --git a/langfuse/api/ingestion/types/trace_event.py b/langfuse/api/ingestion/types/trace_event.py index 54127597a..3c89ec52b 100644 --- a/langfuse/api/ingestion/types/trace_event.py +++ b/langfuse/api/ingestion/types/trace_event.py @@ -8,6 +8,10 @@ class TraceEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: TraceBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/update_generation_event.py b/langfuse/api/ingestion/types/update_generation_event.py index e2c7fe284..359c0934b 100644 --- a/langfuse/api/ingestion/types/update_generation_event.py +++ b/langfuse/api/ingestion/types/update_generation_event.py @@ -8,6 +8,10 @@ class UpdateGenerationEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: UpdateGenerationBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/update_observation_event.py b/langfuse/api/ingestion/types/update_observation_event.py index 5c33e7591..0f6f8786d 100644 --- a/langfuse/api/ingestion/types/update_observation_event.py +++ b/langfuse/api/ingestion/types/update_observation_event.py @@ -8,6 +8,10 @@ class UpdateObservationEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: ObservationBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/ingestion/types/update_span_event.py b/langfuse/api/ingestion/types/update_span_event.py index 20214ac9d..a2138ced6 100644 --- a/langfuse/api/ingestion/types/update_span_event.py +++ b/langfuse/api/ingestion/types/update_span_event.py @@ -8,6 +8,10 @@ class UpdateSpanEvent(BaseEvent): + """ + Sunset warning: 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, including this one. 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 (`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. + """ + body: UpdateSpanBody model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict( diff --git a/langfuse/api/legacy/observations_v1/client.py b/langfuse/api/legacy/observations_v1/client.py index 871191ee5..8696fcc5e 100644 --- a/langfuse/api/legacy/observations_v1/client.py +++ b/langfuse/api/legacy/observations_v1/client.py @@ -35,6 +35,7 @@ def get( self, observation_id: str, *, + start_time: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ObservationsViewSingle: """ @@ -45,6 +46,9 @@ def get( observation_id : str The unique langfuse identifier of an observation, can be an event, span or generation + start_time : typing.Optional[dt.datetime] + The start time of the observation (ISO 8601 with offset, e.g. 2024-01-01T00:00:00Z). Optional performance hint - when provided, Langfuse narrows the lookup to make the request substantially faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -69,7 +73,7 @@ def get( ) """ _response = self._raw_client.get( - observation_id, request_options=request_options + observation_id, start_time=start_time, request_options=request_options ) return _response.data @@ -291,6 +295,7 @@ async def get( self, observation_id: str, *, + start_time: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, ) -> ObservationsViewSingle: """ @@ -301,6 +306,9 @@ async def get( observation_id : str The unique langfuse identifier of an observation, can be an event, span or generation + start_time : typing.Optional[dt.datetime] + The start time of the observation (ISO 8601 with offset, e.g. 2024-01-01T00:00:00Z). Optional performance hint - when provided, Langfuse narrows the lookup to make the request substantially faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -333,7 +341,7 @@ async def main() -> None: asyncio.run(main()) """ _response = await self._raw_client.get( - observation_id, request_options=request_options + observation_id, start_time=start_time, request_options=request_options ) return _response.data diff --git a/langfuse/api/legacy/observations_v1/raw_client.py b/langfuse/api/legacy/observations_v1/raw_client.py index 73343c130..691b105e2 100644 --- a/langfuse/api/legacy/observations_v1/raw_client.py +++ b/langfuse/api/legacy/observations_v1/raw_client.py @@ -34,6 +34,7 @@ def get( self, observation_id: str, *, + start_time: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, ) -> HttpResponse[ObservationsViewSingle]: """ @@ -44,6 +45,9 @@ def get( observation_id : str The unique langfuse identifier of an observation, can be an event, span or generation + start_time : typing.Optional[dt.datetime] + The start time of the observation (ISO 8601 with offset, e.g. 2024-01-01T00:00:00Z). Optional performance hint - when provided, Langfuse narrows the lookup to make the request substantially faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -54,6 +58,11 @@ def get( _response = self._client_wrapper.httpx_client.request( f"api/public/observations/{jsonable_encoder(observation_id)}", method="GET", + params={ + "startTime": serialize_datetime(start_time) + if start_time is not None + else None, + }, request_options=request_options, ) try: @@ -411,6 +420,7 @@ async def get( self, observation_id: str, *, + start_time: typing.Optional[dt.datetime] = None, request_options: typing.Optional[RequestOptions] = None, ) -> AsyncHttpResponse[ObservationsViewSingle]: """ @@ -421,6 +431,9 @@ async def get( observation_id : str The unique langfuse identifier of an observation, can be an event, span or generation + start_time : typing.Optional[dt.datetime] + The start time of the observation (ISO 8601 with offset, e.g. 2024-01-01T00:00:00Z). Optional performance hint - when provided, Langfuse narrows the lookup to make the request substantially faster. It only affects speed - an incorrect or omitted value never changes the result. + request_options : typing.Optional[RequestOptions] Request-specific configuration. @@ -431,6 +444,11 @@ async def get( _response = await self._client_wrapper.httpx_client.request( f"api/public/observations/{jsonable_encoder(observation_id)}", method="GET", + params={ + "startTime": serialize_datetime(start_time) + if start_time is not None + else None, + }, request_options=request_options, ) try: diff --git a/langfuse/api/metrics/client.py b/langfuse/api/metrics/client.py index f2272409b..707112cc2 100644 --- a/langfuse/api/metrics/client.py +++ b/langfuse/api/metrics/client.py @@ -29,6 +29,8 @@ def metrics( """ Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance. + Together with OpenTelemetry ingestion and Observations API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## V2 Differences - Supports `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical` views only (traces view not supported) - Direct access to tags and release fields on observations @@ -255,6 +257,8 @@ async def metrics( """ Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance. + Together with OpenTelemetry ingestion and Observations API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## V2 Differences - Supports `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical` views only (traces view not supported) - Direct access to tags and release fields on observations diff --git a/langfuse/api/metrics/raw_client.py b/langfuse/api/metrics/raw_client.py index ce52e03c2..dbb81c772 100644 --- a/langfuse/api/metrics/raw_client.py +++ b/langfuse/api/metrics/raw_client.py @@ -26,6 +26,8 @@ def metrics( """ Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance. + Together with OpenTelemetry ingestion and Observations API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## V2 Differences - Supports `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical` views only (traces view not supported) - Direct access to tags and release fields on observations @@ -306,6 +308,8 @@ async def metrics( """ Get metrics from the Langfuse project using a query object. V2 endpoint with optimized performance. + Together with OpenTelemetry ingestion and Observations API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## V2 Differences - Supports `observations`, `scores-numeric`, `scores-boolean`, and `scores-categorical` views only (traces view not supported) - Direct access to tags and release fields on observations diff --git a/langfuse/api/observations/client.py b/langfuse/api/observations/client.py index 0bab55257..1d925980a 100644 --- a/langfuse/api/observations/client.py +++ b/langfuse/api/observations/client.py @@ -51,6 +51,8 @@ def get_many( """ Get a list of observations with cursor-based pagination and flexible field selection. + Together with OpenTelemetry ingestion and Metrics API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## Cursor-based Pagination This endpoint uses cursor-based pagination for efficient traversal of large datasets. The cursor is returned in the response metadata and should be passed in subsequent requests @@ -335,6 +337,8 @@ async def get_many( """ Get a list of observations with cursor-based pagination and flexible field selection. + Together with OpenTelemetry ingestion and Metrics API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## Cursor-based Pagination This endpoint uses cursor-based pagination for efficient traversal of large datasets. The cursor is returned in the response metadata and should be passed in subsequent requests diff --git a/langfuse/api/observations/raw_client.py b/langfuse/api/observations/raw_client.py index a4d6b82e7..42c3cc0a7 100644 --- a/langfuse/api/observations/raw_client.py +++ b/langfuse/api/observations/raw_client.py @@ -49,6 +49,8 @@ def get_many( """ Get a list of observations with cursor-based pagination and flexible field selection. + Together with OpenTelemetry ingestion and Metrics API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## Cursor-based Pagination This endpoint uses cursor-based pagination for efficient traversal of large datasets. The cursor is returned in the response metadata and should be passed in subsequent requests @@ -392,6 +394,8 @@ async def get_many( """ Get a list of observations with cursor-based pagination and flexible field selection. + Together with OpenTelemetry ingestion and Metrics API v2, this is the only real-time read path. Other public API endpoints can delay data by about 10 minutes. + ## Cursor-based Pagination This endpoint uses cursor-based pagination for efficient traversal of large datasets. The cursor is returned in the response metadata and should be passed in subsequent requests diff --git a/langfuse/api/opentelemetry/client.py b/langfuse/api/opentelemetry/client.py index 13177e5e6..31af9bc42 100644 --- a/langfuse/api/opentelemetry/client.py +++ b/langfuse/api/opentelemetry/client.py @@ -38,6 +38,8 @@ def export_traces( This endpoint implements the OTLP/HTTP specification for trace ingestion, providing native OpenTelemetry integration for Langfuse Observability. + Together with Observations API v2 and Metrics API v2, this is the only real-time write path. Other public API endpoints can delay data by about 10 minutes. Direct exporters must send `x-langfuse-ingestion-version: 4`; current Python and JS SDKs already do. + **Supported Formats:** - Binary Protobuf: `Content-Type: application/x-protobuf` - JSON Protobuf: `Content-Type: application/json` @@ -166,6 +168,8 @@ async def export_traces( This endpoint implements the OTLP/HTTP specification for trace ingestion, providing native OpenTelemetry integration for Langfuse Observability. + Together with Observations API v2 and Metrics API v2, this is the only real-time write path. Other public API endpoints can delay data by about 10 minutes. Direct exporters must send `x-langfuse-ingestion-version: 4`; current Python and JS SDKs already do. + **Supported Formats:** - Binary Protobuf: `Content-Type: application/x-protobuf` - JSON Protobuf: `Content-Type: application/json` diff --git a/langfuse/api/opentelemetry/raw_client.py b/langfuse/api/opentelemetry/raw_client.py index 6b68f909b..14c74c589 100644 --- a/langfuse/api/opentelemetry/raw_client.py +++ b/langfuse/api/opentelemetry/raw_client.py @@ -36,6 +36,8 @@ def export_traces( This endpoint implements the OTLP/HTTP specification for trace ingestion, providing native OpenTelemetry integration for Langfuse Observability. + Together with Observations API v2 and Metrics API v2, this is the only real-time write path. Other public API endpoints can delay data by about 10 minutes. Direct exporters must send `x-langfuse-ingestion-version: 4`; current Python and JS SDKs already do. + **Supported Formats:** - Binary Protobuf: `Content-Type: application/x-protobuf` - JSON Protobuf: `Content-Type: application/json` @@ -171,6 +173,8 @@ async def export_traces( This endpoint implements the OTLP/HTTP specification for trace ingestion, providing native OpenTelemetry integration for Langfuse Observability. + Together with Observations API v2 and Metrics API v2, this is the only real-time write path. Other public API endpoints can delay data by about 10 minutes. Direct exporters must send `x-langfuse-ingestion-version: 4`; current Python and JS SDKs already do. + **Supported Formats:** - Binary Protobuf: `Content-Type: application/x-protobuf` - JSON Protobuf: `Content-Type: application/json`