Repository navigation
docs(agent-tracing): update gen_ai attribute names and rename instrumentLangGraph - #19338
Merged
andreiborza merged 4 commits intoSep 22, 2026
Conversation
…entLangGraph Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…elper Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nicohrubec
force-pushed
the
nicolashrubec/sdk-1480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph
branch
from
September 10, 2026 15:27
f246c09 to
7a3f84a
Compare
nicohrubec
marked this pull request as ready for review
September 21, 2026 15:50
…480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph # Conflicts: # docs/platforms/javascript/common/agent-tracing/mastra.mdx
chargome
approved these changes
Sep 22, 2026
…sdk-1480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph # Conflicts: # docs/platforms/javascript/common/agent-tracing/langgraph.mdx
Comment on lines
+136
to
+144
| ```javascript | ||
| import { createReactAgent } from "@langchain/langgraph/prebuilt"; | ||
|
|
||
| // Instrument createReactAgent, then use the wrapped version in its place | ||
| const instrumentedCreateReactAgent = | ||
| Sentry.instrumentCreateReactAgent(createReactAgent); | ||
|
|
||
| const agent = instrumentedCreateReactAgent({ llm, tools }); | ||
| ``` |
Contributor
There was a problem hiding this comment.
Bug: The createReactAgent code snippet uses llm and tools without defining them. Users copying only this snippet will encounter a ReferenceError.
Severity: MEDIUM
Suggested Fix
Update the createReactAgent code snippet to be self-contained. Either define the llm and tools variables directly within the same code block or add comments indicating that these variables must be defined and sourced from earlier in the user's application code.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location:
docs/platforms/javascript/common/configuration/integrations/langgraph.mdx#L136-L144
Potential issue: The documentation provides a code snippet for `createReactAgent` that
uses the variables `llm` and `tools`. However, these variables are not defined within
the snippet itself; they are defined in a separate, preceding code block. A user who
copies only the `createReactAgent` example will encounter a runtime `ReferenceError: llm
is not defined` because the necessary context is missing. This makes the documentation
incomplete and will cause the example code to fail for users following the guide.
Also affects:
docs/platforms/react-native/common/integrations/langgraph.mdx:60~68
andreiborza
deleted the
nicolashrubec/sdk-1480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph
branch
September 22, 2026 16:13
This branch was successfully deployed
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.
DESCRIBE YOUR PR
Apply the v11
gen_ai.*attribute renames (Mastra page + manual span-metrics example), renameinstrumentLangGraphtoinstrumentStateGraph, and document the separateinstrumentCreateReactAgentmanual helper on the LangGraph pages (JavaScript and React Native).IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
Select exactly one option. For deadlines, replace
YYYY-MM-DDwith the due date. You can update this information later by editing the PR description.SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
🤖 Generated with Claude Code