Skip to content

ref(langgraph)!: Drop gen_ai.create_agent spans - #22840

Draft
nicohrubec wants to merge 3 commits into
developfrom
feat/drop-langgraph-create-agent-spans
Draft

ref(langgraph)!: Drop gen_ai.create_agent spans#22840
nicohrubec wants to merge 3 commits into
developfrom
feat/drop-langgraph-create-agent-spans

Conversation

@nicohrubec

@nicohrubec nicohrubec commented Jul 29, 2026

Copy link
Copy Markdown
Member

Drops the gen_ai.create_agent spans from the LangGraph instrumentation, which are no longer relevant.

Fixes #22335

nicohrubec and others added 3 commits July 29, 2026 18:02
The LangGraph instrumentation no longer emits `gen_ai.create_agent` spans on
graph compile. These spans are no longer relevant for Sentry's AI product, and
removing them for v11 keeps the leftover out of the major.

The span was emitted from two call sites sharing the
`_INTERNAL_getLangGraphCreateAgentSpanOptions` builder: the core
`instrumentStateGraphCompile` proxy and the orchestrion `stateGraphCompile`
channel. Both now only wrap the compiled graph's `invoke`. The
`insideCreateReactAgent` suppression is kept — it prevents duplicate
`invoke_agent` spans, independent of the create_agent span.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename and refocus the orchestrion stateGraphCompile test to assert what it
does now — wrapping the compiled graph's invoke — instead of framing it around
the removed create_agent span.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A plain writable `invoke` property is enough; the getter/setter was unnecessary.

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

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 29.82 kB - -
@sentry/browser - with treeshaking flags 28.02 kB - -
@sentry/browser (incl. Tracing) 47.08 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.09 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.82 kB - -
@sentry/browser (incl. Tracing, Replay) 86.39 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.83 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.11 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.76 kB - -
@sentry/browser (incl. Feedback) 47.13 kB - -
@sentry/browser (incl. sendFeedback) 34.66 kB - -
@sentry/browser (incl. FeedbackAsync) 39.76 kB - -
@sentry/browser (incl. Metrics) 30.89 kB - -
@sentry/browser (incl. Logs) 31.12 kB - -
@sentry/browser (incl. Metrics & Logs) 31.8 kB - -
@sentry/react 31.6 kB - -
@sentry/react (incl. Tracing) 49.33 kB - -
@sentry/vue 34.74 kB - -
@sentry/vue (incl. Tracing) 49.05 kB - -
@sentry/svelte 29.85 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 47.45 kB - -
CDN Bundle (incl. Logs, Metrics) 33.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.78 kB - -
CDN Bundle (incl. Tracing, Replay) 85.08 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.38 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.85 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.16 kB - -
CDN Bundle - uncompressed 95.04 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.27 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.25 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.51 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.52 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.49 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.23 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.18 kB - -
@sentry/nextjs (client) 51.92 kB - -
@sentry/sveltekit (client) 47.51 kB - -
@sentry/core/server 79.48 kB -0.14% -109 B 🔽
@sentry/core/browser 51.58 kB - -
@sentry/node 121.23 kB -0.06% -64 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 84.77 kB - -
@sentry/aws-serverless 93.02 kB - -
@sentry/cloudflare (withSentry) - minified 197.59 kB - -
@sentry/cloudflare (withSentry) 485.77 kB - -

View base workflow run

Sign up for free to 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.

(v11) Drop gen_ai.create_agent spans from LangGraph instrumentation

1 participant