Skip to content

Add Nested Traces PromptFlow How-to #827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

PeriniM
Copy link
Contributor

@PeriniM PeriniM commented Jun 2, 2025

Propagating LangSmith Traces in PromptFlow

This tutorial explains how to correctly propagate LangSmith traces in a PromptFlow application. We'll cover how to create nested traces, pass run tree information between nodes, and integrate LangGraph within a PromptFlow tool.

Copy link

vercel bot commented Jun 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langsmith-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 17, 2025 11:41am

return {
"processed": processed,
"langsmith_extra": {
"parent": headers
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the extra required here??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually it is just to map the output of the parent node with the input of the child node. It can have a different name but we need to make sure to apply the correct mapping on the flow.dag.yaml file

  - name: child
    type: python
    source:
      type: code
      path: child_node.py
    function: child_node
    inputs:
      processed_text: ${parent.output.processed}
      langsmith_extra: ${parent.output.langsmith_extra}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants