Skip to content

fix(runtime): support Langfuse v3/v4 trace endpoints - #147

Open
wutongyuonce wants to merge 1 commit into
deer-flow:mainfrom
wutongyuonce:fix/langfuse-legacy-endpoints
Open

fix(runtime): support Langfuse v3/v4 trace endpoints#147
wutongyuonce wants to merge 1 commit into
deer-flow:mainfrom
wutongyuonce:fix/langfuse-legacy-endpoints

Conversation

@wutongyuonce

Copy link
Copy Markdown

Summary

  • Fall back from GET /api/public/traces to v2 observations for Langfuse v4 events_only deployments.
  • Fall back from v2 observations to legacy GET /api/public/observations for Langfuse v3 self-hosted deployments.
  • Aggregate observation rows into trace summaries and preserve deployment-specific 404 details.
  • Add regression tests covering both fallbacks and authentication failures.

Closes #146

Validation

  • bun test packages/runtime/tests — 106 passed
  • bun run lint — passed
  • bun run typecheck — passed
  • bun test — 773 passed, 1 unrelated failure because the local Python environment lacks jinja2 (templates.test.ts)

@wutongyuonce

Copy link
Copy Markdown
Author

@MagicCube could you take a maintainer review when you have a moment?

This addresses #146: Langfuse 3.110 is missing /api/public/v2/observations, and Langfuse v4 events_only is missing GET /api/public/traces. The client now falls back traces → v2 observations (aggregated to trace summaries) and v2 observations → legacy /api/public/observations, and keeps the deployment-specific 404 body in the error.

Locally: bun test packages/runtime/tests 106 passed; bun run lint / typecheck passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trace 搜索/同步在部分 Langfuse 自建版本上会 404

1 participant