Agent skill · software engineering · jeremylongshore

langfuse-hello-world

Create a minimal working Langfuse trace example.

Why this skill is useful

Provides specific Langfuse SDK integration patterns and examples that the AI wouldn't reliably generate on its own.

What it needs

Requires @langfuse/otel, @langfuse/tracing, @opentelemetry/sdk-node installed locally. Requires openai account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Langfuse Hello World Overview Create your first Langfuse trace with real SDK calls. Demonstrates the trace/span/generation hierarchy, the observe wrapper, and the OpenAI drop-in integration. Prerequisites Completed langfuse-install-auth setup Valid API credentials in environment variables OpenAI API key (for the OpenAI integration example) Instructions Step 1: Hello World with v4+ Modular SDK Step 2: Hello World with observe Wrapper The observe wrapper traces existing functions without modifying internals: Step 3: Hello World with Legacy v3 SDK Step 4: Python Hello World Trace Hierarchy Error Handling Error Cause Solution ------- ------- ---------- Import error SDK not installed npm install @langfuse/tracing @langfuse/otel @opentelemetry/sdk-node Auth error (401) Invalid credentials Verify LANGFUSEPUBLICKEY and LANGFUSESECRETKEY Trace not appearing Data not flushed Call sdk.shutdown() (v4+) or langfuse.flushAsync() (v3) Network error Host unreachable Check LANGFUSEBASEURL value No auto-nesting Missing OTel setup Register LangfuseSpanProcessor with NodeSDK Output Produce one trace URL or identifier with a root trace, child span, and generation. State the SDK version and whether token usage was recorded, but do not include the full prompt or generated content in the completion message. Examples Run the JavaScript hello-world example with test credentials, wait for the SDK flush, and open the resulting trace to confirm all three observations appear. Repeat the Python example with a non-sensitive synthetic query and verify decorator-created nesting before instrumenting production code. Resources Langfuse JS/TS SDK Cookbook TypeScript SDK Instrumentation Python Decorators Guide Observation Types Next Steps Proceed to langfuse-core-workflow-a for real OpenAI/Anthropic tracing, or langfuse-local-dev-loop for development workflow setup.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/langfuse-hello-world

View the source on GitHub

Browse the @skills marketplace