- name
- langfuse
- description
- Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production.
- metadata
- aas-risk: critical aas-source: vibeship-spawner-skills (Apache 2.0) aas-date-added: '2026-02-27'
Langfuse
Instrument an existing LLM application with traceable, minimized observations and versioned evaluation inputs. Modified by AAS maintainers on 2026-09-05 to replace mixed legacy SDK examples with a current, bounded setup procedure; existing source attribution is preserved.
When to Use
Use when an application already needs Langfuse tracing, prompt management or evaluation, or when debugging missing/duplicated spans. Do not add an observability service merely because an LLM is present; start from the incident or product decision the data must support.
Inputs and prerequisites
- Installed Python or JS SDK version, framework and runtime lifecycle.
- The explicitly authorized Langfuse project/endpoint, credentials supplied through the project’s secret mechanism, and data retention/access policy.
- An allowlist of observable fields and a synthetic request that contains no private content.
- A defined verifier: expected parent/child spans, status, timing, model/prompt version and flush behavior.
Procedure
- Inspect the dependency lock and existing instrumentation. Do not mix old
langfuse.trace(),langfuse.decoratorsorlangfuse.callbackexamples with the current SDK without checking its migration guide. - Choose one integration layer: direct SDK spans, a framework callback or OpenTelemetry instrumentation. Avoid tracing the same call twice through overlapping wrappers.
- Configure the approved endpoint and credentials outside source. Verify export permission before running an example: instrumentation can send inputs, outputs, metadata and exceptions externally.
- Start with explicit observations containing only synthetic or allowlisted values. Add correlation IDs only when their scope and privacy treatment are defined.
- Execute one success and one failure request; inspect the actual exported span tree and verify no sensitive fields escaped through nested metadata or third-party instrumentation.
- Flush in short-lived processes and test shutdown/timeouts. A returned SDK call does not by itself prove ingestion.
- Add prompt/evaluation metadata only after the trace boundary works. Pin the prompt version or record the exact resolved version; a mutable production label is not an immutable experiment input.