/confident-trace:confident-migrate-langfusefrom Confident Trace
Migrate an AI application's tracing from Langfuse to Confident AI with the confident-trace SDK. TRIGGER when the user wants to switch, move, or migrate from Langfuse to Confident AI; replace @observe, langfuse_context, get_client(), langfuse.trace(), trace.generation(), langfuse.openai, observeOpenAI, LangfuseMedia, LangfuseSpanProcessor, or the Langfuse LangChain CallbackHandler with confident-trace; or export the spans Langfuse already emits to Confident AI over OpenTelemetry. Covers Langfuse SDK v1, v2, v3, and v4 (TypeScript v4 and v5) in Python and TypeScript. DO NOT TRIGGER for new instrumentation in an app with no Langfuse code (use the `confident-tracing` skill) or for raw OpenTelemetry export without a Langfuse SDK (use the `confident-otel` skill).
Ships in Confident Trace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Use this skill to move an AI application's tracing from Langfuse to
Confident AI. The target is the confident-trace SDK: init() for
automatic instrumentation, span for your own steps, and update_trace() /
update_span() for trace and span fields.
What changes depends on the Langfuse SDK version in the app, not the Langfuse server version. Each version has its own reference file.
Find every Langfuse integration. Search for imports of langfuse and
@langfuse/*, Langfuse() and new Langfuse(), @observe and
observe(), langfuse_context, get_client(), langfuse.trace(),
trace.span(), trace.generation(), start_as_current_span(),
start_as_current_observation(), startActiveObservation(),
langfuse.openai, observeOpenAI, LangfuseMedia,
LangfuseSpanProcessor, the Langfuse CallbackHandler, and LANGFUSE_*
environment variables or keys passed in code.
Confirm the installed SDK version. Run pip show langfuse,
npm ls langfuse, or npm ls @langfuse/tracing. Python and TypeScript
services in one repo can be on different versions, so check each one.
Read the reference for that version.
| Installed SDK | Reference |
|---|---|
Python langfuse<2, TypeScript langfuse@1 | references/langfuse-v1.md |
Python langfuse>=2,<3, TypeScript langfuse@2 | references/langfuse-v2.md |
Python langfuse>=3,<4, TypeScript langfuse@3 | references/langfuse-v3.md |
Python langfuse>=4, TypeScript @langfuse/tracing v4 or v5 | references/langfuse-v4.md |
There is no need to upgrade Langfuse first. Every version moves straight to confident-trace.
Pick the method. Default to the full switch: replace the Langfuse SDK with confident-trace. Use the OpenTelemetry method only when the user asks to keep Langfuse instrumentation in place, and only where the reference says it is available. Tell the user its limits before you start.
Make the changes in the order the reference gives. Read
references/common.md for the install, endpoint, LangChain, media, and
flush rules that apply to every version.
Preserve behavior. Keep the same span names, nesting, inputs, outputs, users, sessions, tags, and metadata. A Langfuse session ID becomes a confident-trace thread ID.
Leave prompt, dataset, and score calls alone. Calls such as
get_prompt(), create_dataset(), create_dataset_item(), and score()
use the Langfuse API, not tracing. Do not delete or rewrite them. List them
for the user. If any remain, keep the langfuse package installed and
remove only the tracing code.
Verify. Run the app once and confirm the trace appears in the
project's Observatory. If it does not, check that CONFIDENT_API_KEY is set
in the same process and that the app flushes before it exits.
Report. Summarize every change. List what still needs the user:
setting CONFIDENT_API_KEY, the EU or self-hosted endpoint, model calls you
could not map, and the prompt, dataset, and score calls you left in place.
Confident AI can import Langfuse datasets, prompts, and historical scores
on a migration call.
init() replace provider wrappers and generations around covered model
calls. Do not wrap a call that automatic instrumentation already records.span(type="llm") with update_span()) only for model
calls that automatic instrumentation does not cover.confident-tracing skill.| Topic | File |
|---|---|
| Install, endpoints, LangChain, media, and flush rules for every version | references/common.md |
| Langfuse SDK v1 | references/langfuse-v1.md |
| Langfuse SDK v2 | references/langfuse-v2.md |
| Langfuse SDK v3, including the Python OpenTelemetry method | references/langfuse-v3.md |
| Langfuse SDK v4 (TypeScript v4 and v5), including the OpenTelemetry method | references/langfuse-v4.md |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub confident-ai/confident-skills --plugin confident-trace3 skills in this plugin
/confident-otelExport raw OpenTelemetry traces from an AI application to Confident AI. TRIGGER when the user wants to send OpenTelemetry or OTLP traces/spans from an LLM app, agent, RAG pipeline, or chatbot to Confident AI; configure the Confident AI OTLP endpoint; set confident.span.* or confident.trace.* attributes; export AI-app traces without the confident-trace package; wire an OTLPSpanExporter, OpenTelemetry Collector, or vendor-neutral OTel SDK to Confident AI; or pick the US vs EU OTLP endpoint. Language-agnostic: the mechanism is OTLP attribute keys plus an exporter endpoint. DO NOT TRIGGER for evaluation test suites, datasets, goldens, metrics, or test runs; for instrumentation with the confident-trace SDK and its integrations (use the `confident-tracing` skill); or for non-AI software such as web servers, CRUD backends, or infrastructure.
/confident-tracingInstrument an AI application with the confident-trace SDK so its behavior is visible in Confident AI. TRIGGER when the user wants to add Confident Trace, automatic AI instrumentation, @span, span(), or withSpan() to an LLM app, agent, RAG pipeline, or chatbot; wire a framework, model-provider, agent SDK, or gateway integration; choose between automatic integration and custom instrumentation; set span types, tags, metadata, or conversation context; or send confident-trace SDK traces to Confident AI. DO NOT TRIGGER for evaluation test suites, datasets, goldens, metrics, or test runs, or for raw OpenTelemetry / OTLP export without the confident-trace package (use the `confident-otel` skill), or for migrating existing Langfuse tracing (use the `confident-migrate-langfuse` skill). This skill is purely confident-trace SDK instrumentation—producing well-formed traces, not running evals.