> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentium.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Langfuse OTLP adapter

> Configure current Langfuse ingestion and migrate from the legacy exporter.

Use `LangfuseOTLPExporter` from `@agentium/observability`, or the `"langfuse-otlp"` shorthand. It uses Langfuse's OTLP HTTP ingestion rather than the older ingestion API.

```bash theme={null}
npm install @agentium/core@4.0.0 @agentium/observability@4.0.0
export LANGFUSE_PUBLIC_KEY="your-project-public-key"
export LANGFUSE_SECRET_KEY="your-project-secret-key"
# Set this to your region or self-hosted origin when needed:
export LANGFUSE_BASE_URL="https://cloud.langfuse.com"
```

## Configure export

```typescript theme={null}
import { LangfuseOTLPExporter } from "@agentium/observability";

export const exporter = new LangfuseOTLPExporter({
  serviceName: "support-agent",
});
```

Pass it to `instrument` or `instrumentBus`, then call the observation's `shutdown()` after active runs settle. No Langfuse SDK is required for this HTTP exporter.

`baseUrl` is the deployment origin; the adapter appends `/api/public/otel/v1/traces` and derives Basic authentication from the project keys. Missing credentials fail during construction. Do not include credentials in a URL.

## Data and correlation

Model calls map to generations, Agent spans to agents, and tool spans to tools. Usage and lineage correlate with model, session, tenant, and user metadata. Prompt/output content remains excluded unless explicitly allowed by a capture policy at both instrumentation and the exporter.

## Migrate the legacy path

Replace `LangfuseExporter` / `"langfuse"` with `LangfuseOTLPExporter` / `"langfuse-otlp"`, verify your deployment supports the current ingestion route, and inspect a trace from your application. The legacy exporter emits a migration diagnostic. Do not dual-send the same spans through both paths.

Use [exporter selection](/observability/exporters) if your application already exports through a host OpenTelemetry provider.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.