Skip to content
Open
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
2 changes: 1 addition & 1 deletion components-mdx/v4/step-evaluators.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
**Evaluators**

Migrate trace-level LLM-as-a-judge evaluators to the [observation level](/faq/all/llm-as-a-judge-migration).
Upgrade trace-level LLM-as-a-judge evaluators to the [observation level](/faq/all/llm-as-a-judge-migration). If an existing evaluator reads trace input or output, keep supplying those values with the deprecated trace I/O methods (`set_current_trace_io()` or `span.set_trace_io()` in Python; `setActiveTraceIO()` or `span.setTraceIO()` in JS/TS) until the new evaluator is validated. Any future multi-span support will also use the observation-centric model.

Check warning on line 3 in components-mdx/v4/step-evaluators.mdx

View check run for this annotation

Claude / Claude Code Review

Evaluator bridge guidance omits OTel/direct-API users

The new bridge sentence in `step-evaluators.mdx` only mentions Python (`set_current_trace_io()`/`span.set_trace_io()`) and JS/TS (`setActiveTraceIO()`/`span.setTraceIO()`) methods for keeping trace I/O populated during the evaluator transition, but this shared component is also rendered in the "Direct API and OpenTelemetry users" section, whose readers by definition aren't using either SDK. Consider scoping the parenthetical (e.g. "if you use the Python/JS SDK") or adding a short note for OTel/d
Comment on lines 1 to +3

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 The new bridge sentence in step-evaluators.mdx only mentions Python (set_current_trace_io()/span.set_trace_io()) and JS/TS (setActiveTraceIO()/span.setTraceIO()) methods for keeping trace I/O populated during the evaluator transition, but this shared component is also rendered in the "Direct API and OpenTelemetry users" section, whose readers by definition aren't using either SDK. Consider scoping the parenthetical (e.g. "if you use the Python/JS SDK") or adding a short note for OTel/direct-API users so that audience isn't left assuming an inapplicable method.

Extended reasoning...

components-mdx/v4/step-evaluators.mdx is rendered via <V4StepEvaluators /> in all four upgrade paths on content/docs/v4.mdx, including ### Direct API and OpenTelemetry users [#api-otel] (line ~181). That section's own Ingestion step is explicit that its audience is not using the Langfuse Python/JS SDK — it instructs readers to point a generic OTel span exporter at POST /api/public/otel/v1/traces, with SDK users routed to the separate cloud-older-sdks / cloud-current-sdks sections instead.

The sentence this PR adds says: "If an existing evaluator reads trace input or output, keep supplying those values with the deprecated trace I/O methods (set_current_trace_io() or span.set_trace_io() in Python; setActiveTraceIO() or span.setTraceIO() in JS/TS) until the new evaluator is validated." Walking through the api-otel reader's experience: they land on this Step expecting guidance for their setup, see two method names that are explicitly qualified "in Python"/"in JS/TS", and have no way to apply either one, since they aren't calling into an SDK at all. There's no OTel/API-level equivalent offered (e.g., an attribute name to set on a span via the raw ingestion payload), so this subset of readers gets no actionable instruction for the trace-I/O bridge if they have an existing trace-level evaluator they want to keep working during the transition.

That said, the risk here is genuinely limited, which is why this should not block merge. Before this PR, the shared sentence was just "Migrate trace-level LLM-as-a-judge evaluators to the observation level" — equally generic for all four audiences, with the same link to the migration FAQ. This PR only adds an optional bridging clause for SDK users; it doesn't remove or weaken anything OTel users previously had, and the core instruction (upgrade to observation-level evaluators, see the migration guide) still applies to and works for every audience, including api-otel. The added clause is clearly self-scoped ("in Python", "in JS/TS"), so an OTel reader will recognize it doesn't apply to them rather than being misled into calling a nonexistent method. It's also not obviously fixable within this doc sentence alone — if OTel/direct-API ingestion has no equivalent way to keep trace I/O populated (this looks like a genuine product gap, not a doc omission), the best available fix is to explicitly scope the parenthetical to SDK users, so OTel readers aren't left wondering why it doesn't apply to them, or to add a short pointer to whatever mechanism (if any) exists for raw OTel spans.

Net effect: a documentation completeness gap affecting one of four audiences for an edge case (readers with a pre-existing trace-level evaluator, mid-transition), not an incorrect or misleading instruction. Recommend scoping the parenthetical (e.g. "if you use the Python or JS/TS SDK, keep supplying...") or adding a one-line OTel-specific caveat, but this is a nit rather than a blocking issue.

2 changes: 1 addition & 1 deletion content/docs/v4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ The new mental model: Langfuse stores one immutable observations table. A trace
| Separate, mutable traces and observations tables | Single immutable observations table; a trace is the set of observations sharing a `trace_id` |
| Trace attributes stored on the trace, joined at query time | Trace attributes live on every observation, propagated by the SDKs |
| `update_current_trace()` / `updateActiveTrace()` | `propagate_attributes()` |
| Trace input/output | Observation input/output (`set_trace_io` is deprecated) |
| Trace input/output | Observation input/output (trace I/O methods are deprecated and retained only as a temporary evaluator upgrade bridge) |
| v1 read APIs (observations, metrics, traces, sessions, scores v1/v2) | [Observations API v2](/docs/api-and-data-platform/features/observations-api#v2), [Metrics API v2](/docs/metrics/features/metrics-api#v2), Scores API v3 |
| Legacy batch ingestion for trace, span, and generation events | OTLP endpoint `POST /api/public/otel/v1/traces` |
| Trace-level LLM-as-a-judge evaluators | [Observation-level evaluators](/faq/all/llm-as-a-judge-migration) |
Expand Down
Loading