[PR #6642] feat(langgraph): add field-level tracing annotations to control LangSmith trace visibility #5185

Open
opened 2026-02-20 17:51:21 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/6642

State: open
Merged: No


Description:
Adds field-level tracing control using Python's Annotated type to solve LangSmith size limit errors and trace bloat. Developers can now annotate state fields with NotTraced(), AsAttachment(), or RootOnly() to control whether fields appear in traces, while code retains full access to all data. Closes langchain-ai/langsmith-sdk#2034

Issue: #6214, langchain-ai/langsmith-sdk#2034

Dependencies: None - uses existing typing features

Twitter handle: @0xaaryan

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/6642 **State:** open **Merged:** No --- **Description:** Adds field-level tracing control using Python's `Annotated` type to solve LangSmith size limit errors and trace bloat. Developers can now annotate state fields with `NotTraced()`, `AsAttachment()`, or `RootOnly()` to control whether fields appear in traces, while code retains full access to all data. Closes langchain-ai/langsmith-sdk#2034 **Issue:** #6214, langchain-ai/langsmith-sdk#2034 **Dependencies:** None - uses existing typing features **Twitter handle:** @0xaaryan
yindo added the pull-request label 2026-02-20 17:51:21 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#5185