Skip to content

Migrate Langfuse integration from langfuse-vercel to JS SDK v5Β #1453

Description

@hassiebp

Hi Sourcebot team πŸ‘‹ β€” I'm Hassieb from the Langfuse team.

Sourcebot has two separate v3 surfaces: the deprecated Vercel exporter in server instrumentation and browser-side answer feedback. For JS/TS SDK v5.4+ the migration is:

  • Replace langfuse-vercel with @langfuse/otel and register LangfuseSpanProcessor in packages/web/src/instrumentation.ts.
  • Keep the current AI SDK telemetry and verify its trace ID still reaches the answer UI.
  • Replace browser-side LangfuseWeb with LangfuseBrowserClient from @langfuse/browser, using its ingestion-backed .score(...) method for public-key feedback.
  • Preserve boolean score data and a deterministic score ID so repeated feedback updates rather than duplicates.
  • Run the flow against a self-hosted Langfuse URL as well as Cloud; keep browser feedback off management API methods that require newer self-hosted API support.

Guides: JS SDK v3β†’v4 and v4β†’v5.

If you need support with the migration, we're happy to jump on a call or help review a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions