langfuse-python icon indicating copy to clipboard operation
langfuse-python copied to clipboard

feat: added remote trace attachment

Open edwardpwtsoi opened this issue 4 months ago • 2 comments

for solving https://github.com/langfuse/langfuse/issues/7838 added remote trace attachment to langchain callback handler with langfuse_trace_id is provided in the config.metadata


[!IMPORTANT] Adds remote trace attachment to LangchainCallbackHandler in CallbackHandler.py when langfuse_trace_id is provided in metadata.

  • Behavior:
    • Adds remote trace attachment in LangchainCallbackHandler when langfuse_trace_id is in metadata and parent_run_id is None.
    • Modifies on_chain_start() to create a new observation with trace_context if langfuse_trace_id is provided.
  • Misc:
    • Addresses issue #7838 on GitHub.

This description was created by Ellipsis for fcc8185c9af745d788c9f14634a5760b9c65c2e0. You can customize this summary. It will automatically update as commits are pushed.

edwardpwtsoi avatar Oct 21 '25 06:10 edwardpwtsoi

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Oct 21 '25 06:10 CLAassistant

Greptile encountered an error while reviewing this PR. Please reach out to [email protected] for assistance.

greptile-apps[bot] avatar Oct 21 '25 06:10 greptile-apps[bot]

Thanks a lot for your contribution! Closing this in favor of https://github.com/langfuse/langfuse-python/pull/1419

hassiebp avatar Dec 01 '25 16:12 hassiebp