-
-
Notifications
You must be signed in to change notification settings - Fork 359
Auto-fix CI failures for PR #1175 #1181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -408,7 +408,7 @@ export async function traceProxyRequest(ctx: TraceContext): Promise<void> { | |
| ); | ||
|
|
||
| // Explicitly set trace-level input/output (propagateAttributes does not support these) | ||
| rootSpan.updateTrace({ | ||
| rootSpan.setTraceIO({ | ||
| input: actualRequestBody, | ||
| output: actualResponseBody, | ||
| }); | ||
|
Comment on lines
+411
to
414
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Langfuse JS/TS v5 migration guide marks Prompt To Fix With AIThis is a comment left during a code review.
Path: src/lib/langfuse/trace-proxy-request.ts
Line: 411-414
Comment:
**`setTraceIO` is deprecated in the v5 SDK**
The Langfuse JS/TS v5 migration guide marks `setTraceIO()` as deprecated — it exists only for backward compatibility with legacy trace-level LLM-as-a-judge evaluators. The project already declares `@langfuse/tracing@^5`. The recommended v5 approach is to set `input`/`output` directly on the root observation instead of calling `setTraceIO` on the span. While this fix unblocks the TypeScript build, it lands on a deprecated code path that may be removed in a future SDK minor or major.
How can I resolve this? If you propose a fix, please make it concise. |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the unit-test environment,
mockRootSpanintests/unit/langfuse/langfuse-trace.test.tsstill only definesupdateTraceand the assertions still expect that method. After this call switches tosetTraceIO, every successful trace path hitsTypeError: rootSpan.setTraceIO is not a function, which is swallowed by the catch block beforerootSpan.end()runs, so the Langfuse trace tests now fail instead of validating trace IO. Please update the test mock and expectations alongside this SDK method rename.Useful? React with 👍 / 👎.