langfuse-core-workflow-a

Featured

Execute Langfuse primary workflow: Tracing LLM calls and spans. Use when implementing LLM tracing, building traced AI features, or adding observability to existing LLM applications. Trigger with phrases like "langfuse tracing", "trace LLM calls", "add langfuse to openai", "langfuse spans", "track llm requests".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Langfuse Core Workflow A: Tracing LLM Calls ## Overview End-to-end tracing of LLM calls, chains, and agents. Covers the OpenAI drop-in wrapper, manual tracing with `startActiveObservation`, RAG pipeline instrumentation, streaming response tracking, and LangChain integration. ## Prerequisites - Completed `langfuse-install-auth` setup - OpenAI SDK installed (`npm install openai`) - For v4+: `@langfuse/openai`, `@langfuse/tracing`, `@langfuse/otel`, `@opentelemetry/sdk-node` ## Instructions ### Step 1: OpenAI Drop-In Wrapper (Zero-Code Tracing) ```typescript import OpenAI from "openai"; import { observeOpenAI } from "@langfuse/openai"; // Wrap the OpenAI client -- all calls are now traced automatically const openai = observeOpenAI(new OpenAI()); // Every call captures: model, input, output, tokens, latency, cost const response = await openai.chat.completions.create({ model: "gpt-4o", messages: [ { role: "system", content: "You are a helpful assistant." }, { role: "user", content: "What is Langfuse?" }, ], }); // Add metadata to traces const res = await observeOpenAI(new OpenAI(), { generationName: "product-description", generationMetadata: { feature: "onboarding" }, sessionId: "session-abc", userId: "user-123", tags: ["production", "onboarding"], }).chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "Describe this product" }], }); ``` ### Step 2: Manual Tracing -- RAG Pipeline (v4+ SDK) ```typescript import...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category