LINKORA
OverviewQuickstart

Langfuse

Send traces to Langfuse

Langfuse is an open-source LLM engineering platform for tracing, evaluating, and debugging LLM applications.

Step 1: Create a Langfuse API key

In Langfuse, go to your project's Settings > API Keys and create a new key pair. Copy both the Secret Key and Public Key.

!Langfuse API Keys

Step 2: Enable Broadcast in Linkora

Go to Settings > Observability and toggle Enable Broadcast.

!Enable Broadcast

Step 3: Configure Langfuse

Click the edit icon next to Langfuse and enter:

  • Secret Key: Your Langfuse Secret Key
  • Public Key: Your Langfuse Public Key
  • Base URL (optional): Default is https://us.cloud.langfuse.com. Change for other regions or self-hosted instances

!Langfuse Configuration

Step 4: Test and save

Click Test Connection to verify the setup. The configuration only saves if the test passes.

!Langfuse Configured

Step 5: Send a test trace

Make an API request through Linkora and view the trace in Langfuse.

!Langfuse Trace

Custom Metadata

Langfuse supports rich trace hierarchies and metadata. Use the trace field to customize how your traces appear in Langfuse.

Supported Metadata Keys

KeyLangfuse MappingDescription
`trace_id`Trace IDGroup multiple requests into a single trace
`trace_name`Trace NameCustom name displayed in the Langfuse trace list
`span_name`Span NameName for intermediate spans in the hierarchy
`generation_name`Generation NameName for the LLM generation observation
`parent_span_id`Parent Observation IDLink to an existing span in your trace hierarchy
`environment`EnvironmentPopulates the first-class `Environment` field used by the Langfuse project filter (e.g. `production`, `staging`). Emitted as both a resource attribute and observation attribute.
`release`ReleaseApplication release/version associated with the trace. Emitted as both a resource attribute and observation attribute.

Example

{
  "model": "openai/gpt-4o",
  "messages": [{ "role": "user", "content": "Summarize this document..." }],
  "user": "user_12345",
  "session_id": "session_abc",
  "trace": {
    "trace_id": "workflow_12345",
    "trace_name": "Document Processing Pipeline",
    "span_name": "Summarization Step",
    "generation_name": "Generate Summary",
    "environment": "production",
    "release": "2.1.0",
    "pipeline_version": "2.1.0"
  }
}

This creates a hierarchical trace structure in Langfuse:

Document Processing Pipeline (trace)
└── Summarization Step (span)
    └── Generate Summary (generation)

Additional Context

  • The user field maps to Langfuse's User ID for user-level analytics
  • The session_id field maps to Langfuse's Session ID for grouping conversations
  • Any additional keys in trace are passed as trace metadata and can be used for filtering and analysis in Langfuse
  • Prompt and completion content is sent on the generation observation as langfuse.observation.input / langfuse.observation.output (plus gen_ai.prompt / gen_ai.completion). Langfuse derives the trace-level input and output from the root observation, so the deprecated langfuse.trace.input / langfuse.trace.output attributes are no longer emitted. Trace-level evaluators that read those attributes directly should read the root observation instead.

Privacy Mode

When Privacy Mode is enabled for this destination, prompt and completion content and provider error text are excluded from traces. All other trace data — token usage, costs, timing, model information, and custom metadata — is still sent normally. See Privacy Mode for details.