9 views
-/https://github.com/berriai/litellm/issues/35192
GitHub ยท issue

#35192 [Bug]: OTel v2 Langfuse mapper omits trace user, session, name, and tags

  • State: open
  • Author: @ksukys
  • Labels: bug, proxy

### Check for existing issues

- [x] I have searched the existing issues and checked that my issue is not a duplicate.

### What happened?

### Actual behavior

When OTel v2 is configured with `mapper_names: [langfuse]`, `LangfuseMapper` emits generation model/usage/cost plus team metadata, but it does not map the standard Langfuse trace controls already supported by LiteLLM's existing Langfuse OTel integration:

- `trace_user_id` / end-user identity โ†’ `user.id` or `langfuse.user.id` - `session_id` โ†’ `session.id` or `langfuse.session.id` - `trace_name` โ†’ `langfuse.trace.name` - request tags โ†’ `langfuse.trace.tags` - explicitly approved trace metadata โ†’ `langfuse.trace.metadata.<key>`

As a result, native OTel v2 traces arrive in Langfuse with correct tokens and cost but without top-level user/session attribution, custom trace names, or tags. The same request fields are supported by `LangfuseOtelLogger._set_metadata_attributes` in the existing integration, so switching to the v2 mapper loses semantics.

### Expected behavior

The v2 Langfuse mapper should preserve the established LiteLLM Langfuse metadata contract using the current official Langfuse OTLP attribute names. Trace-wide โ€ฆ

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (1 events)
#0 of 0 ยท 31d19h2m45s ago โ€” entered ยท #import:https:::github.com:berriai:litellm post #1813
The UI performance issue is harder because it requires broad profiling and regression diagnosis across frontend rendering, API behavior, database access, and deployment environments, whereas the mapper issue is a more localized attribute-mapping change with clearer existing integration behavior.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search