EUrouter
Broadcast (Beta)

Langfuse

Send LLM traces to Langfuse for observability, evaluation, and debugging.

OpenAPI JSON

Langfuse is an open-source LLM engineering platform for tracing, evaluation, prompt management, and metrics. Connect it to EUrouter to automatically capture every request as a Langfuse trace.


Setup

Get your Langfuse credentials

  1. Sign in to Langfuse (or your self-hosted instance)
  2. Go to Settings in your project
  3. Copy your Secret Key and Public Key

For more details, see Where are my Langfuse API keys?

Add the destination in EUrouter

  1. Go to Broadcast in your dashboard
  2. Click Add Destination next to Langfuse
  3. Enter your Secret Key and Public Key
  4. If you're self-hosting, update the Base URL (default: https://cloud.langfuse.com)
  5. Click Test Connection to verify
  6. Click Create

Configuration

FieldRequiredDescription
Secret KeyYesYour Langfuse secret key (sk-lf-...)
Public KeyYesYour Langfuse public key (pk-lf-...)
Base URLNoCustom endpoint for self-hosted Langfuse. Default: https://cloud.langfuse.com

What you'll see in Langfuse

Once connected, each EUrouter request appears as a trace in Langfuse with:

  • Model name and provider
  • Input/output messages (only for API keys with prompt forwarding switched on)
  • Token usage and cost
  • Latency and timing breakdown
  • Any custom metadata passed via the trace field

Custom metadata

You can enrich Langfuse traces by including a trace field in your EUrouter requests:

{
  "model": "mistral-large-3",
  "messages": [{ "role": "user", "content": "Hello!" }],
  "trace": {
    "trace_id": "workflow_123",
    "trace_name": "Customer Support",
    "generation_name": "Initial Response",
    "user_id": "user_456",
    "session_id": "session_789"
  }
}

Langfuse recognizes these keys:

KeyDescription
trace_idGroup multiple requests into a single Langfuse trace
trace_nameDisplay name for the trace (defaults to model name)
generation_nameName for the specific LLM generation
user_idAssociate the trace with a specific user
session_idGroup traces into a Langfuse session

Decision fields

Every generation carries the decision EUrouter made for the request, as span attributes that Langfuse shows in the observation's metadata.

AttributeTypeDescription
eurouter.decisionstringallowed, redacted, blocked or error
eurouter.reason_codesstring[]Reason codes, such as pii.blocked or plan.rate_limited
eurouter.pii_counts.<type>intDetected PII per type, for example eurouter.pii_counts.email
eurouter.processing_countriesstring[]ISO country codes where the request was processed
http.response.status_codeintHTTP status EUrouter returned
error.typestringBlocked and failed requests only: the first reason code, or the decision

A blocked or failed request shows with level ERROR and a status message such as blocked: pii.blocked. Every trace has a decision:<value> tag, so you can filter on decision:blocked.

Blocked and rejected requests arrive too, with zero tokens, no cost and never a prompt. See the decision record for the values.


Learn more

Was this page helpful?

Still stuck? Contact support

On this page