fix(ai): remove setting of GEN_AI_AGENT_NAME from langchain#5728
Open
harryautomazione wants to merge 3 commits intogetsentry:masterfrom
Open
fix(ai): remove setting of GEN_AI_AGENT_NAME from langchain#5728harryautomazione wants to merge 3 commits intogetsentry:masterfrom
harryautomazione wants to merge 3 commits intogetsentry:masterfrom
Conversation
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. New Features ✨
Bug Fixes 🐛Anthropic
Other
Documentation 📚
Internal Changes 🔧
Other
🤖 This preview updates automatically when you update the PR. |
9163994 to
bd0b816
Compare
53f01a9 to
bd0b816
Compare
…gation - Add CURRENT_LANGCHAIN_AGENT_NAME contextvar to track agent name across spans - Set agent name in agent executor wrappers (invoke/stream) - Propagate agent name to all child spans via _create_span - Add test to verify agent name is set on all spans
- Correctly place the new test after test_langchain_agent - Remove misplaced assertions that broke the original test
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
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.

Description
This PR removes the setting of
SPANDATA.GEN_AI_AGENT_NAMEfrom several places in thelangchainintegration, as pulling it from request parameters (likerun_name) was identified as semantically incorrect.The setting in
on_llm_startwas already removed in PR #5705. This completes the removal for other areas to fully resolve the issue.Changes
SPANDATA.GEN_AI_AGENT_NAMEinon_chat_model_start.on_tool_start._wrap_agent_executor_invoke._wrap_agent_executor_stream.Resolves: #5719