Repository navigation
Conversation
Author
|
CI is waiting for fork approval. Could someone with write access approve the workflows so the checks and automated reviews can run? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handwritten 1-3 sentence description
Turning on OTel v2 could drop the default tags on Langfuse traces. This keeps the configured tags alongside the tags sent with the request, so existing filters still work after switching to v2
Details
TLDR
Problem this solves:
How it solves it:
User Flow
Before, the completion succeeds but configured tags are missing from the export
After, the same completions export the configured tags
Relevant issues
Fixes #49844
Pre-Submission checklist
Screenshots / Proof of Fix
Shared setup used llama.cpp b12040 with SmolLM2-135M-Instruct Q4_K_M as the real model provider, Redis 8.10.3 for router and coordination state, and a local OTLP/HTTP receiver. The proxy ran with two workers and OTel v2 enabled. The configured defaults were
appandcache_hit. SetLITELLM_OTEL_V2=trueand pointLANGFUSE_HOSTat the local OTLP/HTTP receiver. Configuresmollm2asopenai/smollm2withapi_basepointing at llama.cpp, setcallbacks: [langfuse_otel], and point both router Redis and coordination Redis at the same instanceBefore (ff182c1)
langfuse.trace.tagsfrom the generation spans. The values are absent and["caller-tag"]After (084be77)
langfuse.trace.tagsfrom the generation spans. The values are["app:local-qa", "cache_hit:None"]and["caller-tag", "app:local-qa", "cache_hit:None"]The request span also carries
app:local-qa. The cache outcome is added to the completed generation because it is unavailable when the request span is first stampedThe live capture was made before a type-only cleanup of the optional cache key. That cleanup preserved the fallback and passed 187 focused tests. The final commit also passed
make checkThe four new regression cases fail at the base and pass with this patch. They cover both metadata fields, missing caller tags, duplicate tags, and cache hits and misses
At the final commit, the affected OTel and legacy Langfuse unit suite passed 1,396 tests and the SDK wire suite passed 4 tests