docs(langfuse): correct metadata and update_trace_keys behavior - #902
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
5 tasks
|
Ive got this same issue, sometimes llm calls are logged in LangGraph v4.11, sometimes not, and when they are, we see metadata but not input and output |
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.
Four statements on the Langfuse page no longer match the code, all live-verified against staging head 0f2566e823.
update_trace_keysis gated behindlangfuse_enable_update_trace_keys(default off) by BerriAI/litellm#36862, so the inline comment in the example and the masking paragraph both needed the condition. Driven live: with the flag off the continuation writes nothing, with it on input, output and trace metadata all apply.Arbitrary metadata no longer lands flat on the generation since BerriAI/litellm#36744; it arrives under
requester_metadata. Proxy callers get this automatically. SDK callers need to nest, which the added snippet shows. Verified through the real payload builder: flat givesrequester_metadata=null, nested preserves the dict including nesting.debug_langfuseis filtered to scalars rather than the exact metadata, since the raw dump previously carried the resolved auth object.Not covered here, both predate these changes:
trace_user_iddoes not actually default to theuserargument on the SDK path, and the Python snippets at lines 117 and 277 have missing commas and will not compile.