Repository navigation
docs: update observations pagination and batch evaluation docs - #2098
Merged
hassiebp merged 2 commits intoNov 5, 2026
Merged
Conversation
Since langfuse/langfuse#19043, observations v2 pages can be short or empty while meta.cursor is set, a request can take up to 45 s, and queries without a lower start-time bound stop at 2020-01-01. Document how to read every page in the Langfuse.api docs, and correct batch evaluation docs that claimed filter=None fetches everything, that more items definitely exist, and that all fetch failures are retried. Replace the resume example that looped forever on a persistent fetch failure, and fix the inclusive resume timestamp description.
This was referenced Nov 5, 2026
DavidTraina
marked this pull request as ready for review
November 5, 2026 07:03
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Brings the docs in line with observations v2 after langfuse/langfuse#19043. Pages can be short or empty while
meta.cursoris set, a request can take up to 45 s, a 422 means the server hit a resource limit, and queries without a lower start-time bound only reach back to 2020-01-01.Langfuse.apidocsmeta.cursoris absent, passrequest_options={"timeout_in_seconds": 60}andfrom_start_time, and narrow the range on a 422 rather than retrying unchanged. Also note that a JSONstartTimefilter overridesfrom_start_time/to_start_time.flush()note pointed to a "bounded retry pattern" in these docs that didn't exist; it now just says to poll with a deadline.run_batched_evaluationand batch evaluation docsfilter: replace "Default: None (fetches all observations)" with the 2020-01-01 floor and a recommendation to add astartTimelower bound.max_retries: retries apply only to 408/409/429/5xx responses. Timeouts and 422s stop the run with a resume token.has_more_itemsand the resume token now say more items may exist. With the new time cursors, a full page with a cursor does not guarantee another row.while result.resume_token:example, which looped forever on any persistent fetch failure (422, 400, 401, or a client timeout), with a boundedwhile result.has_more_items:loop plus acompleted=Falsebranch._build_filteruses<=and skipslast_processed_id, and the docs now say so.Docs only; no behavior change. The generated client docstrings come from the pending regen PR (#2095).
Related PRs
Independent follow-ups to langfuse/langfuse#19043, mergeable in any order: #2097 (batch evaluation stops on empty pages), #2096 (batch evaluation fetch timeout), #2099 (test helpers), #2101 (pagination helper).
Type of change
Verification
List the main commands you ran:
I checked that the
apidocstring example renders as a code block with pdoc. I checked each claim against the server at langfuse/langfuse728e69371e:events.tsscan bounds and deadline, thewithMiddlewares.ts422 mapping, and thepublic-api-filter-builder.tsfilter precedence. I also checked it against_should_retryinlangfuse/api/core/http_client.py.Checklist
code_review.md..env.templateif needed.

Confidence Score: 5/5
The PR appears safe to merge.Summary
Updates observation paging and batch evaluation guidance.
Acknowledged follow-ups: DavidTraina explicitly identifies empty-page handling as separate PR #2097 and the batch fetch timeout as separate PR #2096.
Reviews (1) · Last reviewed commit: "docs: update observations pagination and..." · Reviewed by Greptile