Skip to content

ref(docs): Restructure LangChain integration documentation#16048

Merged
priscilawebdev merged 7 commits into
masterfrom
priscila/ref/restructure-langchain-doc
Jan 27, 2026
Merged

ref(docs): Restructure LangChain integration documentation#16048
priscilawebdev merged 7 commits into
masterfrom
priscila/ref/restructure-langchain-doc

Conversation

@priscilawebdev

@priscilawebdev priscilawebdev commented Jan 16, 2026

Copy link
Copy Markdown
Member
  • Separate server-side and browser-side usage sections for clarity
  • Document langChainIntegration for Node.js platforms (auto-enabled by default)
  • Document createLangChainCallbackHandler for browser and edge runtimes
  • Add special handling for Cloudflare Workers and Next.js Edge runtime
  • Simplify code examples with placeholder comments
  • Restructure Configuration section with options first, then usage examples
  • Improve platform-specific visibility using PlatformSection components

closes https://linear.app/getsentry/issue/TET-1740/langchain-integration-restructure-and-improve-docs

@linear

linear Bot commented Jan 16, 2026

Copy link
Copy Markdown

@vercel

vercel Bot commented Jan 16, 2026

Copy link
Copy Markdown

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

Project Deployment Review Updated (UTC)
sentry-docs Ready Ready Preview, Comment Jan 26, 2026 0:52am
1 Skipped Deployment
Project Deployment Review Updated (UTC)
develop-docs Ignored Ignored Preview Jan 26, 2026 0:52am

Request Review

@RulaKhaled RulaKhaled left a comment

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.

lgtm!

@RulaKhaled RulaKhaled left a comment

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.

@priscilawebdev

Copy link
Copy Markdown
Member Author

Edge runtime should have it's own section: https://sentry-docs-rc5wqv0cx.sentry.dev/platforms/javascript/guides/nextjs/configuration/integrations/langchain/#browser-side-usage

Since we already have an alert in place for runtimes in general, I believe that should be sufficient for Edge as well. That said, I don’t have strong feelings on this, so I’m fine with adding it back.

Out of curiosity, is there a specific reason this section exists only for LangChain? I don’t see a similar section for OpenAI, for example.

@RulaKhaled

RulaKhaled commented Jan 26, 2026

Copy link
Copy Markdown
Contributor

Edge runtime should have it's own section: https://sentry-docs-rc5wqv0cx.sentry.dev/platforms/javascript/guides/nextjs/configuration/integrations/langchain/#browser-side-usage

Since we already have an alert in place for runtimes in general, I believe that should be sufficient for Edge as well. That said, I don’t have strong feelings on this, so I’m fine with adding it back.

Out of curiosity, is there a specific reason this section exists only for LangChain? I don’t see a similar section for OpenAI, for example.

The alert is nested within the browser runtime so i think it is confusing for folks looking at Edge runtime as they are two separate concepts. We can either move the alert outside of the browser section or create it's own section (which is what i recommend).

We do have it for other AI integrations: https://docs.sentry.io/platforms/javascript/guides/nextjs/configuration/integrations/google-genai/#edge-runtime

@priscilawebdev

Copy link
Copy Markdown
Member Author

Edge runtime should have it's own section: https://sentry-docs-rc5wqv0cx.sentry.dev/platforms/javascript/guides/nextjs/configuration/integrations/langchain/#browser-side-usage

Since we already have an alert in place for runtimes in general, I believe that should be sufficient for Edge as well. That said, I don’t have strong feelings on this, so I’m fine with adding it back.
Out of curiosity, is there a specific reason this section exists only for LangChain? I don’t see a similar section for OpenAI, for example.

The alert is nested within the browser runtime so i think it is confusing for folks looking at Edge runtime as they are two separate concepts. We can either move the alert outside of the browser section or create it's own section (which is what i recommend).

Yes, I removed that previously. We now have a single general alert for other runtimes, and “edge” is considered one of these. It’s displayed under server-side, and for Next.js, it’s always shown since we display both server-side and browser-side information for meta frameworks. That said, I’m happy to keep a separate dedicated section if you feel it would improve discoverability. Thanks!

## Edge runtime

For browser applications, you need to manually instrument LangChain operations using the `createLangChainCallbackHandler` helper:
This integration is automatically instrumented in the Node.js runtime. For Next.js applications using the Edge runtime, you need to manually instrument LangChain operations using the callback handler:

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.

you can remove This integration is automatically instrumented in the Node.js runtime. from this callout. Leaving this up to you.

@priscilawebdev priscilawebdev merged commit 2c42896 into master Jan 27, 2026
13 checks passed
@priscilawebdev priscilawebdev deleted the priscila/ref/restructure-langchain-doc branch January 27, 2026 09:20
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants