Skip to content

feat(core): Add instrumentStateGraph API - #22483

Merged
nicohrubec merged 1 commit into
feat/drop-browser-ai-integrationsfrom
feat/rename-instrument-langgraph-to-state-graph
Jul 22, 2026
Merged

feat(core): Add instrumentStateGraph API#22483
nicohrubec merged 1 commit into
feat/drop-browser-ai-integrationsfrom
feat/rename-instrument-langgraph-to-state-graph

Conversation

@nicohrubec

@nicohrubecnicohrubec commented Jul 22, 2026

Copy link
Copy Markdown
Member

Adds instrumentStateGraph as the new name for the public LangGraph manual-instrumentation function, since the old instrumentLangGraph only instruments the StateGraph class and is confusing now that a separate instrumentCreateReactAgent API exists. Deprecates instrumentLangGraph but does not remove yet so this commit can be backported as is to v10. Removal will be done in a follow-up.

@nicohrubecnicohrubec changed the title feat(core): Deprecate instrumentLangGraph in favor of instrumentStateGraphfeat(core): Add instrumentStateGraph APIJul 22, 2026
@github-actions

github-actionsBot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize% ChangeChange
@sentry/browser27.76 kB--
@sentry/browser - with treeshaking flags26.2 kB--
@sentry/browser (incl. Tracing)46.59 kB--
@sentry/browser (incl. Tracing + Span Streaming)48.4 kB--
@sentry/browser (incl. Tracing, Profiling)51.39 kB--
@sentry/browser (incl. Tracing, Replay)85.83 kB--
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags75.47 kB--
@sentry/browser (incl. Tracing, Replay with Canvas)90.56 kB--
@sentry/browser (incl. Tracing, Replay, Feedback)103.22 kB--
@sentry/browser (incl. Feedback)44.95 kB--
@sentry/browser (incl. sendFeedback)32.56 kB--
@sentry/browser (incl. FeedbackAsync)37.62 kB-0.19%-70 B 🔽
@sentry/browser (incl. Metrics)28.84 kB--
@sentry/browser (incl. Logs)29.06 kB--
@sentry/browser (incl. Metrics & Logs)29.76 kB--
@sentry/react29.55 kB--
@sentry/react (incl. Tracing)48.87 kB--
@sentry/vue33.18 kB--
@sentry/vue (incl. Tracing)48.56 kB--
@sentry/svelte27.78 kB--
CDN Bundle30.1 kB-0.19%-57 B 🔽
CDN Bundle (incl. Tracing)48.48 kB-0.16%-75 B 🔽
CDN Bundle (incl. Logs, Metrics)31.68 kB-0.2%-62 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics)49.78 kB-0.16%-78 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics)70.94 kB-0.1%-66 B 🔽
CDN Bundle (incl. Tracing, Replay)85.99 kB-0.08%-64 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics)87.31 kB-0.08%-66 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback)91.8 kB-0.08%-65 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics)93.07 kB-0.07%-64 B 🔽
CDN Bundle - uncompressed89.72 kB-0.2%-172 B 🔽
CDN Bundle (incl. Tracing) - uncompressed146.59 kB-0.12%-172 B 🔽
CDN Bundle (incl. Logs, Metrics) - uncompressed94.43 kB-0.19%-172 B 🔽
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed150.57 kB-0.12%-172 B 🔽
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed219.19 kB-0.08%-172 B 🔽
CDN Bundle (incl. Tracing, Replay) - uncompressed265.83 kB-0.07%-172 B 🔽
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed269.8 kB-0.07%-172 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed279.54 kB-0.07%-172 B 🔽
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed283.49 kB-0.07%-172 B 🔽
@sentry/nextjs (client)51.38 kB--
@sentry/sveltekit (client)47 kB--
@sentry/core/server80.13 kB-0.22%-173 B 🔽
@sentry/core/browser51.97 kB-22.1%-14.74 kB 🔽
@sentry/node-core63.21 kB-0.01%-1 B 🔽
@sentry/node125.04 kB-0.01%-2 B 🔽
@sentry/node (incl. diagnostics channel injection)150.51 kB--
@sentry/node/import (ESM hook with diagnostics-channel injection)70.03 kB--
@sentry/node/light51.33 kB-0.01%-1 B 🔽
@sentry/node - without tracing74.92 kB--
@sentry/aws-serverless84.16 kB-0.01%-1 B 🔽
@sentry/cloudflare (withSentry) - minified197.75 kB--
@sentry/cloudflare (withSentry)486.73 kB--

View base workflow run

`instrumentLangGraph` only instruments the `StateGraph` class, which is
confusing now that there is a separate `instrumentCreateReactAgent` API.
Add `instrumentStateGraph` as the new name and keep `instrumentLangGraph`
as a deprecated alias so this change is non-breaking on v10.
Ref #20584
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@nicohrubec
nicohrubecforce-pushed the feat/rename-instrument-langgraph-to-state-graph branch from 8ea5737 to ed2098bCompareJuly 22, 2026 09:41
@nicohrubec
nicohrubec changed the base branch from develop to feat/drop-browser-ai-integrationsJuly 22, 2026 09:41
@nicohrubec
nicohrubec marked this pull request as ready for review July 22, 2026 10:01
@nicohrubec
nicohrubec requested review from a team as code ownersJuly 22, 2026 10:01
@nicohrubec
nicohrubec requested review from andreiborza, chargome, isaacs and mydea and removed request for a teamJuly 22, 2026 10:01
@nicohrubec
nicohrubec merged commit d285233 into developJul 22, 2026
299 checks passed
@nicohrubec
nicohrubec deleted the feat/rename-instrument-langgraph-to-state-graph branch July 22, 2026 11:43
nicohrubec added a commit that referenced this pull request Jul 22, 2026
Removes the `instrumentLangGraph` alias that
#22483 deprecated in favor of
`instrumentStateGraph`, completing the rename from
#20584.
Fixes#20584
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
nicohrubec added a commit that referenced this pull request Jul 22, 2026
nicohrubec added a commit that referenced this pull request Jul 22, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@nicohrubec@andreiborza