Skip to content

docs(agent-tracing): update gen_ai attribute names and rename instrumentLangGraph - #19338

Merged
andreiborza merged 4 commits into
js-v11-docsfrom
nicolashrubec/sdk-1480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph
Sep 22, 2026
Merged

andreiborza merged 4 commits into
js-v11-docsfrom
nicolashrubec/sdk-1480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

DESCRIBE YOUR PR

Apply the v11 gen_ai.* attribute renames (Mastra page + manual span-metrics example), rename instrumentLangGraph to instrumentStateGraph, and document the separate instrumentCreateReactAgent manual helper on the LangGraph pages (JavaScript and React Native).

⚠️ Do not merge until v11 is released as stable.

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-DD with the due date. You can update this information later by editing the PR description.

  • Urgent deadline (GA date, etc.): YYYY-MM-DD
  • Other deadline: YYYY-MM-DD
  • No deadline: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've supplied a deadline.

Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

🤖 Generated with Claude Code

…entLangGraph

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
develop-docs Ready Ready Preview Sep 22, 2026 4:19pm UTC
sentry-docs Ready Ready Preview Sep 22, 2026 4:19pm UTC

Request Review

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

SDK-1480

…elper

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubec force-pushed the nicolashrubec/sdk-1480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph branch from f246c09 to 7a3f84a Compare September 10, 2026 15:27
@nicohrubec
nicohrubec marked this pull request as ready for review September 21, 2026 15:50
@codeowner-assignment
codeowner-assignment Bot requested a review from a team September 21, 2026 15:50
@nicohrubec
nicohrubec requested a review from JPeer264 September 21, 2026 15:50
…480-update-gen-ai-attribute-names-and-rename-instrumentlanggraph

# Conflicts:
#	docs/platforms/javascript/common/agent-tracing/mastra.mdx
Comment thread docs/platforms/javascript/common/agent-tracing/langgraph.mdx Outdated
@andreiborza
andreiborza changed the base branch from master to js-v11-docs September 22, 2026 12:14
…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 });
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
andreiborza merged commit 0a3d3be into js-v11-docs Sep 22, 2026
7 of 9 checks passed
@andreiborza
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

2 active deployments
Preview – sentry-docs — af92fe1f Deployed Sep 22, 2026 by vercel[bot]
Preview – develop-docs — af92fe1f Deployed Sep 22, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

js-v11-docs Priority: Normal Docs review has no urgent deadline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants