Langfuse is the recommended greenfield instrumentation path. For new implementations, use Langfuse as the instrumentation layer, then export those spans to Lemma. This keeps framework/provider edge-case handling in Langfuse while Lemma receives normalized trace data for monitoring and analysis. If you already use OpenTelemetry-compatible instrumentation (OpenInference, Arize, Braintrust, provider SDK instrumentation, or another OTel stack), you do not need to adopt Langfuse. Keep your existing instrumentation and configure Lemma as an OpenTelemetry export destination.Documentation Index
Fetch the complete documentation index at: https://docs.uselemma.ai/llms.txt
Use this file to discover all available pages before exploring further.
Lemma-only export
Configure OpenTelemetry with Lemma’s OpenTelemetry exporter. These examples do not requireLANGFUSE_* environment variables.
- TypeScript
- Python
Install Langfuse’s OpenTelemetry processor and the Lemma OpenTelemetry exporter:Enable framework instrumentation. For the Vercel AI SDK, use By semantic convention, In Next.js, put the provider setup in root
experimental_telemetry so model calls emit OpenTelemetry spans that Langfuse can process:gen_ai.agent.name should use snake_case, CamelCase, or kebab-case values, such as support_agent, SupportAgent, or support-agent.Then configure LangfuseSpanProcessor with an OTLPTraceExporter targeting Lemma:instrumentation.ts and run it only in the Node runtime:Required environment variables for Lemma-only export:
LEMMA_BASE_URL(https://api.uselemma.ai/otel/v1/traces)LEMMA_API_KEYLEMMA_PROJECT_ID
Export to both Langfuse and Lemma
If you want traces in both systems, add two Langfuse processors:If you export to Langfuse as well as Lemma, also set:
LANGFUSE_PUBLIC_KEYLANGFUSE_SECRET_KEYLANGFUSE_BASE_URL(for examplehttps://cloud.langfuse.com)
Framework instrumentation
Use Langfuse-native framework guides, then keep Lemma as an export destination:Next steps
- OpenTelemetry export — language and topology options
- Dual export — send spans to Langfuse and Lemma
- Tracing overview — trace model and common setup patterns
- Troubleshooting — validation and export debugging

