Skip to content
findplate

DocsModules

Langfuse

LLM tracing for the ai module.

On this page

The langfuse module sends traces of AI SDK calls to Langfuse, cloud or self-hosted. It requires the ai module, which the cli turns on for you. It is off by default.

findplate create my-app --modules langfuse

What it adds

Files and folders:

  • apps/api/src/langfuse.ts

Packages:

  • @langfuse/otel
  • @langfuse/vercel-ai-sdk
  • @opentelemetry/sdk-node

Env keys

LANGFUSE_PUBLIC_KEY=
LANGFUSE_SECRET_KEY=
LANGFUSE_BASE_URL=https://cloud.langfuse.com

apps/api/src/langfuse.ts registers the OpenTelemetry span processor. Without the keys nothing is sent. A compose file is in self-hosted tools.

Remove

Run findplate remove langfuse in the project, see add and doctor. It deletes the files the module owns, strips its code from shared files and drops its packages, only where you haven't edited them.

If you'd rather do it by hand: for a new project leave langfuse out of --modules. In a project that already exists, delete the paths above, drop its packages from the package.json files, remove its env block and fix what pnpm check-types reports.

Swap

Point LANGFUSE_BASE_URL at your own instance.